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

Project1

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

[已经解决] 求黑圣梦境回天的字幕脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2009-7-6
帖子
171
跳转到指定楼层
1
发表于 2010-7-25 19:35:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
RT
哪位好心人可以发我下脚本 我从黑圣里找不出来= =

点评

楼主不懂可以用图片文字代替的吗,抱歉刚才打错字  发表于 2010-10-4 10:42
楼主不懂可以用如片文字代替的吗  发表于 2010-10-4 10:42

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2009-7-6
帖子
171
2
 楼主| 发表于 2010-7-26 16:46:34 | 只看该作者
OTZ 没人鸟我么
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
29 小时
注册时间
2010-7-5
帖子
483
3
发表于 2010-7-26 18:37:14 | 只看该作者
没有
回复 支持 反对

使用道具 举报

Lv1.梦旅人

剑仙·影羽

梦石
0
星屑
172
在线时间
224 小时
注册时间
2010-3-20
帖子
1580
4
发表于 2010-7-26 18:38:20 | 只看该作者
本帖最后由 火ZHI意志 于 2010-7-26 18:54 编辑

梦境回天里的是用显示文章,不需要脚本………………
更改文章选项:中,不显示
就OK了
最后改回:下,显示
就OK了

——至今为止,谁也没能分析出他们为什么会因为说了这些话而死。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2009-7-6
帖子
171
5
 楼主| 发表于 2010-7-27 10:10:37 | 只看该作者
= = 不一样 梦境回天字幕跟电影字幕一样 自定义颜色与时间
RM自带的对话系统办不到
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1558
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

