设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
楼主: 二胡游
打印 上一主题 下一主题

【貌似发现问题所在!】为什么我改不了默认对话字颜色?

 关闭 [复制链接]

Lv1.梦旅人

小毛头

梦石
0
星屑
50
在线时间
1 小时
注册时间
2007-7-11
帖子
138
21
发表于 2007-8-29 01:12:43 | 只看该作者
{/gg}{/gg}{/gg}
在查不出问题出在哪里的情况下,建议你重新开一个工程进行修改
把那些杂七八糟的外挂统统剔除掉
有时候不稳定的外挂程序会导致冲突
然后
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. #——说明

  5. #默认为一个字一个字的方式,如果需要一次全部显示,
  6. #请在游戏中使用脚本:$game_system.typing = true
  7.      
  8. #默认对话字没有声音,如果需要声音,
  9. #请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
  10.   #我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音

  11. # 其他在对话中可以使用的功能:

  12. # \n[1]:显示1号角色的姓名

  13. # \name[李逍遥]:显示一个“李逍遥”方框,表示说话人姓名

  14. # \p[1]:对话框出现在1号事件的上方
  15. # \p[0]:主人公上方出现对话框
  16. #——————————————————使用\p功能后可以自动调整对话框大小

  17. # \\:显示"\"这个符号

  18. # \v[1] :显示变量1

  19. # \v[a1] :显示防具1

  20. # \v[w1] :显示武器1

  21. # \v[i1] :显示物品1

  22. # \v[s1] :显示特技1

  23. # \c[1-8]:更改颜色

  24. # \g:显示金钱窗口

  25. # \a[SE文件名]:对话的时候播放SE

  26. # \s[1-19]:更改弹字的速度

  27. # \.   :停顿一刹那(1、2帧)
  28. # \|   :停顿片刻(20帧)

  29. # \>   :文字不用打字方式
  30. # \<   :文字使用打字方式

  31. # \!   :等待玩家按回车再继续
  32. # \~   :文字直接消失

  33. # \I   :下一行从这个位置开始

  34. # \o[123]:文字透明度改为123,模拟将死之人(汗)

  35. # \h[12]:改用12号字

  36. # \b[50]:空50象素

  37. # \K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_speak设置的音效

  38. # \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
  39. # \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”

  40. # \Lk:清除左边的图像
  41. # \Rk:清除右边的图像

  42. #==============================================================================
  43. # ■ Game_System
  44. #------------------------------------------------------------------------------
  45. #  处理系统附属数据的类。也可执行诸如 BGM 管理之类的功能。本类的实例请参考
  46. # $game_system 。
  47. #==============================================================================

  48. class Game_System
  49.   attr_accessor :typing
  50.   attr_accessor :soundname_on_speak
  51.   alias carol3_ini initialize
  52.   def initialize
  53.     carol3_ini
  54.     @typing = true
  55.     @soundname_on_speak = nil
  56.   end
  57. end
  58. $加密 = true
  59. #==============================================================================
  60. # ■ Window_Message
  61. #------------------------------------------------------------------------------
  62. class Window_Message < Window_Selectable
  63.   #--------------------------------------------------------------------------
  64.   # ● 初始化状态
  65.   #--------------------------------------------------------------------------
  66.   def initialize
  67.     super(80, 304, 540, 150)
  68.     self.contents = Bitmap.new(width - 32, height - 32)
  69.     self.contents.font.color = Color.new(0, 0, 0, 255)
  70.     @sprite_back_white = Sprite.new
  71.     @sprite_back_white.bitmap = RPG::Cache.picture("对话框")
  72.     @sprite_back_white.visible = false
  73.    
  74.     self.visible = false
  75.     self.z = 9998
  76.     @sprite_back_white.z = self.z - 1
  77.     @fade_in = false
  78.     @fade_out = false
  79.     @contents_showing = false
  80.     @cursor_width = 0
  81.     self.active = false
  82.     self.index = -1
  83.     if $game_system.soundname_on_speak == nil then
  84.       $game_system.soundname_on_speak = ""
  85.     end
  86.     @opacity_text_buf = Bitmap.new(32, 32)
  87.   end
  88.   #--------------------------------------------------------------------------
  89.   # ● 释放
  90.   #--------------------------------------------------------------------------
  91.   def dispose
  92.     terminate_message
  93.     $game_temp.message_window_showing = false
  94.     if @input_number_window != nil
  95.       @input_number_window.dispose
  96.     end
  97.     super
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # ● 处理信息结束
  101.   #--------------------------------------------------------------------------
  102.   def terminate_message
  103.     self.active = false
  104.     self.pause = false
  105.     self.index = -1
  106.     self.contents.clear
  107.     # 清除显示中标志
  108.     @contents_showing = false
  109.     # 呼叫信息调用
  110.     if $game_temp.message_proc != nil
  111.       $game_temp.message_proc.call
  112.     end
  113.     # 清除文章、选择项、输入数值的相关变量
  114.     $game_temp.message_text = nil
  115.     $game_temp.message_proc = nil
  116.     $game_temp.choice_start = 99
  117.     $game_temp.choice_max = 0
  118.     $game_temp.choice_cancel_type = 0
  119.     $game_temp.choice_proc = nil
  120.     $game_temp.num_input_start = 99
  121.     $game_temp.num_input_variable_id = 0
  122.     $game_temp.num_input_digits_max = 0
  123.     # 开放金钱窗口
  124.     if @gold_window != nil
  125.       @gold_window.dispose
  126.       @gold_window = nil
  127.     end
  128.     if @name_window_frame != nil
  129.       @name_window_frame.dispose
  130.       @name_window_frame = nil
  131.     end
  132.     if @name_window_text != nil
  133.       @name_window_text.dispose
  134.       @name_window_text = nil
  135.     end
  136.     if @right_picture != nil and @right_keep == true
  137.       @right_picture.dispose
  138.     end   
  139.     if @left_picture != nil and @left_keep == true
  140.       @left_picture.dispose
  141.     end
  142.   end
  143.   def refresh
  144.     # 初期化
  145.     self.contents.clear
  146.     self.contents.font.color = Color.new(0, 0, 0, 255)
  147.     @x = @y = @max_x = @max_y = @indent = @lines = 0
  148.     @left_keep = @right_keep = false
  149.     @face_indent = 0
  150.     @opacity = 255
  151.     @cursor_width = 0
  152.     @write_speed = 0
  153.     @write_wait = 0
  154.     @mid_stop = false
  155.     @face_file = nil
  156.     @popchar = -2
  157.     if $game_temp.choice_start == 0
  158.       @x = 8
  159.     end
  160.     if $game_temp.message_text != nil
  161.       @now_text = $game_temp.message_text
  162.       #——头像设置
  163.       if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
  164.         @face_file = $1 + ".png"
  165.         @x = @face_indent = 128
  166.         if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
  167.           self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  168.         end
  169.         @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  170.       end
  171.       #——左半身像设置
  172.       if (/\\[Ll]\[(.+?)\]/.match(@now_text))!=nil then
  173.         @face = "66rpg_" + $1 + "_h.png"
  174.         if $加密 == true
  175.           if @left_picture != nil
  176.             @left_picture.dispose
  177.           end
  178.           @left_picture = Sprite.new
  179.           @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  180.           @left_picture.y = 480-@left_picture.bitmap.height
  181.           @left_picture.x = 0
  182.           @left_picture.mirror = true
  183.           @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  184.         else         
  185.           if FileTest.exist?("Graphics/battlers/#{@face}")
  186.             if @left_picture != nil
  187.               @left_picture.dispose
  188.             end
  189.             @left_picture = Sprite.new
  190.             @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  191.             @left_picture.y = 480-@left_picture.bitmap.height
  192.             @left_picture.x = 0
  193.             @left_picture.mirror = true
  194.             @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  195.           end
  196.         end      
  197.       end
  198.       #——右半身像设置
  199.       if (/\\[Rr]\[(.+?)\]/.match(@now_text))!=nil then
  200.         @face = "66rpg_" + $1 + "_h.png"
  201.         if $加密 == true
  202.           if @right_picture != nil
  203.             @right_picture.dispose
  204.           end
  205.           @right_picture = Sprite.new
  206.           @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  207.           @right_picture.y = 480-@right_picture.bitmap.height
  208.           @right_picture.x = 640-@right_picture.bitmap.width
  209.           @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  210.         else
  211.           if FileTest.exist?("Graphics/battlers/#{@face}")
  212.             if @right_picture != nil
  213.               @right_picture.dispose
  214.             end
  215.             @right_picture = Sprite.new
  216.             @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  217.             @right_picture.y = 480-@right_picture.bitmap.height
  218.             @right_picture.x = 640-@right_picture.bitmap.width
  219.             @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  220.           end
  221.         end
  222.       end
  223.       if (/\\[Rr]k/.match(@now_text)) != nil
  224.         @right_keep = true
  225.         @now_text.sub!(/\\[Rr]k/) { "" }
  226.       end
  227.       if (/\\[Ll]k/.match(@now_text)) != nil
  228.         @left_keep = true
  229.         @now_text.sub!(/\\[Ll]k/) { "" }
  230.       end
  231.       # 显示人物姓名
  232.       name_window_set = false
  233.       if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
  234.         name_window_set = true
  235.         name_text = $1
  236.         @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  237.       end
  238.      
  239.       # 文字位置的判定
  240.       if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
  241.         @popchar = $1.to_i
  242.         if @popchar == -1
  243.           @x = @indent = 48
  244.           @y = 4
  245.         end
  246.         @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  247.       end
  248.      
  249.       # 开始
  250.       begin
  251.         last_text = @now_text.clone
  252.         @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  253.       end until @now_text == last_text
  254.       @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  255.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  256.     end
  257.     @now_text.gsub!(/\\\\/) { "\000" }
  258.     @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  259.     @now_text.gsub!(/\\[Gg]/) { "\002" }
  260.     @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  261.     @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  262.     @now_text.gsub!(/\\[.]/) { "\005" }
  263.     @now_text.gsub!(/\\[|]/) { "\006" }

  264.     @now_text.gsub!(/\\[>]/) { "\016" }
  265.     @now_text.gsub!(/\\[<]/) { "\017" }
  266.     @now_text.gsub!(/\\[!]/) { "\020" }
  267.     @now_text.gsub!(/\\[~]/) { "\021" }
  268.    
  269.     @now_text.gsub!(/\\[Ii]/) { "\023" }
  270.     @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  271.     @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  272.     @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  273.     @now_text.gsub!(/\\[Kk]\[(.*?)\]/) { "\027[#{$1}]" }
  274.     if @popchar >= 0
  275.       @text_save = @now_text.clone
  276.       @max_x = 0
  277.       @max_y = 4
  278.       for i in 0..3
  279.         line = @now_text.split(/\n/)[3-i]
  280.         @max_y -= 1 if line == nil and @max_y <= 4-i
  281.         next if line == nil
  282.         cx = contents.text_size(line).width
  283.         @max_x = cx if cx > @max_x
  284.       end
  285.       self.width = @max_x + 48 + @face_indent
  286.       self.height = (@max_y - 1) * 28 + 64
  287.     else
  288.       @max_x = self.width - 32 - @face_indent
  289.     end
  290.     reset_window
  291.       if name_window_set
  292.         off_x = 0
  293.         off_y = -40
  294.         space = 2
  295.         x = self.x + off_x - space / 2
  296.         y = self.y + off_y - space / 2
  297.         w = self.contents.text_size(name_text).width + 26 + space
  298.         h = 40 + space
  299.         @name_window_frame = Window_Frame.new(x, y, w, h)
  300.         @name_window_frame.z = self.z + 1
  301.         x = self.x + off_x + 4
  302.         y = self.y + off_y
  303.         @name_window_text = Air_Text.new(x+4, y+6, name_text)
  304.         @name_window_text.z = self.z + 2
  305.       end
  306.     end
  307.     reset_window
  308.     if $game_temp.choice_max > 0
  309.       @item_max = $game_temp.choice_max
  310.       self.active = true
  311.       self.index = 0
  312.     end
  313.     if $game_temp.num_input_variable_id > 0
  314.       digits_max = $game_temp.num_input_digits_max
  315.       number = $game_variables[$game_temp.num_input_variable_id]
  316.       @input_number_window = Window_InputNumber.new(digits_max)
  317.       @input_number_window.number = number
  318.       @input_number_window.x = self.x + 8
  319.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  320.     end
  321.   end
  322.   #--------------------------------------------------------------------------
  323.   # ● 更新
  324.   #--------------------------------------------------------------------------
  325.   def update
  326.     super
  327.     if @fade_in
  328.       self.contents_opacity += 24
  329.       if @input_number_window != nil
  330.         @input_number_window.contents_opacity += 24
  331.       end
  332.       if self.contents_opacity == 255
  333.         @fade_in = false
  334.       end
  335.       return
  336.     end
  337.     @now_text = nil if @now_text == ""
  338.    
  339.     if @now_text != nil and @mid_stop == false
  340.       if @write_wait > 0
  341.         @write_wait -= 1
  342.         return
  343.       end
  344.       text_not_skip = $game_system.typing
  345.       while true
  346.         @max_x = @x if @max_x < @x
  347.         @max_y = @y if @max_y < @y
  348.         if (c = @now_text.slice!(/./m)) != nil
  349.           if c == "\000"
  350.             c = "\\"
  351.           end
  352.           if c == "\001"
  353.             @now_text.sub!(/\[([0-9]+)\]/, "")
  354.             color = $1.to_i
  355.             if color >= 0 and color <= 7
  356.               self.contents.font.color = text_color(color)
  357.             end
  358.             c = ""
  359.           end
  360.           if c == "\002"
  361.             if @gold_window == nil and @popchar <= 0
  362.               @gold_window = Window_Gold.new
  363.               @gold_window.x = 560 - @gold_window.width
  364.               if $game_temp.in_battle
  365.                 @gold_window.y = 192
  366.               else
  367.                 @gold_window.y = self.y >= 128 ? 32 : 384
  368.               end
  369.               @gold_window.opacity = self.opacity
  370.               @gold_window.back_opacity = self.back_opacity
  371.             end
  372.             c = ""
  373.           end
  374.           if c == "\003"
  375.             @now_text.sub!(/\[([0-9]+)\]/, "")
  376.             speed = $1.to_i
  377.             if speed >= 0 and speed <= 19
  378.               @write_speed = speed
  379.             end
  380.             c = ""
  381.           end
  382.           if c == "\004"
  383.             @now_text.sub!(/\[(.*?)\]/, "")
  384.             buftxt = $1.dup.to_s
  385.             if buftxt.match(/\//) == nil and buftxt != "" then
  386.               $game_system.soundname_on_speak = "Audio/SE/" + buftxt
  387.             else
  388.               $game_system.soundname_on_speak = buftxt.dup
  389.             end
  390.             c = ""
  391.           elsif c == "\004"
  392.             c = ""
  393.           end
  394.           if c == "\005"
  395.             @write_wait += 5
  396.             c = ""
  397.           end
  398.           if c == "\006"
  399.             @write_wait += 20
  400.             c = ""
  401.           end
  402.           if c == "\016"
  403.             text_not_skip = false
  404.             c = ""
  405.           end
  406.           if c == "\017"
  407.             text_not_skip = true
  408.             c = ""
  409.           end
  410.           if c == "\020"
  411.             @mid_stop = true
  412.             c = ""
  413.           end
  414.           if c == "\021"
  415.             terminate_message
  416.             return
  417.           end
  418.           if c == "\023"
  419.             @indent = @x
  420.             c = ""
  421.           end
  422.           if c == "\024"
  423.             @now_text.sub!(/\[([0-9]+)\]/, "")
  424.             @opacity = $1.to_i
  425.             c = ""
  426.           end
  427.           if c == "\025"
  428.             @now_text.sub!(/\[([0-9]+)\]/, "")
  429.             self.contents.font.size = [[$1.to_i, 6].max, 32].min
  430.             c = ""
  431.           end
  432.           if c == "\026"
  433.             @now_text.sub!(/\[([0-9]+)\]/, "")
  434.             @x += $1.to_i
  435.             c = ""
  436.           end
  437.           if c == "\027"
  438.             @now_text.sub!(/\[(.*?)\]/, "")
  439.             @x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
  440.             if $game_system.soundname_on_speak != ""
  441.               Audio.se_play($game_system.soundname_on_speak)
  442.             end
  443.             c = ""
  444.           end
  445.           if c == "\030"
  446.             @now_text.sub!(/\[(.*?)\]/, "")
  447.             self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  448.            if $game_system.soundname_on_speak != ""
  449.               Audio.se_play($game_system.soundname_on_speak)
  450.             end
  451.             @x += 24
  452.             c = ""
  453.           end
  454.           if c == "\n"
  455.             if @lines >= $game_temp.choice_start
  456.               @cursor_width = [@cursor_width, @max_x - @face_indent].max
  457.             end
  458.             @lines += 1
  459.             @y += 1
  460.             @x = 0 + @indent + @face_indent
  461.             if @lines >= $game_temp.choice_start
  462.               @x = 8 + @indent + @face_indent
  463.             end
  464.             c = ""
  465.           end
  466.           if c != ""
  467.             # 文字描画
  468.             @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), c, @opacity)
  469.             if $game_system.soundname_on_speak != "" then
  470.             Audio.se_play($game_system.soundname_on_speak)
  471.             end
  472.           end
  473.           if Input.press?(Input::B)
  474.             text_not_skip = false
  475.           end
  476.         else
  477.           text_not_skip = true
  478.           break
  479.         end
  480.         # 終了判定
  481.         if text_not_skip
  482.           break
  483.         end
  484.       end
  485.       @write_wait += @write_speed
  486.       return
  487.     end
  488.     if @input_number_window != nil
  489.       @input_number_window.update
  490.       # 決定
  491.       if Input.trigger?(Input::C)
  492.         $game_system.se_play($data_system.decision_se)
  493.         $game_variables[$game_temp.num_input_variable_id] =
  494.         @input_number_window.number
  495.         $game_map.need_refresh = true
  496.         @input_number_window.dispose
  497.         @input_number_window = nil
  498.         terminate_message
  499.       end
  500.       return
  501.     end
  502.     if @contents_showing
  503.       if $game_temp.choice_max == 0
  504.         self.pause = true
  505.       end
  506.       # 取消
  507.       if Input.trigger?(Input::B)
  508.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  509.           $game_system.se_play($data_system.cancel_se)
  510.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  511.           terminate_message
  512.         end
  513.       end
  514.       # 決定
  515.       if Input.trigger?(Input::C)
  516.         if $game_temp.choice_max > 0
  517.           $game_system.se_play($data_system.decision_se)
  518.           $game_temp.choice_proc.call(self.index)
  519.         end
  520.         if @mid_stop
  521.           @mid_stop = false
  522.           return
  523.         else
  524.           terminate_message
  525.         end
  526.       end
  527.       return
  528.     end
  529.     if @fade_out == false and $game_temp.message_text != nil
  530.       @contents_showing = true
  531.       $game_temp.message_window_showing = true
  532.       refresh
  533.       Graphics.frame_reset
  534.       self.visible = true
  535.       @sprite_back_white.visible = true
  536.       self.contents_opacity = 0
  537.     if @input_number_window != nil
  538.       @input_number_window.contents_opacity = 0
  539.     end
  540.       @fade_in = true
  541.       return
  542.     end
  543.     if self.visible
  544.       @fade_out = true
  545.       self.opacity -= 48
  546.       @sprite_back_white.opacity -= 48
  547.       if self.opacity == 0
  548.         self.visible = false
  549.         @sprite_back_white.visible = false
  550.         @fade_out = false
  551.         $game_temp.message_window_showing = false
  552.       end
  553.       return
  554.     end
  555.   end
  556.   #--------------------------------------------------------------------------
  557.   # ● 获得字符
  558.   #--------------------------------------------------------------------------
  559.   def get_character(parameter)
  560.     case parameter
  561.     when 0
  562.       return $game_player
  563.     else
  564.       events = $game_map.events
  565.       return events == nil ? nil : events[parameter]
  566.     end
  567.   end
  568.   #--------------------------------------------------------------------------
  569.   # ● ウィンドウの位置と不透明度の設定
  570.   #--------------------------------------------------------------------------
  571.   def reset_window
  572.     # 判定
  573.     if @popchar >= 0
  574.       events = $game_map.events
  575.       if events != nil
  576.         character = get_character(@popchar)
  577.         x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  578.         y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  579.         self.x = x
  580.         self.y = y
  581.       end
  582.     elsif @popchar == -1
  583.       self.x = -4
  584.       self.y = -4
  585.       self.width = 648
  586.       self.height = 488
  587.     else
  588.       if $game_temp.in_battle
  589.         self.y = 16
  590.       else
  591.         case $game_system.message_position
  592.         when 0 # 上
  593.           self.y = 16
  594.         when 1 # 中
  595.           self.y = 150
  596.         when 2 # 下
  597.           self.y = 308
  598.         end
  599.         self.x = 60
  600.         if @face_file == nil
  601.           self.width = 540
  602.         else
  603.           self.width = 600
  604.           self.x -= 60
  605.         end
  606.         self.height = 150
  607.       end
  608.     end
  609.     self.contents = Bitmap.new(self.width - 32, self.height - 32)   
  610.     self.contents.font.color = Color.new(0, 0, 0, 255)
  611.     if @face_file != nil
  612.       self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  613.     end
  614.     if @popchar == -1
  615.       self.opacity = 0 #255
  616.       @sprite_back_white.opacity = 255
  617.       self.back_opacity = 0
  618.     elsif $game_system.message_frame == 0
  619.       self.opacity = 0 #255
  620.       @sprite_back_white.opacity = 255
  621.       self.back_opacity = 200
  622.     else
  623.       self.opacity = 0
  624.       @sprite_back_white.opacity = 0
  625.       self.back_opacity = 200
  626.     end
  627.   end
  628.   #--------------------------------------------------------------------------
  629.   # ● line_height
  630.   #--------------------------------------------------------------------------
  631.   # 返回値:行高
  632.   #--------------------------------------------------------------------------
  633.   def line_height
  634.     return 28
  635.     if self.contents.font.size >= 20 and self.contents.font.size <= 24
  636.       return 32
  637.     else
  638.       return self.contents.font.size * 15 / 10
  639.     end
  640.   end
  641.   #--------------------------------------------------------------------------
  642.   # ● 透過文字描画
  643.   #--------------------------------------------------------------------------
  644.   # target :描画対象。Bitmapクラスを指定。
  645.   # x :x座標
  646.   # y :y座標
  647.   # str  :描画文字列
  648.   # opacity:透過率(0~255)
  649.   # 返回値 :文字幅(@x増加値)。
  650.   #--------------------------------------------------------------------------
  651.   def opacity_draw_text(target, x, y, str,opacity)
  652.     height = target.font.size
  653.     width = target.text_size(str).width
  654.     opacity = [[opacity, 0].max, 255].min
  655.     if opacity == 255
  656.       target.draw_text(x, y, width, height, str)
  657.       return width
  658.     else
  659.       if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  660.         @opacity_text_buf.dispose
  661.         @opacity_text_buf = Bitmap.new(width, height)
  662.       else
  663.         @opacity_text_buf.clear
  664.       end
  665.       @opacity_text_buf.font.size = target.font.size
  666.       @opacity_text_buf.draw_text(0, 0, width, height, str)
  667.       target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  668.     return width
  669.     end
  670.   end
  671.   def ruby_draw_text(target, x, y, str,opacity)
  672.     sizeback = target.font.size
  673.     target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
  674.     rubysize = [rubysize, 6].max
  675.    
  676.     opacity = [[opacity, 0].max, 255].min
  677.     split_s = str.split(/,/)
  678.    
  679.     split_s[0] == nil ? split_s[0] = "" : nil
  680.     split_s[1] == nil ? split_s[1] = "" : nil
  681.    
  682.     height = sizeback + rubysize
  683.     width = target.text_size(split_s[0]).width
  684.    
  685.     target.font.size = rubysize
  686.     ruby_width = target.text_size(split_s[1]).width
  687.     target.font.size = sizeback
  688.    
  689.     buf_width = [target.text_size(split_s[0]).width, ruby_width].max
  690.    
  691.     width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0
  692.    
  693.     if opacity == 255
  694.       target.font.size = rubysize
  695.       target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
  696.       target.font.size = sizeback
  697.       target.draw_text(x, y, width, target.font.size, split_s[0])
  698.       return width
  699.     else
  700.       if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
  701.         @opacity_text_buf.dispose
  702.         @opacity_text_buf = Bitmap.new(buf_width, height)
  703.       else
  704.         @opacity_text_buf.clear
  705.       end
  706.       @opacity_text_buf.font.size = rubysize
  707.       @opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
  708.       @opacity_text_buf.font.size = sizeback
  709.       @opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
  710.       if sub_x >= 0
  711.         target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  712.       else
  713.         target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  714.       end
  715.       return width
  716.     end
  717.   end
  718.   #--------------------------------------------------------------------------
  719.   # ● \V 变换
  720.   #--------------------------------------------------------------------------
  721.   def convart_value(option, index)
  722.     option == nil ? option = "" : nil
  723.     option.downcase!
  724.     case option
  725.       when "i"
  726.         unless $data_items[index].name == nil
  727.           r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  728.         end
  729.       when "w"
  730.         unless $data_weapons[index].name == nil
  731.           r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  732.         end
  733.       when "a"
  734.         unless $data_armors[index].name == nil
  735.           r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  736.         end
  737.       when "s"
  738.         unless $data_skills[index].name == nil
  739.           r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  740.         end
  741.       else
  742.       r = $game_variables[index]
  743.     end
  744.     r == nil ? r = "" : nil
  745.     return r
  746.   end
  747.   #--------------------------------------------------------------------------
  748.   # ● 解放
  749.   #--------------------------------------------------------------------------
  750.   def dispose
  751.     terminate_message
  752.     if @gaiji_cache != nil
  753.       unless @gaiji_cache.disposed?
  754.         @gaiji_cache.dispose
  755.       end
  756.     end
  757.     unless @opacity_text_buf.disposed?
  758.       @opacity_text_buf.dispose
  759.     end
  760.     $game_temp.message_window_showing = false
  761.     if @input_number_window != nil
  762.       @input_number_window.dispose
  763.     end
  764.     super
  765.   end
  766.   #--------------------------------------------------------------------------
  767.   # ● 矩形更新
  768.   #--------------------------------------------------------------------------
  769.   def update_cursor_rect
  770.     if @index >= 0
  771.       n = $game_temp.choice_start + @index
  772.       self.cursor_rect.set(4 + @indent + @face_indent, n * 28, @cursor_width, 32)
  773.     else
  774.       self.cursor_rect.empty
  775.     end
  776.   end
  777. end
  778. #==============================================================================
  779. # ■ Window_Frame (枠だけで中身の無いウィンドウ)
  780. #==============================================================================
  781. class Window_Frame < Window_Base
  782.   #--------------------------------------------------------------------------
  783.   # ● オブジェクト初期化
  784.   #--------------------------------------------------------------------------
  785.   def initialize(x, y, width, height)
  786.     super(x, y, width, height)
  787.     self.contents = nil
  788.     self.back_opacity = 200
  789.   end
  790.   #--------------------------------------------------------------------------
  791.   # ● 解放
  792.   #--------------------------------------------------------------------------
  793.   def dispose
  794.     super
  795.     end
  796.   end
  797. #==============================================================================
  798. # ■ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  799. #==============================================================================
  800. class Air_Text < Window_Base
  801.   #--------------------------------------------------------------------------
  802.   # ● オブジェクト初期化
  803.   #--------------------------------------------------------------------------
  804.   def initialize(x, y, designate_text)
  805.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  806.     self.opacity = 0
  807.     @sprite_back_white.opacity = 0
  808.     self.back_opacity = 0
  809.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  810.     w = self.contents.width
  811.     h = self.contents.height
  812.     self.contents.draw_text(0, 0, w, h, designate_text)
  813.   end
  814.   #--------------------------------------------------------------------------
  815.   # ● 解放
  816.   #--------------------------------------------------------------------------
  817.   def dispose
  818.     self.contents.clear
  819.     super
  820.   end
  821. end

  822. #==============================================================================
  823. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  824. #==============================================================================
