Project1

标题: 又来求!!!!2从问 [打印本页]

作者: victor    时间: 2007-6-30 02:40
提示: 作者被禁止或删除 内容自动屏蔽
作者: victor    时间: 2007-6-30 02:40
提示: 作者被禁止或删除 内容自动屏蔽
作者: 津名魅    时间: 2007-6-30 02:59
提示: 作者被禁止或删除 内容自动屏蔽
作者: victor    时间: 2007-6-30 03:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: 特工齐齐    时间: 2007-6-30 03:25
LZ不明白的话请耐心请教,至少嘴巴不要过于肮脏。
作者: secondsen    时间: 2007-6-30 04:28
以下引用特工齐齐于2007-6-29 19:25:46的发言:

LZ不明白的话请耐心请教,至少嘴巴不要过于肮脏。



肮脏太夸张了,至少LZ说话应该客气点吧,你是在问问题,别人又不是你养的!!!!{/fn}{/fn}
作者: victor    时间: 2007-6-30 05:47
提示: 作者被禁止或删除 内容自动屏蔽
作者: victor    时间: 2007-6-30 05:49
提示: 作者被禁止或删除 内容自动屏蔽
作者: kaze    时间: 2007-6-30 05:49
  1. #脚本内容

  2. # ————————————————————————————————————
  3. # 本脚本来自www.66rpg.com,转载请保留此信息
  4. # ————————————————————————————————————

  5. #从此精简版本中去除的标记:
  6. # \.   :停顿一刹那(1、2帧)
  7. # \|   :停顿片刻(20帧)
  8. # \>   :文字不用打字方式
  9. # \<   :文字使用打字方式
  10. # \!   :等待玩家按回车再继续
  11. # \~   :文字直接消失
  12. # \K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_speak设置的音效

  13. #新增的标记:
  14. # \d[4]:空4个字节(2个汉字)的位置
  15. # \t: 显示游戏时间窗口
  16. # \v[7]:显示7号变量的值
  17. # \v[a7]:显示7号防具的名称
  18. # \v[s7]:显示7号特技的名称
  19. # \v[w7]:显示7号武器的名称
  20. # \v[i7]:显示7号道具的名称
  21. # \A:头像及姓名框靠左排列
  22. # \a:头像及姓名框靠右排列
  23. # \u[rrggbb]:直接以RGB值十六进制指定颜色

  24. #强化功能的标记:
  25. # \F[001]:在对话显示头像“Graphics/battlers/66rpg_001_f.png”
  26. # \f[1]:在对话中显示1号角色的头像,没有的话同\F[1]效果
  27. # \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
  28. # \l[1]:在左边显示1号角色的半身像,没有的话同\L[1]效果
  29. # \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”
  30. # \r[1]:在右边显示1号角色的半身像,没有的话同\R[1]效果
  31. # \m[李逍遥]:用默认颜色(颜色0)显示一个“李逍遥”方框,表示说话人姓名
  32. # \m2[\n[1]]:用颜色2显示1号主角的姓名方框 ----不知道有多少人盼这个功能盼了多久了呵呵

  33. #下面是脚本:

  34. #——说明

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

  38. # \m[李逍遥]:用默认颜色(颜色0)显示一个“李逍遥”方框,表示说话人姓名
  39. # \m2[\n[1]]:用颜色2显示1号主角的姓名方框

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

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

  44. # \c[0-7]:更改颜色

  45. # \u[rrggbb]:直接以十六进制指定颜色,注意这里会把透明度重设为255

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

  47. # \t: 显示游戏时间窗口

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

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

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

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

  52. # \d[4]:空4个字节(2个汉字)的位置

  53. # \F[001]:在对话显示头像“Graphics/battlers/66rpg_001_f.png”
  54. # \f[1]:在对话中显示1号角色的头像,没有的话同\F[1]效果
  55. # \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h.png”
  56. # \l[1]:在左边显示1号角色的半身像,没有的话同\L[1]效果
  57. # \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h.png”
  58. # \r[1]:在右边显示1号角色的半身像,没有的话同\R[1]效果

  59. # \Lk:清除左边的图像
  60. # \Rk:清除右边的图像

  61. # \v[7]:显示7号变量的值
  62. # \v[a7]:显示7号防具的名称
  63. # \v[s7]:显示7号特技的名称
  64. # \v[w7]:显示7号武器的名称
  65. # \v[i7]:显示7号道具的名称

  66. # \A:头像及姓名框靠左排列
  67. # \a:头像及姓名框靠右排列

  68. #==============================================================================
  69. # ■ Window_Message
  70. #------------------------------------------------------------------------------
  71. class Window_Message < Window_Selectable
  72.   #--------------------------------------------------------------------------
  73.   # ● 初始化状态
  74.   #--------------------------------------------------------------------------
  75.   def initialize
  76.     super(80, 304, 480, 160)
  77.     self.contents = Bitmap.new(width - 32, height - 32)
  78.     self.visible = false
  79.     self.z = 9998
  80.     @fade_in = false
  81.     @fade_out = false
  82.     @contents_showing = false
  83.     @cursor_width = 0
  84.     self.active = false
  85.     self.index = -1
  86.     @popchar = -2
  87.     @alignment = true
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ● 释放
  91.   #--------------------------------------------------------------------------
  92.   def dispose
  93.     terminate_message
  94.     $game_temp.message_window_showing = false
  95.     if @input_number_window != nil
  96.       @input_number_window.dispose
  97.     end
  98.     super
  99.   end
  100.   #--------------------------------------------------------------------------
  101.   # ● 处理信息结束
  102.   #--------------------------------------------------------------------------
  103.   def terminate_message
  104.     self.active = false
  105.     self.pause = false
  106.     self.index = -1
  107.     self.contents.clear
  108.     # 清除显示中标志
  109.     @contents_showing = false
  110.     # 呼叫信息调用
  111.     if $game_temp.message_proc != nil
  112.       $game_temp.message_proc.call
  113.     end
  114.     # 清除文章、选择项、输入数值的相关变量
  115.     $game_temp.message_text = nil
  116.     $game_temp.message_proc = nil
  117.     $game_temp.choice_start = 99
  118.     $game_temp.choice_max = 0
  119.     $game_temp.choice_cancel_type = 0
  120.     $game_temp.choice_proc = nil
  121.     $game_temp.num_input_start = 99
  122.     $game_temp.num_input_variable_id = 0
  123.     $game_temp.num_input_digits_max = 0
  124.     # 开放金钱窗口
  125.     if @gold_window != nil
  126.       @gold_window.dispose
  127.       @gold_window = nil
  128.     end
  129.     # 开放时间窗口
  130.     if @playtime_window != nil
  131.       @playtime_window.dispose
  132.       @playtime_window = nil
  133.     end
  134.     # 开放姓名窗口
  135.     if @name_window != nil
  136.       @name_window.dispose
  137.       @name_window = nil
  138.     end
  139.     if @name_airtext != nil
  140.       @name_airtext.dispose
  141.       @name_airtext = nil
  142.     end
  143.     # 开放角色图片
  144.     if @right_picture != nil and @right_keep == true
  145.       @right_picture.dispose
  146.     end
  147.     if @left_picture != nil and @left_keep == true
  148.       @left_picture.dispose
  149.     end
  150.     @face_bitmap = nil
  151.   end
  152.   #--------------------------------------------------------------------------
  153.   # ● 刷新
  154.   #--------------------------------------------------------------------------
  155.   def refresh
  156.     # 初期化
  157.     self.contents.clear
  158.     self.contents.font.color = normal_color
  159.     self.contents.font.size = Font.default_size
  160.     x = y = max_x = max_y = @indent = lines = 0
  161.     @left_keep = @right_keep = false
  162.     @face_indent = 0
  163.     @opacity = 255
  164.     @cursor_width = 0
  165.     face = nil
  166.     if $game_temp.choice_start == 0
  167.       x = 8
  168.     end
  169.     if $game_temp.message_text != nil
  170.       text = $game_temp.message_text
  171.       #——对齐设置
  172.       if (/\\([Aa])/.match(text))!=nil then
  173.         if $1 == "A"
  174.           @alignment = true
  175.         else
  176.           @alignment = false
  177.         end
  178.         text.gsub!(/\\([Aa])/) { "" }
  179.       end
  180.       #——头像设置
  181.       if (/\\([Ff])\[(.+?)\]/.match(text))!=nil then
  182.         face = "66rpg_" + $2 + "_f.png"
  183.         if $1 == "f" and $game_actors[$2.to_i] != nil
  184.           face = $game_actors[$2.to_i].battler_name + "_f.png"
  185.         end
  186.         if FileTest.exist?("Graphics/Battlers/#{face}")
  187.           @face_bitmap = Bitmap.new("Graphics/Battlers/#{face}")
  188.           if @alignment
  189.             x = @face_indent = 128
  190.             self.contents.blt(16, 16, @face_bitmap, Rect.new(0, 0, 96, 96))
  191.           else
  192.             self.contents.blt(self.contents.width - 112, 16, @face_bitmap,
  193.               Rect.new(0, 0, 96, 96))
  194.           end
  195.         else
  196.           face = nil
  197.           @face_bitmap = nil
  198.         end
  199.         text.gsub!(/\\([Ff])\[(.*?)\]/) { "" }
  200.       end
  201.       #——左半身像设置
  202.       if (/\\([Ll])\[(.+?)\]/.match(text))!=nil then
  203.         face = "66rpg_" + $2 + "_h.png"
  204.         if $1 == "l" and $game_actors[$2.to_i] != nil
  205.           face = $game_actors[$2.to_i].battler_name + "_h.png"
  206.         end
  207.         if $加密 == true
  208.           if @left_picture != nil
  209.             @left_picture.dispose
  210.           end
  211.           @left_picture = Sprite.new
  212.           @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{face}")
  213.           @left_picture.y = 480-@left_picture.bitmap.height
  214.           @left_picture.x = 0
  215.           @left_picture.mirror = true
  216.           text.gsub!(/\\([Ll])\[(.*?)\]/) { "" }
  217.         else         
  218.           if FileTest.exist?("Graphics/battlers/#{face}")
  219.             if @left_picture != nil
  220.               @left_picture.dispose
  221.             end
  222.             @left_picture = Sprite.new
  223.             @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{face}")
  224.             @left_picture.y = 480-@left_picture.bitmap.height
  225.             @left_picture.x = 0
  226.             @left_picture.mirror = true
  227.             text.gsub!(/\\([Ll])\[(.*?)\]/) { "" }
  228.           end
  229.         end        
  230.       end
  231.       #——右半身像设置
  232.       if (/\\([Rr])\[(.+?)\]/.match(text))!=nil then
  233.         face = "66rpg_" + $2 + "_h.png"
  234.         if $1 == "r" and $game_actors[$2.to_i] != nil
  235.           face = $game_actors[$2.to_i].battler_name + "_h.png"
  236.         end
  237.         if $加密 == true
  238.           if @right_picture != nil
  239.             @right_picture.dispose
  240.           end
  241.           @right_picture = Sprite.new
  242.           @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{face}")
  243.           @right_picture.y = 480-@right_picture.bitmap.height
  244.           @right_picture.x = 640-@right_picture.bitmap.width
  245.           text.gsub!(/\\([Rr])\[(.*?)\]/) { "" }
  246.         else
  247.           if FileTest.exist?("Graphics/battlers/#{face}")
  248.             if @right_picture != nil
  249.               @right_picture.dispose
  250.             end
  251.             @right_picture = Sprite.new
  252.             @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{face}")
  253.             @right_picture.y = 480-@right_picture.bitmap.height
  254.             @right_picture.x = 640-@right_picture.bitmap.width
  255.             text.gsub!(/\\([Rr])\[(.*?)\]/) { "" }
  256.           end
  257.         end
  258.       end
  259.       if (/\\[Rr]k/.match(text)) != nil
  260.         @right_keep = true
  261.         text.sub!(/\\[Rr]k/) { "" }
  262.       end
  263.       if (/\\[Ll]k/.match(text)) != nil
  264.         @left_keep = true
  265.         text.sub!(/\\[Ll]k/) { "" }
  266.       end
  267.       # 替换人物姓名
  268.       text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  269.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  270.       end
  271.       # 显示人物姓名
  272.       name_window_set = false
  273.       if (/\\[Mm]([0-9]*?)\[(.+?)\]/.match(text)) != nil
  274.         name_window_set = true
  275.         if $1 == ""
  276.           color = 0
  277.         else
  278.           color = $1.to_i
  279.         end
  280.         if color >= 0 and color <= 7
  281.           name_color = color
  282.         end
  283.         name_text = $2
  284.         text.sub!(/\\[Mm]([0-9]*?)\[(.*?)\]/) { "" }
  285.       end
  286.       # 文字位置的判定
  287.       if (/\\[Pp]\[([-1,0-9]+)\]/.match(text))!=nil then
  288.         @popchar = $1.to_i
  289.         if @popchar == -1
  290.           x = @indent = 48
  291.           y = 4
  292.         end
  293.         text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  294.       end
  295.       # 开始
  296.       begin
  297.         last_text = text.clone
  298.         text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  299.       end until text == last_text
  300.       text.gsub!(/\\\\/) { "\000" }
  301.       text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  302.       text.gsub!(/\\[Gg]/) { "\002" }
  303.       text.gsub!(/\\[Tt]/) { "\003" }
  304.       text.gsub!(/\\[Uu]\[([0-9A-Fa-f]{6})\]/) { "\004[#{$1}]" }
  305.       text.gsub!(/\\[Ii]/) { "\023" }
  306.       text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  307.       text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  308.       text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  309.       text.gsub!(/\\[Dd]\[([0-9]+)\]/) { "\027[#{$1}]" }
  310.       if @popchar >= 0
  311.         max_x = 0
  312.         max_y = 4
  313.         for i in 0..3
  314.           line = text.split(/\n/)[3-i]
  315.           max_y -= 1 if line == nil and max_y <= 4-i
  316.           next if line == nil
  317.           cx = contents.text_size(line).width
  318.           max_x = cx if cx > max_x
  319.         end
  320.         self.width = max_x + 48 + @face_indent
  321.         self.height = (max_y - 1) * 32 + 64
  322.       else
  323.         max_x = self.width - 32 - @face_indent
  324.       end
  325.       reset_window
  326.       if name_window_set
  327.         w = self.contents.text_size(name_text).width + 16
  328.         xn = @alignment ? self.x : self.x + self.width - w
  329.         yn = self.y >= 40 ? self.y - 40 : self.y + self.height
  330.         @name_window = Window_Name.new(xn, yn, w)
  331.         @name_window.z = self.z + 1
  332.         @name_airtext = Window_AirText.new(xn + 8, yn + 8, name_text, name_color)
  333.         @name_airtext.z = self.z + 2
  334.       end
  335.       while ((c = text.slice!(/./m)) != nil)
  336.         if c == "\000"
  337.           c = "\\"
  338.         end
  339.         if c == "\001"
  340.           text.sub!(/\[([0-9]+)\]/, "")
  341.           color = $1.to_i
  342.           if color >= 0 and color <= 7
  343.             self.contents.font.color = text_color(color)
  344.           end
  345.           next
  346.         end
  347.         if c == "\002"
  348.           if @gold_window == nil and @popchar <= 0
  349.             @gold_window = Window_Gold.new
  350.             @gold_window.x = 560 - @gold_window.width
  351.             if $game_temp.in_battle
  352.               @gold_window.y = 192
  353.             else
  354.               @gold_window.y = self.y >= 128 ? 32 : 384
  355.             end
  356.             @gold_window.opacity = self.opacity
  357.             @gold_window.back_opacity = self.back_opacity
  358.           end
  359.           next
  360.         end
  361.         if c == "\003"
  362.           if @playtime_window == nil and @popchar <=0
  363.             @playtime_window = Window_PlayTime.new
  364.             @playtime_window.x = 80
  365.             if $game_temp.in_battle
  366.               @playtime_window.y = 192
  367.             else
  368.               @playtime_window.y = self.y >= 128 ? 32 : 384
  369.             end
  370.             @playtime_window.opacity = self.opacity
  371.             @playtime_window.back_opacity = self.back_opacity
  372.           end
  373.         end
  374.         if c == "\004"
  375.           text.sub!(/\[([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})\]/, "")
  376.           self.contents.font.color = Color.new($1.to_i(16), $2.to_i(16), $3.to_i(16), 255)
  377.           next
  378.         end
  379.         if c == "\023"
  380.           @indent = x
  381.           next
  382.         end
  383.         if c == "\024"
  384.           text.sub!(/\[([0-9]+)\]/, "")
  385.           self.contents.font.color.alpha = [[0, $1.to_i].max, 255].min
  386.           next
  387.         end
  388.         if c == "\025"
  389.           text.sub!(/\[([0-9]+)\]/, "")
  390.           self.contents.font.size = [[$1.to_i, 6].max, 32].min
  391.           next
  392.         end
  393.         if c == "\026"
  394.           text.sub!(/\[([0-9]+)\]/, "")
  395.           x += $1.to_i
  396.           next
  397.         end
  398.         if c == "\027"
  399.           text.sub!(/\[([0-9]+)\]/, "")
  400.           x += $1.to_i * self.contents.font.size / 2
  401.           next
  402.         end
  403.         if c == "\030"
  404.           text.sub!(/\[(.*?)\]/, "")
  405.           self.contents.blt(x , y * line_height + 4, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  406.           x += 24
  407.           next
  408.         end
  409.         if c == "\n"
  410.           if lines >= $game_temp.choice_start
  411.             @cursor_width = [@cursor_width, max_x - @face_indent].max
  412.           end
  413.           lines += 1
  414.           y += 1
  415.           x = 0 + @indent + @face_indent
  416.           if lines >= $game_temp.choice_start
  417.             x = 8 + @indent + @face_indent
  418.           end
  419.           next
  420.         end
  421.         # 描绘文字
  422.         self.contents.draw_text(x, line_height * y, 40, 32, c)
  423.         # x 为要描绘文字的加法运算
  424.         x += self.contents.text_size(c).width
  425.       end
  426.     end
  427.     if $game_temp.choice_max > 0
  428.       @item_max = $game_temp.choice_max
  429.       self.active = true
  430.       self.index = 0
  431.     end
  432.     if $game_temp.num_input_variable_id > 0
  433.       digits_max = $game_temp.num_input_digits_max
  434.       number = $game_variables[$game_temp.num_input_variable_id]
  435.       @input_number_window = Window_InputNumber.new(digits_max)
  436.       @input_number_window.number = number
  437.       @input_number_window.x = self.x + 8
  438.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  439.     end
  440.   end
  441.   #--------------------------------------------------------------------------
  442.   # ● 更新
  443.   #--------------------------------------------------------------------------
  444.   def update
  445.     super
  446.     # 渐变的情况下
  447.     if @fade_in
  448.       self.contents_opacity += 24
  449.       if @input_number_window != nil
  450.         @input_number_window.contents_opacity += 24
  451.       end
  452.       if self.contents_opacity == 255
  453.         @fade_in = false
  454.       end
  455.       return
  456.     end
  457.     # 输入数值的情况下
  458.     if @input_number_window != nil
  459.       @input_number_window.update
  460.       # 确定
  461.       if Input.trigger?(Input::C)
  462.         $game_system.se_play($data_system.decision_se)
  463.         $game_variables[$game_temp.num_input_variable_id] =
  464.           @input_number_window.number
  465.         $game_map.need_refresh = true
  466.         # 释放输入数值窗口
  467.         @input_number_window.dispose
  468.         @input_number_window = nil
  469.         terminate_message
  470.       end
  471.       return
  472.     end
  473.     # 显示信息中的情况下
  474.     if @contents_showing
  475.       # 如果不是在显示选择项中就显示暂停标志
  476.       if $game_temp.choice_max == 0
  477.         self.pause = true
  478.       end
  479.       # 取消
  480.       if Input.trigger?(Input::B)
  481.         if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  482.           $game_system.se_play($data_system.cancel_se)
  483.           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  484.           terminate_message
  485.         end
  486.       end
  487.       # 确定
  488.       if Input.trigger?(Input::C)
  489.         if $game_temp.choice_max > 0
  490.           $game_system.se_play($data_system.decision_se)
  491.           $game_temp.choice_proc.call(self.index)
  492.         end
  493.         terminate_message
  494.       end
  495.       return
  496.     end
  497.     # 在渐变以外的状态下有等待显示的信息与选择项的场合
  498.     if @fade_out == false and $game_temp.message_text != nil
  499.       @contents_showing = true
  500.       $game_temp.message_window_showing = true
  501.       reset_window
  502.       refresh
  503.       Graphics.frame_reset
  504.       self.visible = true
  505.       self.contents_opacity = 0
  506.       if @input_number_window != nil
  507.         @input_number_window.contents_opacity = 0
  508.       end
  509.       @fade_in = true
  510.       return
  511.     end
  512.     # 没有可以显示的信息、但是窗口为可见的情况下
  513.     if self.visible
  514.       @fade_out = true
  515.       self.opacity -= 48
  516.       if self.opacity == 0
  517.         self.visible = false
  518.         @fade_out = false
  519.         $game_temp.message_window_showing = false
  520.       end
  521.       return
  522.     end
  523.   end
  524.   #--------------------------------------------------------------------------
  525.   # ● 获得字符
  526.   #--------------------------------------------------------------------------
  527.   def get_character(parameter)
  528.     case parameter
  529.     when 0
  530.       return $game_player
  531.     else
  532.       events = $game_map.events
  533.       return events == nil ? nil : events[parameter]
  534.     end
  535.   end
  536.   #--------------------------------------------------------------------------
  537.   # ● 设置窗口位置与不透明度
  538.   #--------------------------------------------------------------------------
  539.   def reset_window
  540.     # 判定
  541.     if @popchar >= 0
  542.       events = $game_map.events
  543.       if events != nil
  544.         character = get_character(@popchar)
  545.         x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  546.         y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  547.         self.x = x
  548.         self.y = y
  549.       end
  550.     elsif @popchar == -1
  551.       self.x = -4
  552.       self.y = -4
  553.       self.width = 648
  554.       self.height = 488
  555.     else
  556.       if $game_temp.in_battle
  557.         self.y = 16
  558.       else
  559.         case $game_system.message_position
  560.         when 0 # 上
  561.           self.y = 16
  562.         when 1 # 中
  563.           self.y = 160
  564.         when 2 # 下
  565.           self.y = 304
  566.         end
  567.         self.x = 80
  568.         if @face_bitmap == nil
  569.           self.width = 480
  570.         else
  571.           self.width = 600
  572.           self.x -= 60
  573.         end
  574.         self.height = 160
  575.       end
  576.     end
  577.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  578.     if @face_bitmap != nil
  579.       if @alignment
  580.         self.contents.blt(16, 16, @face_bitmap, Rect.new(0, 0, 96, 96))
  581.       else
  582.         self.contents.blt(self.contents.width - 112, 16, @face_bitmap,
  583.           Rect.new(0, 0, 96, 96))
  584.       end
  585.     end
  586.     if @popchar == -1
  587.       self.opacity = 255
  588.       self.back_opacity = 0
  589.     elsif $game_system.message_frame == 0
  590.       self.opacity = 255
  591.       self.back_opacity = 160
  592.     else
  593.       self.opacity = 0
  594.       self.back_opacity = 160
  595.     end
  596.   end
  597.   #--------------------------------------------------------------------------
  598.   # ● line_height
  599.   #--------------------------------------------------------------------------
  600.   # 返回値:行高
  601.   #--------------------------------------------------------------------------
  602.   def line_height
  603.     if self.contents.font.size >= 20 and self.contents.font.size <= 24
  604.       return 32
  605.     else
  606.       return self.contents.font.size * 15 / 10
  607.     end
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ● \V 变换
  611.   #--------------------------------------------------------------------------
  612.   def convart_value(option, index)
  613.     option == nil ? option = "" : nil
  614.     option.downcase!
  615.     case option
  616.       when "i"
  617.         unless $data_items[index].name == nil
  618.           r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  619.         end
  620.       when "w"
  621.         unless $data_weapons[index].name == nil
  622.           r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  623.         end
  624.       when "a"
  625.         unless $data_armors[index].name == nil
  626.           r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  627.         end
  628.       when "s"
  629.         unless $data_skills[index].name == nil
  630.           r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  631.         end
  632.       else
  633.       r = $game_variables[index]
  634.     end
  635.     r == nil ? r = "" : nil
  636.     return r
  637.   end
  638.   #--------------------------------------------------------------------------
  639.   # ● 矩形更新
  640.   #--------------------------------------------------------------------------
  641.   def update_cursor_rect
  642.     if @index >= 0
  643.       n = $game_temp.choice_start + @index
  644.       self.cursor_rect.set(4 + @indent + @face_indent, n * 32 + 4, @cursor_width, 32)
  645.     else
  646.       self.cursor_rect.empty
  647.     end
  648.   end
  649. end
  650. #==============================================================================
  651. 替代windows_message(或你插入的66增强型对话框)全部内容。



  652. # ■ Window_Name
  653. #------------------------------------------------------------------------------
  654. #  显示对话人姓名的窗口。
  655. #==============================================================================

  656. class Window_Name < Window_Base
  657.   #--------------------------------------------------------------------------
  658.   # ● 初始化窗口
  659.   #--------------------------------------------------------------------------
  660.   def initialize(x, y, width)
  661.     super(x, y, width, 40)
  662.     self.contents = nil
  663.     self.back_opacity = 160
  664.   end
  665. end

  666. #==============================================================================
  667. # ■ Window_AirText
  668. #------------------------------------------------------------------------------
  669. #  显示对话人姓名的文字。
  670. #==============================================================================

  671. class Window_AirText < Window_Base
  672.   #--------------------------------------------------------------------------
  673.   # ● 初始化窗口
  674.   #--------------------------------------------------------------------------
  675.   def initialize(x, y, designate_text, color)
  676.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  677.     self.opacity = 0
  678.     self.back_opacity = 0
  679.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  680.     w = self.contents.width
  681.     h = self.contents.height
  682.     self.contents.font.color = text_color(color)
  683.     self.contents.draw_text(0, 0, w, h, designate_text)
  684.   end
  685. end
复制代码


话说这个我最近发了无数遍了 [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: victor    时间: 2007-6-30 05:51
提示: 作者被禁止或删除 内容自动屏蔽
作者: 特工齐齐    时间: 2007-6-30 06:08
放在脚本里,具体的位置可以参考66的录象教程。如果站上下不到的话那么土豆网或其他什么视频网应该都能找到……
作者: victor    时间: 2007-6-30 16:03
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1