6
发表于 2010-7-27 11:35:33 | 只看该作者
  1. #==============================================================================
  2. # ■ Window_Message
  3. #------------------------------------------------------------------------------
  4. #  显示文章的信息窗口。
  5. #==============================================================================

  6. class Window_Message < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化状态
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(80, 304, 640, 160)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     self.visible = false
  14.     self.z = 9998
  15.     @fade_in = false
  16.     @fade_out = false
  17.     @contents_showing = false
  18.     @cursor_width = 0
  19.     self.active = false
  20.     self.index = -1
  21.     @wait_dispose = 0
  22.     @fade_d = false
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 释放
  26.   #--------------------------------------------------------------------------
  27.   def dispose
  28.     terminate_message
  29.     $game_temp.message_window_showing = false
  30.     if @input_number_window != nil
  31.       @input_number_window.dispose
  32.     end
  33.     super
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # ● 处理信息结束
  37.   #--------------------------------------------------------------------------
  38.   def terminate_message
  39.     self.active = false
  40.     self.pause = false
  41.     self.index = -1
  42.     self.contents.clear
  43.     # 清除显示中标志
  44.     @contents_showing = false
  45.     # 呼叫信息调用
  46.     if $game_temp.message_proc != nil
  47.       $game_temp.message_proc.call
  48.     end
  49.     # 清除文章、选择项、输入数值的相关变量
  50.     $game_temp.message_text = nil
  51.     $game_temp.message_proc = nil
  52.     $game_temp.choice_start = 99
  53.     $game_temp.choice_max = 0
  54.     $game_temp.choice_cancel_type = 0
  55.     $game_temp.choice_proc = nil
  56.     $game_temp.num_input_start = 99
  57.     $game_temp.num_input_variable_id = 0
  58.     $game_temp.num_input_digits_max = 0
  59.     # 开放金钱窗口
  60.     if @gold_window != nil
  61.       @gold_window.dispose
  62.       @gold_window = nil
  63.     end
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● 刷新
  67.   #--------------------------------------------------------------------------
  68.   def refresh
  69.     self.contents.clear
  70.     self.contents.font.color = normal_color
  71.     x = y = 0
  72.     @cursor_width = 0
  73.     @wait_dispose = [$game_temp.message_text.size * 2,24].max
  74.     # 到选择项的下一行字
  75.     if $game_temp.choice_start == 0
  76.       x = 8
  77.     end
  78.     # 有等待显示的文字的情况下
  79.     if $game_temp.message_text != nil
  80.       text = $game_temp.message_text
  81.       # 限制文字处理
  82.       begin
  83.         last_text = text.clone
  84.         text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  85.       end until text == last_text
  86.       text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  87.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  88.       end
  89.       # 为了方便、将 "\\\\" 变换为 "\000"
  90.       text.gsub!(/\\\\/) { "\000" }
  91.       # "\\C" 变为 "\001" に、"\\G" 变为 "\002"
  92.       text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  93.       text.gsub!(/\\[Gg]/) { "\002" }
  94.       # c 获取 1 个字 (如果不能取得文字就循环)
  95.       while ((c = text.slice!(/./m)) != nil)
  96.         # \\ 的情况下
  97.         if c == "\000"
  98.           # 还原为本来的文字
  99.           c = "\\"
  100.         end
  101.         # \C[n] 的情况下
  102.         if c == "\001"
  103.           # 更改文字色
  104.           text.sub!(/\[([0-9]+)\]/, "")
  105.           color = $1.to_i
  106.           if color >= 0 and color <= 7
  107.             self.contents.font.color = text_color(color)
  108.           end
  109.           # 下面的文字
  110.           next
  111.         end
  112.         # \G 的情况下
  113.         if c == "\002"
  114.           # 生成金钱窗口
  115.           if @gold_window == nil
  116.             @gold_window = Window_Gold.new
  117.             @gold_window.x = 560 - @gold_window.width
  118.             if $game_temp.in_battle
  119.               @gold_window.y = 192
  120.             else
  121.               @gold_window.y = self.y >= 128 ? 32 : 384
  122.             end
  123.             @gold_window.opacity = self.opacity
  124.             @gold_window.back_opacity = self.back_opacity
  125.           end
  126.           # 下面的文字
  127.           next
  128.         end
  129.         # 另起一行文字的情况下
  130.         if c == "\n"
  131.           # 刷新选择项及光标的高
  132.           if y >= $game_temp.choice_start
  133.             @cursor_width = [@cursor_width, x].max
  134.           end
  135.           # y 加 1
  136.           y += 1
  137.           x = 0
  138.           # 移动到选择项的下一行
  139.           if y >= $game_temp.choice_start
  140.             x = 8
  141.           end
  142.           # 下面的文字
  143.           next
  144.         end
  145.         # 描绘文字
  146.         self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  147.         # x 为要描绘文字的加法运算
  148.         x += self.contents.text_size(c).width
  149.       end
  150.     end
  151.     # 选择项的情况
  152.     if $game_temp.choice_max > 0
  153.       @item_max = $game_temp.choice_max
  154.       self.active = true
  155.       self.index = 0
  156.     end
  157.     # 输入数值的情况
  158.     if $game_temp.num_input_variable_id > 0
  159.       digits_max = $game_temp.num_input_digits_max
  160.       number = $game_variables[$game_temp.num_input_variable_id]
  161.       @input_number_window = Window_InputNumber.new(digits_max)
  162.       @input_number_window.number = number
  163.       @input_number_window.x = self.x + 8
  164.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  165.     end
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # ● 设置窗口位置与不透明度
  169.   #--------------------------------------------------------------------------
  170.   def reset_window
  171.     $game_temp.message_text.gsub!(/\n/) {""}
  172.     text = $game_temp.message_text.clone
  173.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "" }
  174.     x = text.size/3
  175.     self.x = (640 - 22 * x) / 2 - 16
  176.     if $game_temp.in_battle
  177.       self.y = 16
  178.     else
  179.       case $game_system.message_position
  180.       when 0  # 上
  181.         self.y = 16
  182.       when 1  # 中
  183.         self.y = 160
  184.       when 2  # 下
  185.         self.y = 420
  186.       end
  187.     end
  188.     if $game_system.message_frame == 0
  189.       self.opacity = 255
  190.     else
  191.       self.opacity = 0
  192.     end
  193.     self.back_opacity = 160
  194.   end
  195.   #--------------------------------------------------------------------------
  196.   # ● 刷新画面
  197.   #--------------------------------------------------------------------------
  198.   def update
  199.     super
  200.     @wait_dispose -= 1 if @contents_showing
  201.     # 渐变的情况下
  202.     if @fade_d
  203.       self.contents_opacity -= 24
  204.       if self.contents_opacity == 0
  205.         @fade_d = false
  206.         terminate_message
  207.       end
  208.     end
  209.     if @fade_in
  210.       self.contents_opacity += 24
  211.       if @input_number_window != nil
  212.         @input_number_window.contents_opacity += 24
  213.       end
  214.       if self.contents_opacity == 255
  215.         @fade_in = false
  216.       end
  217.       return
  218.     end
  219.     # 输入数值的情况下
  220.     if @input_number_window != nil
  221.       @input_number_window.update
  222.       # 确定
  223.       if Input.trigger?(Input::C)
  224.         $game_system.se_play($data_system.decision_se)
  225.         $game_variables[$game_temp.num_input_variable_id] =
  226.           @input_number_window.number
  227.         $game_map.need_refresh = true
  228.         # 释放输入数值窗口
  229.         @input_number_window.dispose
  230.         @input_number_window = nil
  231.         terminate_message
  232.       end
  233.       return
  234.     end
  235.     # 显示信息中的情况下
  236.     if @contents_showing
  237.       # 如果不是在显示选择项中就显示暂停标志
  238.       if $game_temp.choice_max == 0
  239.         self.pause = true
  240.       end
  241.       # 取消
  242.       if 0#Input.trigger?(Input::B)
  243.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  244.           $game_system.se_play($data_system.cancel_se)
  245.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  246.           terminate_message
  247.         end
  248.       end
  249.       # 确定
  250.       if @wait_dispose <= 0#Input.trigger?(Input::C)
  251.         if $game_temp.choice_max > 0
  252.           $game_system.se_play($data_system.decision_se)
  253.           $game_temp.choice_proc.call(self.index)
  254.         end
  255.         @fade_d = true
  256.       end
  257.       return
  258.     end
  259.     # 在渐变以外的状态下有等待显示的信息与选择项的场合
  260.     if @fade_out == false and $game_temp.message_text != nil
  261.       @contents_showing = true
  262.       $game_temp.message_window_showing = true
  263.       reset_window
  264.       refresh
  265.       Graphics.frame_reset
  266.       self.visible = true
  267.       self.contents_opacity = 0
  268.       if @input_number_window != nil
  269.         @input_number_window.contents_opacity = 0
  270.       end
  271.       @fade_in = true
  272.       return
  273.     end
  274.     # 没有可以显示的信息、但是窗口为可见的情况下
  275.     if self.visible
  276.       @fade_out = true
  277.       self.opacity -= 48
  278.       if self.opacity == 0
  279.         self.visible = false
  280.         @fade_out = false
  281.         $game_temp.message_window_showing = false
  282.       end
  283.       return
  284.     end
  285.   end
  286.   #--------------------------------------------------------------------------
  287.   # ● 刷新光标矩形
  288.   #--------------------------------------------------------------------------
  289.   def update_cursor_rect
  290.     if @index >= 0
  291.       n = $game_temp.choice_start + @index
  292.       self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  293.     else
  294.       self.cursor_rect.empty
  295.     end
  296.   end
  297. end