复制代码



这个是对话加强脚本
然后其它的你什么都先别做
只输入文章选项实验
如果可行,在加入原来的那些脚本和素材音效
注意:冲突的脚本可能是你的那些你也说不清的外挂什么的,一般这种问题只要换个工程就可以解决,而且脚本的位置不对有时候会有很大影响
安静的喝水 安静的看着你离开不谈感情 谈色情 PIAO~飞
回复 支持 反对

使用道具 举报

Lv1.梦旅人

孙悟空

梦石
0
星屑
55
在线时间
15 小时
注册时间
2007-8-22
帖子
448
22
 楼主| 发表于 2007-8-29 01:44:22 | 只看该作者
我用的是这个对话脚本啊http://rpg.blue/web/htm/news29.htm
呃……而且……楼上的……………………
说不出为什么,虽然你打了这么多,可不是很满意...对不起.
我都把我用的脚本写出来了啊
就对话加强脚本和外挂的更改“获取普通文字色”这俩
还有,修改普通文字色只是修改了菜单里的普通文字色,对话里的没改
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
453
23
发表于 2007-8-29 02:20:20 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

孙悟空

梦石
0
星屑
55
在线时间
15 小时
注册时间
2007-8-22
帖子
448
24
 楼主| 发表于 2007-8-29 02:24:13 | 只看该作者
