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

Project1

 找回密码
 注册会员
搜索
查看: 1324|回复: 1
打印 上一主题 下一主题

[已经过期] 求两个对话框脚本的合并!谢谢啊!

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
55 小时
注册时间
2014-5-12
帖子
59
跳转到指定楼层
1
发表于 2014-6-7 11:50:06 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 [email protected] 于 2014-6-7 14:11 编辑
  1. #——说明
  2. ##这是第一个脚本##################################################################################################################
  3. #默认为一个字一个字的方式,如果需要一次全部显示,
  4. #请在游戏中使用脚本:$game_system.typing = true
  5.       
  6. #默认对话字没有声音,如果需要声音,
  7. #请在游戏中使用脚本:$game_system.soundname_on_speak = "这里输入文件名"
  8.   #我唯一一个见过“胡乱配音”的游戏是天使帝国2代,该游戏说话的时候每个字符随机发一个外星语音

  9. # 其他在对话中可以使用的功能:
  10.   
  11. # \n[1]:显示1号角色的姓名

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

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

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

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

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

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

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

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

  23. # \>   :文字不用打字方式
  24. # \<   :文字使用打字方式

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

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

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

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

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

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

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

  34. # \Lk:清除左边的图像
  35. # \Rk:清除右边的图像
  36. class Game_System
  37.   attr_accessor :typing
  38.   attr_accessor :soundname_on_speak
  39.   alias carol3_ini initialize
  40.   def initialize
  41.     carol3_ini
  42.     @typing = true
  43.     @soundname_on_speak = nil
  44.   end   
  45. end

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

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

  797. =begin
  798. \a[n] : n帧之后自动关闭对话框
  799. \b: Banner mode. 文字将显示在对话框的正中间(横竖都是中间)。
  800. 不能与其他类似功能同用(柳柳按:没什么用处的功能,中文不需要这么排版)
  801. \c[n] 改变为第n种颜色. 使用\d或者\c[0]回复正常颜色。
  802. \d: 回复默认字体、大小、颜色、高度。
  803. \f[n] : 改变为第n种字体,使用\d回复默认字体。
  804. \g : 显示金钱窗口
  805. \h[n] : 改变文字的字沉高度,使用\d或\h[32]回复默认状态
  806.                                                 (柳柳按:这个功能没什么用处)
  807. \j[n] : 显示n象素的空白(柳柳按:对于中文而言无用的功能)
  808. \i[n] : 显示第n号物品的图标和名称
  809.                         (柳柳按:非常有用的功能,用来显示获得的物品感觉很不错!)
  810. \k[n] : 显示第n号特技的图标和名称
  811. \m[n] : 显示第n号防具的图标和名称
  812. \w[n] : 显示第n号武器的图标和名称
  813. \n[n] : 显示第n号英雄名称(柳柳按:就是默认功能)
  814. \o[n] : 更改文字的透明度为n
  815. \r: 右对齐(柳柳按:比较不实用)
  816. \s[n] : 更改字体大小      (柳柳按:不要改得太大,否则会出格,会变丑的^__^)
  817. \v[n] : 显示第n号变量的数值
  818. \x: 居中对齐,必须在一行的开头用(柳柳按:比较不实用。
  819.                                        其实这些排版功能不如打几个空格)
  820. \\ : 显示"\"这个符号
  821. =end
  822. # ----------------------------
  823. class Window_Message < Window_Selectable
  824.   attr_accessor :autoclosetime
  825.   attr_accessor :op
  826.   # ----------------------------
  827.   def initialize
  828.     super(30, 304, 580, 160)
  829.     self.contents = Bitmap.new(width - 32, height - 32)
  830.     self.visible = false
  831.     self.z = 9998
  832.     @fade_in = false
  833.     @fade_out = false
  834.     @contents_showing = false
  835.     @cursor_width = 0
  836. #jksdghaljkfhalskjfh
  837.     @head = Sprite.new
  838. #lkdshfkhashdfiujhadskjf
  839.     @autoclosetime = -1
  840.     @op = 255
  841.     @refreshflag = false
  842.     self.active = false
  843.     self.index = -1
  844.   end
  845. # ----------------------------
  846.   def dispose
  847.     terminate_message
  848.     $game_temp.message_window_showing = false
  849.     if @input_number_window != nil
  850.       @input_number_window.dispose
  851.     end
  852.      #jksdghaljkfhalskjfh
  853.     @head.dispose
  854. #lkdshfkhashdfiujhadskjf
  855.     super
  856.   end
  857.   # ----------------------------
  858.   def terminate_message
  859.     self.active = false
  860.     self.pause = false
  861.     self.index = -1
  862.     self.contents.clear
  863.     @contents_showing = false
  864.     if $game_temp.message_proc != nil
  865.       $game_temp.message_proc.call
  866.     end
  867.     $game_temp.message_text = nil
  868.     $game_temp.message_proc = nil
  869.     $game_temp.choice_start = 99
  870.     $game_temp.choice_max = 0
  871.     $game_temp.choice_cancel_type = 0
  872.     $game_temp.choice_proc = nil
  873.     $game_temp.num_input_start = 99
  874.     $game_temp.num_input_variable_id = 0
  875.     $game_temp.num_input_digits_max = 0
  876.     if @gold_window != nil
  877.       @gold_window.dispose
  878.       @gold_window = nil
  879.     end
  880.        #jksdghaljkfhalskjfh
  881.     if @head.bitmap != nil
  882.        @head.bitmap.dispose
  883.        end
  884. #lkdshfkhashdfiujhadskjf
  885.   end
  886.   # ----------------------------#width-32
  887.   def refresh
  888.     self.contents.clear
  889.   #uidsghljkfn;klnagkmfld;
  890.   #  self.contents.fill_rect(-25,0,430,height-32,Color.new(0,100,255,180))
  891.     #klsdh;ghsf;hg;jkdfh;gkjn;fdkls
  892.     self.contents.font.color = normal_color
  893.     self.contents.font.name = "黑体"
  894.     self.contents.font.size = 24
  895.     x = y = 0
  896.     @cursor_width = 0
  897.     @autoclosetime = -1
  898.     @refreshflag = true
  899.     lineheight = 32
  900.     active = ""
  901.     a = ""
  902.     centerflag = false
  903.     rightflag = false
  904.     bannerflag = false
  905.     if $game_temp.choice_start == 0
  906.       x = 8
  907.     end
  908.     if $game_temp.message_text != nil
  909.       text = $game_temp.message_text
  910.       begin
  911.         last_text = text.clone
  912.         text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  913.       end until text == last_text
  914.       text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  915.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  916.       end
  917.       text.gsub!(/\\\\/) { "\000" }
  918.       text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  919.     #fl;skjahlkf;j;aosjffdas
  920.       text.gsub!(/\\[Ll]\[([0-9]+)\]/) { "\001[#{$1}]" }
  921.       if $1 != nil
  922.        head = $1.to_s
  923.        @head.bitmap = Bitmap.new("Graphics/#{head}_b")
  924.        end
  925.       text.gsub!(/\003]\[([0-9]+)\]/) { "" }
  926.      #khsadoifhaofnjkdg
  927.       text.gsub!(/\\[Gg]/) { "\002" }
  928.       text.gsub!(/\\[Ii]\[([0-9]+)\]/) { "\003[#{$1}]" }
  929.       text.gsub!(/\\[Ff]\[([0-9]+)\]/) { "\004[#{$1}]" }
  930.       text.gsub!(/\\[Aa]\[([0-9]+)\]/) { "\005[#{$1}]" }
  931.       text.gsub!(/\\[Xx]/) { "\006" }
  932.       text.gsub!(/\\[Rr]/) { "\007" }
  933.       text.gsub!(/\\[Dd]/) { "\011" }
  934.       text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\023[#{$1}]" }
  935.       text.gsub!(/\\[Bb]/) { "\017" }
  936.       text.gsub!(/\\[Ww]\[([0-9]+)\]/) { "\014[#{$1}]" }
  937.       text.gsub!(/\\[Mm]\[([0-9]+)\]/) { "\015[#{$1}]" }
  938.       text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\016[#{$1}]" }
  939.       text.gsub!(/\\[Jj]\[([0-9]+)\]/) { "\013[#{$1}]" }
  940.       text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\021[#{$1}]" }
  941.       text.gsub!(/\\[Kk]\[([0-9]+)\]/) { "\022[#{$1}]" }
  942.       while ((c = text.slice!(/./m)) != nil)
  943.         if c == "\000"
  944.           c = "\\"
  945.         end
  946.         if c == "\001"
  947.           text.sub!(/\[([0-9]+)\]/, "")
  948.           color = $1.to_i
  949.           if color >= 0 and color <= 10
  950.             self.contents.font.color = text_color(color)
  951.           end
  952.           next
  953.         end
  954.         if c == "\002"
  955.           if @gold_window == nil
  956.             @gold_window = Window_Gold.new
  957.             #@gold_window.x = 560 - @gold_window.width
  958.               @gold_window.x = 125
  959.             #加y
  960.             @gold_window.y = 305
  961.             #完
  962.            # if $game_temp.in_battle
  963.             #  @gold_window.y = 192
  964.             #else
  965.              # @gold_window.y = self.y >= 128 ? 32 : 384
  966.             #end
  967.             @gold_window.opacity = self.opacity
  968.             @gold_window.back_opacity = self.back_opacity
  969.           end
  970.           next
  971.         end
  972.         if c == "\003"
  973.           text.sub!(/\[([0-9]+)\]/, "")
  974.           item_sub = $1.to_i
  975.           c = $data_items[item_sub].name
  976.           l = self.contents.text_size(c).width
  977.           draw_item_name($data_items[item_sub], x, y * 32 + 1)
  978.           x = x + l + 24
  979.           next
  980.         end
  981.         if c == "\004"
  982.           text.sub!(/\[([0-9]+)\]/, "")
  983.           fontize = $1.to_i
  984.          case fontize
  985.           when 1
  986.            self.contents.font.name = "黑体"
  987.           when 2
  988.             self.contents.font.name = "High Tower Text"
  989.           when 3
  990.             self.contents.font.name = "Tw Cen MT"
  991.           when 4
  992.            self.contents.font.name = "Tahoma"
  993.              end
  994.           next
  995.         end
  996.         if c == "\005"
  997.           text.sub!(/\[([0-9]+)\]/, "")
  998.           @autoclosetime = $1.to_i
  999.           next
  1000.         end
  1001.         if c == "\006"
  1002.           centerflag = true
  1003.           next
  1004.         end
  1005.         if c == "\007"
  1006.           rightflag = true
  1007.           next
  1008.         end
  1009.         if c == "\011"
  1010.           self.contents.font.name = "黑体"
  1011.           self.contents.font.size = 18
  1012.           self.contents.font.color = normal_color
  1013.           lineheight = 32
  1014.           next
  1015.         end
  1016.         if c == "\014"
  1017.           text.sub!(/\[([0-9]+)\]/, "")
  1018.           w_sub = $1.to_i
  1019.           c = $data_weapons[w_sub].name
  1020.           l = self.contents.text_size(c).width
  1021.           bitmap = RPG::Cache.icon($data_weapons[w_sub].icon_name)
  1022.           self.contents.blt(x+4, y * 32+ 4, bitmap, Rect.new(0, 0, 24, 24))
  1023.           x += 28
  1024.           self.contents.draw_text(x+4, 32 * y, l+32, lineheight, c)
  1025.           x = x + l
  1026.           next
  1027.         end
  1028.         if c == "\015"
  1029.           text.sub!(/\[([0-9]+)\]/, "")
  1030.           a_sub = $1.to_i
  1031.           c = $data_armors[a_sub].name
  1032.           l = self.contents.text_size(c).width
  1033.           bitmap = RPG::Cache.icon($data_armors[a_sub].icon_name)
  1034.           self.contents.blt(x+4, y * 32+ 4, bitmap, Rect.new(0, 0, 24, 24))
  1035.           x += 28
  1036.           self.contents.draw_text(x+4, 32 * y, l+32, lineheight, c)
  1037.           x = x + l
  1038.           next
  1039.         end
  1040.         if c == "\016"
  1041.           text.sub!(/\[([0-9]+)\]/, "")
  1042.           @op = $1.to_i
  1043.           next
  1044.         end
  1045.         if c == "\017"
  1046.           bannerflag = true
  1047.           next
  1048.         end
  1049.         if c == "\018"
  1050.           text.sub!(/\[([0-9]+)\]/, "")
  1051.           jump = $1.to_i
  1052.           x += jump
  1053.           next
  1054.         end
  1055.         if c == "\021"
  1056.           text.sub!(/\[([0-9]+)\]/, "")
  1057.           lineheight = $1.to_i
  1058.           next
  1059.         end
  1060.         if c == "\022"
  1061.           text.sub!(/\[([0-9]+)\]/, "")
  1062.           skill_sub = $1.to_i
  1063.           c = $data_skills[skill_sub].name
  1064.           l = self.contents.text_size(c).width
  1065.           bitmap = RPG::Cache.icon($data_skills[skill_sub].icon_name)
  1066.           self.contents.blt(x+4, y * 32+ 4, bitmap, Rect.new(0, 0, 24, 24))
  1067.           x += 28
  1068.           self.contents.draw_text(x+4, 32 * y, l+32, lineheight, c)
  1069.           x = x + l
  1070.           next
  1071.         end
  1072.         if c == "\023"
  1073.           text.sub!(/\[([0-9]+)\]/, "")
  1074.           bigness = $1.to_i
  1075.           self.contents.font.size = bigness
  1076.           next
  1077.         end
  1078.         if c == "\n"
  1079.           if centerflag == true
  1080.             x = 448 - x
  1081.             x = x / 2
  1082.             self.contents.draw_text(x, 32 * y, 448-x, lineheight, a)
  1083.           end
  1084.           if rightflag == true
  1085.             x = 448 - x
  1086.             self.contents.draw_text(x, 32 * y, 448-x, lineheight, a)
  1087.           end
  1088.           if bannerflag == true
  1089.             x = 448 - x
  1090.             x = x / 2
  1091.             self.contents.draw_text(x, 44, 448-x, lineheight, a)
  1092.           end
  1093.           a = ""
  1094.           centerflag = false
  1095.           rightflag = false
  1096.           bannerflag = false
  1097.           if y >= $game_temp.choice_start
  1098.             @cursor_width = [@cursor_width, x].max
  1099.           end
  1100.           y += 1
  1101.           x = 0
  1102.           if y >= $game_temp.choice_start
  1103.             x = 8
  1104.           end
  1105.           next
  1106.         end
  1107.         if centerflag == false && rightflag == false && bannerflag == false
  1108.           self.contents.draw_text(4 + x, 32 * y, 40, lineheight, c)
  1109.           x += self.contents.text_size(c).width
  1110.         else
  1111.           a += c
  1112.           x += self.contents.text_size(c).width
  1113.         end
  1114.       end
  1115.     end
  1116.     if $game_temp.choice_max > 0
  1117.       @item_max = $game_temp.choice_max
  1118.       self.active = true
  1119.       self.index = 0
  1120.     end
  1121.     if $game_temp.num_input_variable_id > 0
  1122.       digits_max = $game_temp.num_input_digits_max
  1123.       number = $game_variables[$game_temp.num_input_variable_id]
  1124.       @input_number_window = Window_InputNumber.new(digits_max)
  1125.       @input_number_window.number = number
  1126.       @input_number_window.x = self.x + 8
  1127.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  1128.     end
  1129.   end
  1130.   # ----------------------------
  1131.   def reset_window
  1132.     if $game_temp.in_battle
  1133.       self.y = 16
  1134.     else
  1135.       case $game_system.message_position
  1136.       when 0
  1137.         self.y = 16
  1138.       when 1
  1139.         self.y = 160
  1140.       when 2
  1141.         self.y = 304
  1142.       end
  1143.     end
  1144.     if $game_system.message_frame == 0
  1145.       self.opacity = 255
  1146.     else
  1147.       self.opacity = 0
  1148.     end
  1149.     self.back_opacity = 160
  1150.   end
  1151.   # ----------------------------  
  1152.   def update
  1153.     super
  1154.     if @refreshflag && @fade_in == false
  1155.       self.contents_opacity = @op
  1156.     end
  1157.     if @autoclosetime == 0
  1158.       @autoclosetime = -1
  1159.       terminate_message
  1160.     end
  1161.     if @autoclosetime >= 1
  1162.       @autoclosetime -= 1
  1163.     end
  1164.     if @fade_in
  1165.       self.contents_opacity += 24
  1166.       if @input_number_window != nil
  1167.         @input_number_window.contents_opacity += 24
  1168.       end
  1169.       #sdkfgouiasgdfdpihasdfpihdaspf
  1170.       @head.x += 5
  1171.       #lsdhfiuhiasoudhfiudsahfpias
  1172.       if self.contents_opacity >= @op
  1173.         @fade_in = false
  1174.       end
  1175.       return
  1176.     end
  1177.     if @input_number_window != nil
  1178.       @input_number_window.update
  1179.       if Input.trigger?(Input::C)
  1180.         $game_system.se_play($data_system.decision_se)
  1181.         $game_variables[$game_temp.num_input_variable_id] =
  1182.           @input_number_window.number
  1183.         $game_map.need_refresh = true
  1184.         @input_number_window.dispose
  1185.         @input_number_window = nil
  1186.         terminate_message
  1187.       end
  1188.       return
  1189.     end
  1190.     if @contents_showing
  1191.       if $game_temp.choice_max == 0
  1192.         self.pause = true
  1193.       end
  1194.       if Input.trigger?(Input::B)
  1195.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1196.           $game_system.se_play($data_system.cancel_se)
  1197.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1198.           terminate_message
  1199.         end
  1200.       end
  1201.       if Input.trigger?(Input::C)
  1202.         if $game_temp.choice_max > 0
  1203.           $game_system.se_play($data_system.decision_se)
  1204.           $game_temp.choice_proc.call(self.index)
  1205.         end
  1206.         @op = 255
  1207.         terminate_message
  1208.       end
  1209.       return
  1210.     end
  1211.     if @fade_out == false and $game_temp.message_text != nil
  1212.       @contents_showing = true
  1213.       $game_temp.message_window_showing = true
  1214.       reset_window
  1215.       refresh
  1216.       Graphics.frame_reset
  1217.       self.visible = true
  1218.       self.contents_opacity = 0
  1219.       if @input_number_window != nil
  1220.         @input_number_window.contents_opacity = 0
  1221.       end
  1222.       @fade_in = true
  1223.       return
  1224.     end
  1225.     if self.visible
  1226.       @fade_out = true
  1227.       self.opacity -= 48
  1228.       if self.opacity == 0
  1229.         self.visible = false
  1230.         @fade_out = false
  1231.         $game_temp.message_window_showing = false
  1232.       end
  1233.              return
  1234.     end
  1235.   end
  1236.   # ----------------------------
  1237.   def update_cursor_rect
  1238.     if @index >= 0
  1239.       n = $game_temp.choice_start + @index
  1240.       self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  1241.     else
  1242.       self.cursor_rect.empty
  1243.     end
  1244.   end
  1245. end
复制代码
那个为什么第一个脚本改不了对话框的颜色与大小呢?我改了好几次都不行,才又找到了第二个脚本!
  

Lv1.梦旅人

梦石
0
星屑
85
在线时间
578 小时
注册时间
2010-6-29
帖子
365
2
发表于 2014-6-7 14:02:14 | 只看该作者
第二个用的好像是VX的算法?第二个应该有类似于下面这个图片配套的素材吧

下面的一堆马赛克色块就是指定的颜色,把对应色块填充进别的颜色就能改字体了

点评

嗯!……我好想说反了!我用的是第二个脚本!汗!我想在第二个脚本加一下【# \name[李逍遥]:显示“李逍遥”方框,表示说话人姓名】这个功能!  发表于 2014-6-7 14:11
为了四公主苦逼赚钱中。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-22 21:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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