复制代码
呜哇,不要啊……那是我参赛R剧的脚本啊TAT
74行
@wait_dispose = [$game_temp.message_text.size * 2,24].max
中的2是每个字的帧数,默认消失时间为 字数*2帧 和 24 中的最大值,可以把2修改成其他值
[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2009-7-6
帖子
171
7
 楼主| 发表于 2010-7-27 11:46:24 | 只看该作者
在使用前用脚本 $msg=401么?
你要拿这个做R剧么
话说我也想鼓捣一个R剧 懒得找素材就像用字幕= =
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1558
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

8
发表于 2010-7-27 11:52:55 | 只看该作者
什么都不用……因为这样的话所有的对话都是字幕……
另:会自动删除换行,自动居中

点评

当年咱貌似还不会脚本的说= =|||  发表于 2010-7-27 12:23
当年做游戏时小豫豫在就好了TAT  发表于 2010-7-27 11:57
[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2009-7-6
帖子
171
9
 楼主| 发表于 2010-7-27 12:56:33 | 只看该作者
  1. # ----------------------------
  2. class Window_Message < Window_Selectable
  3. #\a[n] : n针自动关闭

  4. #\b:  路标

  5. #\c[n] 8种颜色,\d or \c[0]还原

  6. #\d: 还原字体大小颜色高度成默认

  7. #\f[n] : 使用第n种字体

  8. #\g : 显示金钱

  9. #\h[n] : 改变字高度, \d or \h[32] 还原

  10. #\i[n] : Shows the icon and item name of the item with ID n
  11. #\j[n] : Puts n pixels of whitespace at the current position within the message. Useful if you want precise spacing rather than relying on the font's space length.
  12. #\k[n] : Shows the icon and skill name of the skill with ID n.
  13. #\w[n] : Shows the icon and weapon name of the weapon with ID n.
  14. #\m[n] : Shows the icon and armor name of the armor with ID n.

  15. #\n[n] : Shows the name of the hero with ID n.
  16. #\o[n] : The alpha of the window text is n for this message.
  17. #\r: Right-justifies the text on this line. Must be the first thing in the line.

  18. #\s[n] : 改变字体大小!

  19. #\v[n] : 显示变量n的值

  20. #\x: 中心对齐

  21. #\\ : Prints the "\" character.
  22.   
  23.   
  24.   
  25.   
  26.   
  27.   
  28.   
  29.   
  30.   
  31.   
  32.   
  33.   
  34.   
  35.   
  36.   attr_accessor :autoclosetime
  37.   attr_accessor :op
  38. # ----------------------------
  39.   def initialize
  40.     super(80, 304, 480, 160)
  41.     self.contents = Bitmap.new(width - 32, height - 32)
  42.     self.visible = false
  43.     self.z = 9998
  44.     @fade_in = false
  45.     @fade_out = false
  46.     @contents_showing = false
  47.     @cursor_width = 0
  48.     @autoclosetime = -1
  49.     @op = 255
  50.     @refreshflag = false
  51.     self.active = false
  52.     self.index = -1
  53.   end
  54. # ----------------------------
  55.   def dispose
  56.     terminate_message
  57.     $game_temp.message_window_showing = false
  58.     if @input_number_window != nil
  59.       @input_number_window.dispose
  60.     end
  61.     super
  62.   end
  63. # ----------------------------
  64.   def terminate_message
  65.     self.active = false
  66.     self.pause = false
  67.     self.index = -1
  68.     self.contents.clear
  69.     @contents_showing = false
  70.     if $game_temp.message_proc != nil
  71.       $game_temp.message_proc.call
  72.     end
  73.     $game_temp.message_text = nil
  74.     $game_temp.message_proc = nil
  75.     $game_temp.choice_start = 99
  76.     $game_temp.choice_max = 0
  77.     $game_temp.choice_cancel_type = 0
  78.     $game_temp.choice_proc = nil
  79.     $game_temp.num_input_start = 99
  80.     $game_temp.num_input_variable_id = 0
  81.     $game_temp.num_input_digits_max = 0
  82.     if @gold_window != nil
  83.       @gold_window.dispose
  84.       @gold_window = nil
  85.     end
  86.   end
  87. # ----------------------------
  88.   def refresh
  89.     self.contents.clear
  90.     self.contents.font.color = normal_color
  91.     self.contents.font.name = "黑体"
  92.     self.contents.font.size = 18
  93.     x = y = 0
  94.     @cursor_width = 0
  95.     @autoclosetime = -1
  96.     @refreshflag = true
  97.     lineheight = 32
  98.     active = ""
  99.     a = ""
  100.     centerflag = false
  101.     rightflag = false
  102.     bannerflag = false
  103.     if $game_temp.choice_start == 0
  104.       x = 8
  105.     end
  106.     if $game_temp.message_text != nil
  107.       text = $game_temp.message_text
  108.       begin
  109.       last_text = text.clone
  110.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  111.       end until text == last_text
  112.       text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  113.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  114.       end
  115.       text.gsub!(/\\\\/) { "\000" }
  116.       text.gsub!(/\\[Cc]\[([0123456789ABCDEFx]+)\]/) { "\001[#{$1}]" }
  117.       text.gsub!(/\\[Gg]/) { "\002" }
  118.       text.gsub!(/\\[Ii]\[([0-9]+)\]/) { "\003[#{$1}]" }
  119.       text.gsub!(/\\[Ff]\[([0-9]+)\]/) { "\004[#{$1}]" }
  120.       text.gsub!(/\\[Aa]\[([0-9]+)\]/) { "\005[#{$1}]" }
  121.       text.gsub!(/\\[Xx]/) { "\006" }
  122.       text.gsub!(/\\[Rr]/) { "\007" }
  123.       text.gsub!(/\\[Dd]/) { "\011" }
  124.       text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\023[#{$1}]" }
  125.       text.gsub!(/\\[Bb]/) { "\017" }
  126.       text.gsub!(/\\[Ww]\[([0-9]+)\]/) { "\014[#{$1}]" }
  127.       text.gsub!(/\\[Mm]\[([0-9]+)\]/) { "\015[#{$1}]" }
  128.       text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\016[#{$1}]" }
  129.       text.gsub!(/\\[Jj]\[([0-9]+)\]/) { "\013[#{$1}]" }
  130.       text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\021[#{$1}]" }
  131.       text.gsub!(/\\[Kk]\[([0-9]+)\]/) { "\022[#{$1}]" }
  132.       while ((c = text.slice!(/./m)) != nil)
  133.         if c == "\000"
  134.           c = "\\"
  135.         end
  136.         if c == "\001"
  137.           text.sub!(/\[([0123456789ABCDEFx]+)\]/, "")
  138.           temp_color = $1
  139.           color = temp_color.to_i
  140.           leading_x = temp_color.to_s.slice!(/./m)
  141.           if leading_x == "x"
  142.             self.contents.font.color = hex_color(temp_color)
  143.             next
  144.           end
  145.           if color >= 0 and color <= 7
  146.             self.contents.font.color = text_color(color)
  147.           end
  148.           next
  149.         end

  150.         if c == "\002"
  151.           if @gold_window == nil
  152.             @gold_window = Window_Change.new
  153.             @gold_window.x = 330  
  154.             @gold_window.y = 40
  155.             @gold_window.opacity = self.opacity
  156.             @gold_window.back_opacity = self.back_opacity
  157.           end
  158.           next
  159.         end
  160.           if c == "\003"
  161.           text.sub!(/\[([0-9]+)\]/, "")
  162.           item_sub = $1.to_i
  163.           c = $data_items[item_sub].name
  164.           l = self.contents.text_size(c).width
  165.           draw_item_name($data_items[item_sub], x, y * 32 + 1)
  166.           x = x + l + 24
  167.           next
  168.         end
  169.          if c == "\004"
  170.           text.sub!(/\[([0-9]+)\]/, "")
  171.           fontize = $1.to_i
  172.           case fontize
  173.             when 1
  174.               self.contents.font.name = "黑体"
  175.             when 2
  176.               self.contents.font.name = "宋体"
  177.             when 3
  178.               self.contents.font.name = "宋体"
  179.             when 4
  180.               self.contents.font.name = "楷体_GB2312"
  181.           end
  182.           next
  183.         end
  184.          if c == "\005"
  185.           text.sub!(/\[([0-9]+)\]/, "")
  186.           @autoclosetime = $1.to_i
  187.           next
  188.         end
  189.         if c == "\006"
  190.           centerflag = true
  191.           next
  192.         end
  193.         if c == "\007"
  194.           rightflag = true
  195.           next
  196.         end
  197.         if c == "\011"
  198.           self.contents.font.name = "黑体"
  199.           self.contents.font.size = 18
  200.           self.contents.font.color = normal_color
  201.           lineheight = 32
  202.           next
  203.         end
  204.         if c == "\014"
  205.           text.sub!(/\[([0-9]+)\]/, "")
  206.           w_sub = $1.to_i
  207.           c = $data_weapons[w_sub].name
  208.           l = self.contents.text_size(c).width
  209.           bitmap = RPG::Cache.icon($data_weapons[w_sub].icon_name)
  210.           self.contents.blt(x+4, y * 32+ 4, bitmap, Rect.new(0, 0, 24, 24))
  211.           x += 28
  212.          
  213.           if $showing_main_message==1
  214.             self.contents.font.color = outline_color
  215.               self.contents.draw_text(4 + x-1+2, 32 * y+2, 40, 32, c)
  216.               self.contents.draw_text(4 + x+1+2, 32 * y+2, 40, 32, c)
  217.               self.contents.draw_text(4 + x+2, 32 * y+1+2, 40, 32, c)
  218.               self.contents.draw_text(4 + x+2, 32 * y-1+2, 40, 32, c)
  219.               #self.contents.draw_text(4 + x-1, 30 * y-1, 40, 32, c)
  220.               #self.contents.draw_text(4 + x-1, 30 * y+1, 40, 32, c)
  221.               #self.contents.draw_text(4 + x+1, 30 * y+1, 40, 32, c)
  222.               #self.contents.draw_text(4 + x+1, 30 * y-1, 40, 32, c)
  223.             self.contents.font.color = normal_color
  224.             self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  225.           else
  226.             self.contents.draw_text(x+4, 32 * y, l+32, lineheight, c)
  227.           end
  228.           x = x + l
  229.           next
  230.         end
  231.           if c == "\015"
  232.           text.sub!(/\[([0-9]+)\]/, "")
  233.           a_sub = $1.to_i
  234.           c = $data_armors[a_sub].name
  235.           l = self.contents.text_size(c).width
  236.           bitmap = RPG::Cache.icon($data_armors[a_sub].icon_name)
  237.           self.contents.blt(x+4, y * 32+ 4, bitmap, Rect.new(0, 0, 24, 24))
  238.           x += 28         
  239.           self.contents.draw_text(x+4, 32 * y, l+32, lineheight, c)
  240.           x = x + l
  241.           next
  242.         end
  243.           if c == "\016"
  244.           text.sub!(/\[([0-9]+)\]/, "")
  245.           @op = $1.to_i
  246.           next
  247.         end
  248.          if c == "\017"
  249.           bannerflag = true
  250.           next
  251.         end
  252.         if c == "\018"
  253.           text.sub!(/\[([0-9]+)\]/, "")
  254.           jump = $1.to_i       
  255.           x += jump
  256.           next
  257.         end
  258.           if c == "\021"
  259.           text.sub!(/\[([0-9]+)\]/, "")
  260.           lineheight = $1.to_i
  261.           next
  262.         end
  263.         if c == "\022"
  264.           text.sub!(/\[([0-9]+)\]/, "")
  265.           skill_sub = $1.to_i
  266.           c = $data_skills[skill_sub].name
  267.           l = self.contents.text_size(c).width
  268.           bitmap = RPG::Cache.icon($data_skills[skill_sub].icon_name)
  269.           self.contents.blt(x+4, y * 32+ 4, bitmap, Rect.new(0, 0, 24, 24))
  270.           x += 28
  271.          
  272.             if $showing_main_message==1
  273.               self.contents.font.color = outline_color
  274.               self.contents.draw_text(4 + x-1+2, 32 * y+2, 40, 32, c)
  275.               self.contents.draw_text(4 + x+1+2, 32 * y+2, 40, 32, c)
  276.               self.contents.draw_text(4 + x+2, 32 * y+1+2, 40, 32, c)
  277.               self.contents.draw_text(4 + x+2, 32 * y-1+2, 40, 32, c)
  278.               #self.contents.draw_text(4 + x-1, 30 * y-1, 40, 32, c)
  279.               #self.contents.draw_text(4 + x-1, 30 * y+1, 40, 32, c)
  280.               #self.contents.draw_text(4 + x+1, 30 * y+1, 40, 32, c)
  281.               #self.contents.draw_text(4 + x+1, 30 * y-1, 40, 32, c)
  282.               self.contents.font.color = normal_color
  283.               self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  284.             else
  285.               self.contents.draw_text(x+4, 32 * y, l+32, lineheight, c)
  286.             end
  287.           x = x + l
  288.           next
  289.         end
  290.          if c == "\023"
  291.           text.sub!(/\[([0-9]+)\]/, "")
  292.           bigness = $1.to_i
  293.           self.contents.font.size = bigness
  294.           next
  295.         end
  296.         if c == "\n"
  297.           if centerflag == true
  298.             x = 448 - x
  299.             x = x / 2
  300.             
  301.             if $showing_main_message==1
  302.               self.contents.font.color = outline_color
  303.               self.contents.draw_text(4 + x-1+2, 32 * y+2, 40, 32, c)
  304.               self.contents.draw_text(4 + x+1+2, 32 * y+2, 40, 32, c)
  305.               self.contents.draw_text(4 + x+2, 32 * y+1+2, 40, 32, c)
  306.               self.contents.draw_text(4 + x+2, 32 * y-1+2, 40, 32, c)
  307.               self.contents.font.color = normal_color
  308.               self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  309.             else
  310.               self.contents.draw_text(x, 32 * y, 448-x, lineheight, a)
  311.             end
  312.           end
  313.           if rightflag == true
  314.             x = 448 - x
  315.             
  316.             if $showing_main_message==1
  317.               self.contents.font.color = outline_color
  318.               self.contents.draw_text(4 + x-1+2, 32 * y+2, 40, 32, c)
  319.               self.contents.draw_text(4 + x+1+2, 32 * y+2, 40, 32, c)
  320.               self.contents.draw_text(4 + x+2, 32 * y+1+2, 40, 32, c)
  321.               self.contents.draw_text(4 + x+2, 32 * y-1+2, 40, 32, c)
  322.               self.contents.font.color = normal_color
  323.               self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  324.             else
  325.               self.contents.draw_text(x, 32 * y, 448-x, lineheight, a)
  326.             end
  327.           end
  328.           if bannerflag == true
  329.             x = 448 - x
  330.             x = x / 2
  331.             
  332.             if $showing_main_message==1
  333.               self.contents.font.color = outline_color
  334.               self.contents.draw_text(4 + x-1+2, 32 * y+2, 40, 32, c)
  335.               self.contents.draw_text(4 + x+1+2, 32 * y+2, 40, 32, c)
  336.               self.contents.draw_text(4 + x+2, 32 * y+1+2, 40, 32, c)
  337.               self.contents.draw_text(4 + x+2, 32 * y-1+2, 40, 32, c)
  338.               self.contents.font.color = normal_color
  339.               self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  340.             else
  341.               self.contents.draw_text(x, 44, 448-x, lineheight, a)
  342.             end
  343.           end
  344.           a = ""
  345.           centerflag = false
  346.           rightflag = false
  347.           bannerflag = false
  348.           if y >= $game_temp.choice_start
  349.             @cursor_width = [@cursor_width, x].max
  350.           end
  351.           y += 1
  352.           x = 0
  353.           if y >= $game_temp.choice_start
  354.             x = 8
  355.           end
  356.           next
  357.         end
  358.         if centerflag == false && rightflag == false && bannerflag == false
  359.          
  360.           if $showing_main_message==1
  361.             if $msg == 400
  362.               #self.contents.font.color = normal_color
  363.               case y
  364.               when 0
  365.                 self.contents.draw_text(4+x,0,40,32,c)
  366.               when 1
  367.                 self.contents.draw_text(4+x+self.contents.font.size*22,0,40,32,c)
  368.               when 2
  369.                 self.contents.draw_text(4+x,32,40,32,c)
  370.               when 3
  371.                 self.contents.draw_text(4+x+self.contents.font.size*22,32,40,32,c)
  372.               end   
  373.             elsif $msg == 401
  374.               #self.contents.font.color = normal_color
  375.               self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  376.             else              
  377.               self.contents.font.color = outline_color
  378.               self.contents.draw_text(4 + x-1+2, 32 * y+2, 40, 32, c)
  379.               self.contents.draw_text(4 + x+1+2, 32 * y+2, 40, 32, c)
  380.               self.contents.draw_text(4 + x+2, 32 * y+1+2, 40, 32, c)
  381.               self.contents.draw_text(4 + x+2, 32 * y-1+2, 40, 32, c)
  382.               self.contents.font.color = normal_color
  383.               self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
  384.             end
  385.           else
  386.             self.contents.draw_text(4 + x, 32 * y, 40, lineheight, c)
  387.           end
  388.         x += self.contents.text_size(c).width
  389.       else
  390.         a += c
  391.         x += self.contents.text_size(c).width
  392.         end
  393.       end
  394.     end
  395.     if $game_temp.choice_max > 0
  396.       @item_max = $game_temp.choice_max
  397.       self.active = true
  398.       self.index = 0
  399.     end
  400.     if $game_temp.num_input_variable_id > 0
  401.       digits_max = $game_temp.num_input_digits_max
  402.       number = $game_variables[$game_temp.num_input_variable_id]
  403.       @input_number_window = Window_InputNumber.new(digits_max)
  404.       @input_number_window.number = number
  405.       @input_number_window.x = self.x + 8
  406.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  407.     end
  408.   end
  409. # ----------------------------
  410.   def reset_window   
  411.     self.back_opacity = 220
  412.     self.width = 430
  413.     self.height = 160
  414.     if $game_system.message_frame == 0
  415.       self.opacity = 255
  416.     else
  417.       self.opacity = 0
  418.     end   
  419.     if $game_temp.in_battle #比较高的位置,使用到三角,共3行
  420.       case $msg
  421.       when 0
  422.         self.y = 16
  423.         self.height = 128
  424.         self.x =130
  425.         self.width=348
  426.         self.contents = Bitmap.new(width - 32, height - 32)
  427.       when 111 #上、一行,到三角
  428.         self.y = 16
  429.         self.x = 130
  430.         self.width = 348
  431.         self.height = 62
  432.         self.contents = Bitmap.new(width - 32, height - 32)   
  433.       when 121
  434.         self.y = 16
  435.         self.x = 130
  436.         self.width = 348
  437.         self.height = 96
  438.         self.contents = Bitmap.new(width - 32, height - 32)  
  439.       when 131
  440.         self.y = 16
  441.         self.height = 128
  442.         self.x =130
  443.         self.width=348
  444.         self.contents = Bitmap.new(width - 32, height - 32)
  445.       when 141
  446.         self.y = 16
  447.         self.x = 130
  448.         self.width = 348
  449.         self.height = 160
  450.         self.contents = Bitmap.new(width - 32, height - 32)
  451.       end
  452.       
  453.     else
  454.       case $game_system.message_position
  455.       
  456.       when 0  #顶部对话,使用到三角
  457.       self.y = 16
  458.       self.height = 128
  459.       self.x =130
  460.       self.width=348
  461.       self.contents = Bitmap.new(width - 32, height - 32)
  462.         
  463.       when 1  #中等高度对话,使用到三角那里,用完别忘恢复到=2
  464.         self.y = 160
  465.         self.x = 130
  466.         self.width = 348
  467.         self.contents = Bitmap.new(width - 32, height - 32)
  468.                
  469.       when 2  
  470.         case $msg
  471.         when 0  #常规配角对话框,三角文字
  472.         self.y = 304
  473.         self.height = 160
  474.         self.x =130
  475.         self.width=351
  476.         self.contents = Bitmap.new(width - 32, height - 32)
  477.         when 111 #上、一行,到三角
  478.         self.y = 16
  479.         self.x = 130
  480.         self.width = 351
  481.         self.height = 62
  482.         self.contents = Bitmap.new(width - 32, height - 32)   
  483.         when 121
  484.         self.y = 16
  485.         self.x = 130
  486.         self.width = 351
  487.         self.height = 96
  488.         self.contents = Bitmap.new(width - 32, height - 32)   
  489.         when 131
  490.         self.y = 16
  491.         self.x = 130
  492.         self.width = 351
  493.         self.height = 128
  494.         self.contents = Bitmap.new(width - 32, height - 32)   
  495.         when 141
  496.         self.y = 16
  497.         self.x = 130
  498.         self.width = 351
  499.         self.height = 160
  500.         self.contents = Bitmap.new(width - 32, height - 32)
  501.         when 211 #中、一行,到三角
  502.         self.y = 160
  503.         self.x = 130
  504.         self.width = 351
  505.         self.height = 62
  506.         self.contents = Bitmap.new(width - 32, height - 32)   
  507.         when 221
  508.         self.y = 160
  509.         self.x = 130
  510.         self.width = 348
  511.         self.height = 96
  512.         self.contents = Bitmap.new(width - 32, height - 32)   
  513.         when 231
  514.         self.y = 160
  515.         self.x = 130
  516.         self.width = 351
  517.         self.height = 128
  518.         self.contents = Bitmap.new(width - 32, height - 32)   
  519.         when 241
  520.         self.y = 160
  521.         self.x = 130
  522.         self.width = 351
  523.         self.height = 160
  524.         self.contents = Bitmap.new(width - 32, height - 32)
  525.         when 311 #下、一行,到三角
  526.         self.y = 304
  527.         self.x = 130
  528.         self.width = 351
  529.         self.height = 62
  530.         self.contents = Bitmap.new(width - 32, height - 32)   
  531.         when 321
  532.         self.y = 304
  533.         self.x = 130
  534.         self.width = 351
  535.         self.height = 96
  536.         self.contents = Bitmap.new(width - 32, height - 32)   
  537.         when 331
  538.         self.y = 304
  539.         self.x = 130
  540.         self.width = 351
  541.         self.height = 128
  542.         self.contents = Bitmap.new(width - 32, height - 32)   
  543.         when 341
  544.         self.y = 304
  545.         self.x = 130
  546.         self.width = 351
  547.         self.height = 160
  548.         self.contents = Bitmap.new(width - 32, height - 32)
  549.         when 110 #上、一行,全部文字
  550.         self.y = 16
  551.         self.x = 100
  552.         self.width = 432
  553.         self.height = 62
  554.         self.contents = Bitmap.new(width - 32, height - 32)   
  555.         when 120
  556.         self.y = 16
  557.         self.x = 100
  558.         self.width = 432
  559.         self.height = 96
  560.         self.contents = Bitmap.new(width - 32, height - 32)   
  561.         when 130
  562.         self.y = 16
  563.         self.x = 100
  564.         self.width = 432
  565.         self.height = 128
  566.         self.contents = Bitmap.new(width - 32, height - 32)   
  567.         when 140
  568.         self.y = 16
  569.         self.x = 100
  570.         self.width = 432
  571.         self.height = 160
  572.         self.contents = Bitmap.new(width - 32, height - 32)
  573.         when 210 #中、一行,全部文字
  574.         self.y = 160
  575.         self.x = 100
  576.         self.width = 432
  577.         self.height = 62
  578.         self.contents = Bitmap.new(width - 32, height - 32)   
  579.         when 220
  580.         self.y = 160
  581.         self.x = 100
  582.         self.width = 432
  583.         self.height = 96
  584.         self.contents = Bitmap.new(width - 32, height - 32)   
  585.         when 230
  586.         self.y = 160
  587.         self.x = 100
  588.         self.width = 432
  589.         self.height = 128
  590.         self.contents = Bitmap.new(width - 32, height - 32)   
  591.         when 240
  592.         self.y = 160
  593.         self.x = 100
  594.         self.width = 432
  595.         self.height = 160
  596.         self.contents = Bitmap.new(width - 32, height - 32)
  597.         when 310 #下、一行,全部文字
  598.         self.y = 304
  599.         self.x = 130
  600.         self.width = 432
  601.         self.height = 62
  602.         self.contents = Bitmap.new(width - 32, height - 32)   
  603.         when 320
  604.         self.y = 304
  605.         self.x = 100
  606.         self.width = 432
  607.         self.height = 96
  608.         self.contents = Bitmap.new(width - 32, height - 32)   
  609.         when 330
  610.         self.y = 304
  611.         self.x = 100
  612.         self.width = 432
  613.         self.height = 128
  614.         self.contents = Bitmap.new(width - 32, height - 32)   
  615.         when 340
  616.         self.y = 304
  617.         self.x = 100
  618.         self.width = 432
  619.         self.height = 160
  620.         self.contents = Bitmap.new(width - 32, height - 32)
  621.         when 400
  622.           self.y = 390
  623.           self.x = 0
  624.           self.width = 631
  625.           self.height = 120
  626.           self.opacity = 0
  627.           self.contents = Bitmap.new(width - 32, height - 32)  
  628.         when 401
  629.           self.y = 390
  630.           self.x = 110
  631.           self.width = 500
  632.           self.height = 160
  633.           self.opacity = 0
  634.           self.contents = Bitmap.new(width - 32, height - 32)  
  635.         end
  636.       when 3  #中等高度,使用到三角那里,共3行
  637.         self.y = 160
  638.         self.x = 130
  639.         self.width = 348
  640.         self.height = 128
  641.         self.contents = Bitmap.new(width - 32, height - 32)   
  642.         
  643.       when 4  #中等高度,使用到三角那里,共2行
  644.         self.y = 160
  645.         self.x = 130
  646.         self.width = 348
  647.         self.height = 96
  648.         self.contents = Bitmap.new(width - 32, height - 32)   
  649.         
  650.       when 5  #中等高度,使用到三角那里,共1行
  651.         self.y = 160
  652.         self.x = 130
  653.         self.width = 348
  654.         self.height = 62
  655.         self.contents = Bitmap.new(width - 32, height - 32)  
  656.         
  657.       when 1001  #使用对话框1号!
  658.         self.x=175
  659.         self.y=306
  660.         self.width = 440
  661.         self.height = 160
  662.         self.opacity=0
  663.         self.back_opacity=0
  664.         self.contents = Bitmap.new(width - 32, height - 32)
  665.       end
  666.     end
  667.     if $game_switches[55]
  668.       self.x = 100
  669.       self.width = 432
  670.       self.y = 100
  671.       self.height = 288
  672.       self.contents = Bitmap.new(width - 32, height - 32)
  673.     end
  674.   end
  675. # ----------------------------  
  676.   def update
  677.     super
  678.     if @refreshflag && @fade_in == false
  679.       self.contents_opacity = @op
  680.      end
  681.     if @autoclosetime == 0
  682.     @autoclosetime = -1
  683.      terminate_message
  684.    end
  685.     if @autoclosetime >= 1
  686.     @autoclosetime -= 1
  687.     end
  688.     if @fade_in
  689.       self.contents_opacity += 24
  690.       if @input_number_window != nil
  691.         @input_number_window.contents_opacity += 24
  692.       end
  693.       if self.contents_opacity >= @op
  694.         @fade_in = false
  695.       end
  696.       return
  697.     end
  698.     if @input_number_window != nil
  699.       @input_number_window.update
  700.       if Input.trigger?(Input::C)
  701.         $game_system.se_play($data_system.decision_se)
  702.         $game_variables[$game_temp.num_input_variable_id] =
  703.           @input_number_window.number
  704.         $game_map.need_refresh = true
  705.         @input_number_window.dispose
  706.         @input_number_window = nil
  707.         terminate_message
  708.       end
  709.       return
  710.     end
  711.     if @contents_showing
  712.       if $game_temp.choice_max == 0
  713.         self.pause = true
  714.       end
  715.       if Input.trigger?(Input::B)
  716.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  717.           $game_system.se_play($data_system.cancel_se)
  718.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  719.           terminate_message
  720.         end
  721.       end
  722.       if Input.trigger?(Input::C)
  723.         if $game_temp.choice_max > 0
  724.           $game_system.se_play($data_system.decision_se)
  725.           $game_temp.choice_proc.call(self.index)
  726.         end
  727.         @op = 255
  728.         terminate_message
  729.       end
  730.       return
  731.     end
  732.     if @fade_out == false and $game_temp.message_text != nil
  733.       @contents_showing = true
  734.       $game_temp.message_window_showing = true
  735.       reset_window
  736.       refresh
  737.       Graphics.frame_reset
  738.       self.visible = true
  739.       self.contents_opacity = 0
  740.       if @input_number_window != nil
  741.         @input_number_window.contents_opacity = 0
  742.       end
  743.       @fade_in = true
  744.       return
  745.     end
  746.     if self.visible
  747.       @fade_out = true
  748.       self.opacity -= 48
  749.       if self.opacity == 0
  750.         self.visible = false
  751.         @fade_out = false
  752.         $game_temp.message_window_showing = false
  753.       end
  754.       return
  755.     end
  756.   end
  757. # ----------------------------
  758.   def update_cursor_rect
  759.     if @index >= 0
  760.       n = $game_temp.choice_start + @index
  761.       self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  762.     else
  763.       self.cursor_rect.empty
  764.     end
  765.   end
  766. end

复制代码
看见 Window_Message  马上滚到黑圣里翻= =
然后我成功了 配着
$game_system.message_position=2
$showing_main_message = 1
$msg = 400
就可以很好的使用了
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1558
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

10
发表于 2010-7-27 13:01:00 | 只看该作者
……
话说你不知道对话窗口的脚本是那个么……
[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-27 23:00

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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