以下引用索尔迦·蓝于2007-8-28 18:20:20的发言:


以下引用二胡游于2007-8-28 13:47:39的发言:
全局搜索到两条,全改了,还是米用...
(我是修改成我要的颜色)


全局搜索Color.new(255,255,255,255)全都改成自己要的颜色

很感谢你的解答,都第三页了问题还没解决呵呵..
我按照你的方法搜索了,可提示却是“没有找到指定文本”..
晕??
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
453
25
发表于 2007-8-29 02:26:07 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

孙悟空

梦石
0
星屑
55
在线时间
15 小时
注册时间
2007-8-22
帖子
448
26
 楼主| 发表于 2007-8-29 02:35:06 | 只看该作者
工程很大啊...目前已经100+M了...
本来应该可以搜索到两条,但是现在已经都被我改成我要的颜色了

根据脚本的判定,默认的对话字体颜色是在哪改的啊?
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
453
27
发表于 2007-8-29 02:41:14 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

孙悟空

梦石
0
星屑
55
在线时间
15 小时
注册时间
2007-8-22
帖子
448
28
 楼主| 发表于 2007-8-29 02:45:23 | 只看该作者
发现可疑目标!!
  1. class Window_Base < Window
  2. #--------------------------------------------------------------------------
  3. # ● 获取普通文字色
  4. #--------------------------------------------------------------------------
  5. def normal_color
  6.    return Color.new(255, 255, 200, 255)
  7. end
  8. #--------------------------------------------------------------------------
  9. # ● 获取无效文字色
  10. #--------------------------------------------------------------------------
  11. def disabled_color
  12.    return Color.new(191, 223, 255, 255)
  13. end
  14. #--------------------------------------------------------------------------
  15. # ● 获取系统文字色
  16. #--------------------------------------------------------------------------
  17. def system_color
  18.    return Color.new(255, 156, 27, 255)
  19. end
  20. #--------------------------------------------------------------------------
  21. # ● 获取危机文字色
  22. #--------------------------------------------------------------------------
  23. def crisis_color
  24.    return Color.new(255, 64,  0, 255)
  25. end
  26. #--------------------------------------------------------------------------
  27. # ● 获取战斗不能文字色
  28. #--------------------------------------------------------------------------
  29. def knockout_color
  30.    return Color.new(255, 0, 0)
  31. end
  32. end
复制代码


看第一行!!
不知道class是什么意思,但应该就是这个家伙了!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

孙悟空

梦石
0
星屑
55
在线时间
15 小时
注册时间
2007-8-22
帖子
448
29
 楼主| 发表于 2007-8-29 03:03:04 | 只看该作者
蓝大哥快帮我看看!
是不是这个外挂脚本害的?
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
453
30
发表于 2009-6-12 08:00:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-28 06:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表