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

Project1

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

[已经解决] 求fuki加强对话框脚本

[复制链接]

Lv2.观梦者

梦石
0
星屑
439
在线时间
38 小时
注册时间
2018-5-3
帖子
18
跳转到指定楼层
1
发表于 2019-5-4 21:05:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
下了十个左右的fuki对话框的脚本,但功能都不是很完善。
我想要一个真正能弹出对话框气泡的,能显示人物姓名的fuki对话框,并且支持66加强对话框的格式(尤其是输入\|会等待20帧,输入\!会等待玩家回车)这样的脚本。
下面这个是我找到的最好的了。有完美的弹出对话框,在使用fuki对话框时也能支持大部分66加强对话框的功能,除了这几个: \.(等待5帧) \|(等待20帧) \!(等待玩家回车) 这几个,我觉得这几个功能真的很重要。

我尝试自己改,但水平有限,没有改成功,跪求大佬帮忙啊!

  1. #============================================================================
  2. # 66加强对话框Fuki对话框整合+附送功能
  3. # By whbm
  4. #============================================================================

  5. #   说明:
  6. #     这是一个整合了66加强对话框和Fuki对话框功能脚本,你可以靠改变开关来切换
  7. #     两个脚本。
  8.    
  9. #     附送功能:
  10. #     在对话中按enter键跳过打字效果

  11. #   33号开关控制对话框的切换:
  12. #     打开--使用66加强对话框
  13. #     关闭--使用Fuki对话框
  14. #   34号开关控制附送功能的打开与关闭:
  15. #     打开--使用附送功能
  16. #     关闭--不使用附送功能

  17. #============================================================================
  18. # 66加强对话框说明--66rpg
  19. #============================================================================

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  44. # \>   :文字不用打字方式
  45. # \<   :文字使用打字方式

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

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

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

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

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

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

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

  55. # \Lk:清除左边的图像
  56. # \Rk:清除右边的图像







  57. #============================================================================
  58. # Fuki对话框说明--bbschat
  59. #============================================================================
  60. #
  61. #    呼出对话框 ver. 1.31 By パラ犬(日)
  62. #  来自 http://rpg.para.s3p.net/
  63. #
  64. #  汉化修改 66RPG bbschat(2006.1.5)
  65. #    来自
  66. #
  67. #    ●准备工作-窗口Skin
  68. #
  69. #    首先,确认自己使用的对话框窗口Skin,(数据库-系统-窗口外观图形)
  70. #    然后根据该窗口Skin制作对话框尾部使用的两个箭头图形
  71. #    尾部箭头图形命名方式:“窗口skin名-top”,“窗口skin名-under”
  72. #    将该图形文件存放在“Graphics/Windowskins”文件夹下。
  73. #
  74. #    本演示游戏内置2套窗口和箭头图形,
  75. #    一套是游戏默认的“001-Blue01”,一套是定制的“fk”
  76. #    玩家可以根据自己的需要参照样本定制自己的呼出对话框窗口Skin。
  77. #
  78. #    ●呼出对话框使用方法
  79. #
  80. #    在事件命令行使用[脚本]将事件ID代入[$mes_id]
  81. #    该事件就可以使用呼出对话框了。
  82. #   (举例:$mes_id=4)
  83. #
  84. #    ID 代入 -1 表示玩家,代入 0 表示事件自身。
  85. #    代入 nil 或者 "" 则返回成通常的信息窗口。
  86. #    对话框的表示位置可以通过事件的“更改文章选项”来设定(上、中、下)。
  87. #    表示位置为“中央”的话,不管事件位置在哪里,对话框都将显示在画面中央。
  88. #
  89. #    ●角色名字窗口的使用文字的方法
  90. #
  91. #    在事件命令行使用[脚本]将文字列代入[$mes_name]
  92. #    对话框就会显示角色名字窗口
  93. #   (举例:$mes_name="阿尔西斯")
  94. #    代入 nil 或者 "" 则不显示角色名字窗口。
  95. #
  96. #    以上两个机能是独立的,所以可以单独使用
  97. #
  98. #   $mes_id=(ID) + $mes_name="名字"  :呼出对话框显示 + 角色名字窗口
  99. #   $mes_id=(ID) + $mes_name=""      :呼出对话框显示(没有角色名字)
  100. #   $mes_id=nil  + $mes_name="名字"  :默认信息窗口 + 角色名字窗口
  101. #   $mes_id=nil  + $mes_name=""      :默认信息窗口(没有角色名字)
  102. #
  103. #    ●角色名字窗口使用角色图片的方法(汉化特别追加功能,原脚本只能使用文字)
  104. #   
  105. #    如果能在对应文件夹中找到文件名和角色名字相同的图片,   
  106. #    则角色名字窗口显示角色头像图片,角色图片最好能包括角色的名字。
  107. #    默认头像图片保存目录为“Graphics/Heads/”,玩家可自行修改。
  108. #
  109. #    如果不想使用角色名字直接作为头像文件名。
  110. #    可以使用下面在 Game_Temp 类里增加的namebmp属性。
  111. #    重新设定角色名字与文件名的对应关系。
  112. #
  113. #    ●信息表示速度的变更方法
  114. #
  115. #    在事件命令行使用[脚本]将数值代入[$mes_speed]
  116. #    速度为 0 即瞬间显示全部信息,数字越大,信息表示速度越慢。
  117. #   (举例:$mes_speed=1)
  118. #
  119. #    ●其他设置
  120. #
  121. #    请参照下面的注释
  122. #
  123. #    补一句,用脚本chat(id,"名字")就相当于$mes_id=ID;$mes_name="名字"
  124. #==============================================================================

  125. module FUKI

  126. # 头像图片保存目录的设定
  127. HEAD_PIC_DIR = "Graphics/Heads/"

  128. # 是否显示尾部图标
  129. TAIL_SHOW = true

  130. # Skin的设定
  131. # 使用数据库默认窗口Skin情况下这里使用[""]
  132. FUKI_SKIN_NAME = "fk"   # 呼出对话框用Skin
  133. NAME_SKIN_NAME = "fk"   # 角色名字窗口用Skin

  134. # 字体大小
  135. MES_FONT_SIZE = 22    # 呼出对话框
  136. NAME_FONT_SIZE = 14   # 角色名字窗口

  137. # 字体颜色
  138. #(设定为 Color.new(0, 0, 0, 0) 表示使用普通文字色)
  139. FUKI_COLOR = Color.new(255, 255, 255, 255)  # 呼出对话框
  140. NAME_COLOR = Color.new(255, 255, 255, 255)  # 角色名字窗口

  141. # 窗口透明度
  142. # 如修改窗口透明度请同时修改尾部箭头图形内部的透明度
  143. FUKI_OPACITY = 160    # 呼出对话框
  144. MES_OPACITY = 255     # 默认信息窗口
  145. NAME_OPACITY = 255    # 角色名字窗口

  146. # 角色名字窗口的相对位置
  147. NAME_SHIFT_X = 0      # 横坐标
  148. NAME_SHIFT_Y = 16     # 纵坐标

  149. # 窗口表示时是否根据画面大小自动检查窗口出现的位置,
  150. # 自动改变位置( true / false )
  151. # 设置成 true 可能出现箭头图标颠倒的问题 <- bbschat
  152. POS_FIX = false

  153. # 在画面最边缘表示时的稍微挪动
  154. # 使用圆形Skin的角和方框的角重合的情况下为 true
  155. CORNER_SHIFT = false
  156. SHIFT_PIXEL = 4   # true 时挪动的象素

  157. # 角色高度尺寸
  158. CHARACTOR_HEIGHT = 48
  159. # 呼出对话框的相对位置(纵坐标)
  160. POP_SHIFT_TOP = 0         # 表示位置为上的时候
  161. POP_SHIFT_UNDER = 0       # 表示位置为下的时候

  162. # 信息的表示速度(数字越小速度越快,0为瞬间表示)
  163. # 游戏中 可随时用数字代入 $mes_speed 来改变消息表示速度。
  164. MES_SPEED = 1

  165. end

  166. #==============================================================================
  167. # 方便用户同时设置2个常用参数而使用的函数
  168. #==============================================================================
  169. def chat(id = 0,name = "")
  170. $mes_id = id
  171. $mes_name = name
  172. end

  173. #==============================================================================
  174. # □ Game_Temp
  175. #==============================================================================

  176. class Game_Temp
  177. attr_accessor  :namebmp              #保存头像图片的Hash表
  178. alias initialize_fuki initialize
  179. def initialize
  180.   initialize_fuki
  181.   # 如果不想使用角色名字直接作为头像文件名
  182.   # 可在这里重新设定角色名字与文件名的对应关系
  183.   @namebmp ={"莉德露"=>"001-Player-Face",
  184.   }
  185. end
  186. end
  187. #==============================================================================
  188. # □ Game_System
  189. #==============================================================================
  190. class Game_System
  191. attr_accessor :typing
  192. attr_accessor :soundname_on_speak
  193. alias carol3_ini initialize
  194. def initialize
  195.   carol3_ini
  196.   @typing = true
  197.   @soundname_on_speak = nil
  198. end
  199. end
  200. #==============================================================================
  201. # □ Window_FukiMessage
  202. #==============================================================================

  203. class Window_FukiMessage < Window_Selectable

  204. #--------------------------------------------------------------------------
  205. # ● 初始化状态
  206. #--------------------------------------------------------------------------
  207. def initialize
  208.   super(80, 304, 480, 160)
  209.   self.contents = Bitmap.new(width - 32, height - 32)
  210.   self.visible = false
  211.   self.z = 9998
  212.   @fade_in = false
  213.   @fade_out = false
  214.   @contents_showing = false
  215.   @cursor_width = 0
  216.   self.active = false
  217.   self.index = -1
  218.   #........................................................................
  219.   if $game_system.soundname_on_speak == nil then
  220.     $game_system.soundname_on_speak = ""
  221.   end
  222.   @opacity_text_buf = Bitmap.new(32, 32)
  223.   #........................................................................
  224.   @w = 0
  225.   @h = 0
  226.   @wait = 0
  227.   @dx = 0
  228.   @dy = 0
  229.   $mes_speed = FUKI::MES_SPEED
  230. end

  231. #--------------------------------------------------------------------------
  232. # ○ 决定窗口尺寸并生成窗口
  233. #--------------------------------------------------------------------------
  234. def refresh_create
  235.   self.contents.clear
  236.   self.contents.font.color = normal_color
  237.   self.contents.font.size = FUKI::MES_FONT_SIZE
  238.   # 取得窗口尺寸
  239.   get_windowsize
  240.   w = @w + 32 + 8
  241.   h = @h * (self.contents.font.size + 10) + 26
  242.   # 生成呼出窗口
  243.   set_fukidasi(self.x, self.y, w, h)
  244.   # 生成角色名字窗口
  245.   set_namewindow
  246.   # 初始化信息表示使用的变量
  247.   @dx = @dy = 0
  248.   @cursor_width = 0
  249.   @contents_drawing = true
  250.   # 瞬间表示的情况下
  251.   if $mes_speed == 0
  252.     # 循环信息描绘处理
  253.     while $game_temp.message_text != ""
  254.       draw_massage
  255.     end
  256.     draw_opt_text
  257.     @contents_showing_end = true
  258.     @contents_drawing = false
  259.   else
  260.     # 一个一个描绘文字
  261.     refresh_drawtext
  262.   end
  263. end

  264. #--------------------------------------------------------------------------
  265. # ○ 一个一个描绘文字
  266. #--------------------------------------------------------------------------
  267. def refresh_drawtext
  268.   #........................................................................
  269.   if Input.trigger?(Input::C) and $game_switches[34]
  270.     # 循环信息描绘处理
  271.     while $game_temp.message_text != ""
  272.       draw_massage
  273.     end
  274.     draw_opt_text
  275.     @contents_showing_end = true
  276.     @contents_drawing = false
  277.   end
  278.   #........................................................................
  279.   if $game_temp.message_text != nil
  280.     if @wait > 0
  281.       @wait -= 1
  282.     elsif @wait == 0
  283.       # 描绘处理
  284.       draw_massage
  285.       #追加音效
  286.     #  Audio.se_play("Audio/SE/系统-光标.wav",70,100)
  287.       @wait = $mes_speed
  288.     end
  289.   end
  290.   # 描绘结束
  291.   if $game_temp.message_text == ""
  292.     draw_opt_text
  293.     @contents_showing_end = true
  294.     @contents_drawing = false
  295.   end
  296. end

  297. #--------------------------------------------------------------------------
  298. # ○ 66rpg-refresh
  299. #--------------------------------------------------------------------------
  300. def refresh
  301.    # 初期化
  302.    self.contents.clear
  303.    self.contents.font.color = normal_color
  304.    self.contents.font.size = Font.default_size
  305.    @x = @y = @max_x = @max_y = @indent = @lines = 0
  306.    @left_keep = @right_keep = false
  307.    @face_indent = 0
  308.    @opacity = 255
  309.    @cursor_width = 0
  310.    @write_speed = 0
  311.    @write_wait = 0
  312.    @mid_stop = false
  313.    @face_file = nil
  314.    @popchar = -2
  315.    if $game_temp.choice_start == 0
  316.      @x = 8
  317.    end
  318.    if $game_temp.message_text != nil
  319.      @now_text = $game_temp.message_text
  320. #          backlog = @now_text.clone
  321. #     $game_system.backlog_line += backlog.split(/\n/).size
  322. #     $game_system.backlog.push(backlog)
  323.      #——头像设置
  324.      if (/\\[Ff]\[(.+?)\]/.match(@now_text))!=nil then
  325.        @face_file = $1 + ".png"
  326.        @x = @face_indent = 128
  327.        if FileTest.exist?("Graphics/Pictures/" + $1 + ".png")
  328.          self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  329.        end
  330.        @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  331.      end
  332.      #——左半身像设置
  333.      if (/\\[Ll]\[(.+?)\]/.match(@now_text))!=nil then
  334.        @face = "66rpg_" + $1 + "_h.png"
  335.        if $加密 == true
  336.          if @left_picture != nil
  337.            @left_picture.dispose
  338.          end
  339.          @left_picture = Sprite.new
  340.          @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  341.          @left_picture.y = 480-@left_picture.bitmap.height
  342.          @left_picture.x = 0
  343.          @left_picture.mirror = true
  344.          @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  345.        else         
  346.          if FileTest.exist?("Graphics/battlers/#{@face}")
  347.            if @left_picture != nil
  348.              @left_picture.dispose
  349.            end
  350.            @left_picture = Sprite.new
  351.            @left_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  352.            @left_picture.y = 480-@left_picture.bitmap.height
  353.            @left_picture.x = 0
  354.            @left_picture.mirror = true
  355.            @now_text.gsub!(/\\[Ll]\[(.*?)\]/) { "" }
  356.          end
  357.        end        
  358.      end
  359.      #——右半身像设置
  360.      if (/\\[Rr]\[(.+?)\]/.match(@now_text))!=nil then
  361.        @face = "66rpg_" + $1 + "_h.png"
  362.        if $加密 == true
  363.          if @right_picture != nil
  364.            @right_picture.dispose
  365.          end
  366.          @right_picture = Sprite.new
  367.          @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  368.          @right_picture.y = 480-@right_picture.bitmap.height
  369.          @right_picture.x = 640-@right_picture.bitmap.width
  370.          @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  371.        else
  372.          if FileTest.exist?("Graphics/battlers/#{@face}")
  373.            if @right_picture != nil
  374.              @right_picture.dispose
  375.            end
  376.            @right_picture = Sprite.new
  377.            @right_picture.bitmap = Bitmap.new("Graphics/battlers/#{@face}")
  378.            @right_picture.y = 480-@right_picture.bitmap.height
  379.            @right_picture.x = 640-@right_picture.bitmap.width
  380.            @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "" }
  381.          end
  382.        end
  383.      end
  384.      if (/\\[Rr]k/.match(@now_text)) != nil
  385.        @right_keep = true
  386.        @now_text.sub!(/\\[Rr]k/) { "" }
  387.      end
  388.      if (/\\[Ll]k/.match(@now_text)) != nil
  389.        @left_keep = true
  390.        @now_text.sub!(/\\[Ll]k/) { "" }
  391.      end
  392.      # 显示人物姓名
  393.      name_window_set = false
  394.      if (/\\[Nn]ame\[(.+?)\]/.match(@now_text)) != nil
  395.        name_window_set = true
  396.        name_text = $1
  397.        @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  398.      end
  399.      
  400.      # 文字位置的判定
  401.      if (/\\[Pp]\[([-1,0-9]+)\]/.match(@now_text))!=nil then
  402.        @popchar = $1.to_i
  403.        if @popchar == -1
  404.          @x = @indent = 48
  405.          @y = 4
  406.        end
  407.        @now_text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { "" }
  408.      end
  409. #           backlog = @now_text.clone
  410. #     $game_system.backlog_line += backlog.split(/\n/).size
  411. #     $game_system.backlog.push(backlog)   
  412.      # 开始
  413.      begin
  414.        last_text = @now_text.clone
  415.        @now_text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  416.      end until @now_text == last_text
  417.      @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  418.      $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  419.    end
  420.    @now_text.gsub!(/\\\\/) { "\000" }
  421.    @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  422.    @now_text.gsub!(/\\[Gg]/) { "\002" }
  423.    @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  424.    @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  425.    @now_text.gsub!(/\\[.]/) { "\005" }
  426.    @now_text.gsub!(/\\[|]/) { "\006" }

  427.    @now_text.gsub!(/\\[>]/) { "\016" }
  428.    @now_text.gsub!(/\\[<]/) { "\017" }
  429.    @now_text.gsub!(/\\[!]/) { "\020" }
  430.    @now_text.gsub!(/\\[~]/) { "\021" }
  431.    
  432.    @now_text.gsub!(/\\[Ii]/) { "\023" }
  433.    @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  434.    @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  435.    @now_text.gsub!(/\\[Bb]\[([0-9]+)\]/) { "\026[#{$1}]" }
  436.    @now_text.gsub!(/\\[Kk]\[(.*?)\]/) { "\027[#{$1}]" }
  437.    if @popchar >= 0
  438.      @text_save = @now_text.clone
  439.      @max_x = 0
  440.      @max_y = 4
  441.      for i in 0..3
  442.        line = @now_text.split(/\n/)[3-i]
  443.        @max_y -= 1 if line == nil and @max_y <= 4-i
  444.        next if line == nil
  445.        cx = contents.text_size(line).width
  446.        @max_x = cx if cx > @max_x
  447.      end
  448.      self.width = @max_x + 48 + @face_indent
  449.      self.height = (@max_y - 1) * 32 + 64
  450.    else
  451.      @max_x = self.width - 32 - @face_indent
  452.    end
  453.    reset_window
  454.      if name_window_set
  455.        off_x = 0
  456.        off_y = -40
  457.        space = 2
  458.        x = self.x + off_x - space / 2
  459.        y = self.y + off_y - space / 2
  460.        w = self.contents.text_size(name_text).width + 26 + space
  461.        h = 40 + space
  462.        @name_window_frame = Window_Frame.new(x, y, w, h)
  463.        @name_window_frame.z = self.z + 1
  464.        x = self.x + off_x + 4
  465.        y = self.y + off_y
  466.        @name_window_text = Air_Text.new(x+4, y+6, name_text)
  467.        @name_window_text.z = self.z + 2
  468.      end
  469.    end
  470.    reset_window
  471.    if $game_temp.choice_max > 0
  472.      @item_max = $game_temp.choice_max
  473.      self.active = true
  474.      self.index = 0
  475.    end
  476.    if $game_temp.num_input_variable_id > 0
  477.      digits_max = $game_temp.num_input_digits_max
  478.      number = $game_variables[$game_temp.num_input_variable_id]
  479.      @input_number_window = Window_InputNumber.new(digits_max)
  480.      @input_number_window.number = number
  481.      @input_number_window.x = self.x + 8
  482.      @input_number_window.y = self.y + $game_temp.num_input_start * 32
  483.    end
  484.                     backlog = @now_text.clone
  485.       $game_system.backlog_line += backlog.split(/\n/).size
  486.       $game_system.backlog.push(backlog)
  487. end



  488. #==============================================================================
  489. # ■ Window_Frame (枠だけで中身の無いウィンドウ)
  490. #==============================================================================
  491. class Window_Frame < Window_Base
  492. #--------------------------------------------------------------------------
  493. # ● オブジェクト初期化
  494. #--------------------------------------------------------------------------
  495. def initialize(x, y, width, height)
  496.   super(x, y, width, height)
  497.   self.contents = nil
  498.   self.back_opacity = 100
  499. end
  500. #--------------------------------------------------------------------------
  501. # ● 解放
  502. #--------------------------------------------------------------------------
  503. def dispose
  504.   super
  505. end
  506. end

  507. #==============================================================================
  508. # ■ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  509. #==============================================================================
  510. class Air_Text < Window_Base
  511. #--------------------------------------------------------------------------
  512. # ● オブジェクト初期化
  513. #--------------------------------------------------------------------------
  514. def initialize(x, y, designate_text)
  515.    super(x-16, y-16, 32 + designate_text.size * 12, 56)
  516.    self.opacity = 0
  517.    self.back_opacity = 0
  518.    self.contents = Bitmap.new(self.width - 32, self.height - 32)
  519.    w = self.contents.width
  520.    h = self.contents.height
  521.    self.contents.draw_text(0, 0, w, h, designate_text)
  522. end
  523. #--------------------------------------------------------------------------
  524. # ● 解放
  525. #--------------------------------------------------------------------------
  526. def dispose
  527.    self.contents.clear
  528.    super
  529. end
  530. end


  531. #--------------------------------------------------------------------------
  532. # ○ 取得窗口尺寸
  533. #--------------------------------------------------------------------------
  534. def get_windowsize
  535.   x = y = 0
  536.   @h = @w = 0
  537.   @cursor_width = 0
  538.   # 有选择项的话,处理字的缩进
  539.   if $game_temp.choice_start == 0
  540.     x = 16
  541.   end
  542.   # 有等待显示的文字的情况下
  543.   if $game_temp.message_text != nil
  544.   text = $game_temp.message_text.clone
  545.     # 限制文字处理
  546.     begin
  547.       last_text = text.clone
  548.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  549.     end until text == last_text
  550.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  551.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  552.     end
  553.     # 为了方便、将 "\\\\" 变换为 "\000"
  554.     text.gsub!(/\\\\/) { "\000" }
  555.     # "\\C" 变为 "\001" 、"\\G" 变为 "\002"
  556.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001" }
  557.     text.gsub!(/\\[Gg]/) { "\002" }
  558.     # c 获取 1 个字 (如果不能取得文字就循环)
  559.     while ((c = text.slice!(/./m)) != nil)
  560.       # \\ 的情况下
  561.       if c == "\000"
  562.         # 还原为本来的文字
  563.         c = "\\"
  564.       end
  565.       # \C[n] 或者 \G 的情况下
  566.       if c == "\001" or c == "\002"
  567.         # 下面的文字
  568.         next
  569.       end
  570.       # 另起一行文字的情况下
  571.       if c == "\n"
  572.         # y 累加 1
  573.         y += 1
  574.         # 取得纵横尺寸
  575.         @h = y
  576.         @w = x > @w ? x : @w
  577.         if y >= $game_temp.choice_start
  578.           @w = x + 8 > @w ? x + 8 : @w
  579.         end
  580.         x = 0
  581.         # 移动到选择项的下一行
  582.         if y >= $game_temp.choice_start
  583.           x = 8
  584.         end
  585.         # 下面的文字
  586.         next
  587.       end
  588.       # x 为要描绘文字的宽度加法运算
  589.       x += self.contents.text_size(c).width
  590.     end
  591.   end
  592.   # 输入数值的情况
  593.   if $game_temp.num_input_variable_id > 0
  594.     digits_max = $game_temp.num_input_digits_max
  595.     number = $game_variables[$game_temp.num_input_variable_id]
  596.     @h += 1
  597.     x = digits_max * self.contents.font.size + 16
  598.     @w = x > @w ? x : @w
  599.   end
  600. end

  601. #--------------------------------------------------------------------------
  602. # ○ 描绘信息处理
  603. #--------------------------------------------------------------------------
  604. def draw_massage
  605.   # 有等待显示的文字的情况下
  606.   if $game_temp.message_text != nil
  607.     text = $game_temp.message_text
  608.     # 限制文字处理
  609.     begin
  610.       last_text = text.clone
  611.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  612.     end until text == last_text
  613.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  614.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  615.     end
  616.     # 为了方便、将 "\\\\" 变换为 "\000"
  617.     text.gsub!(/\\\\/) { "\000" }
  618.     # "\\C" 变为 "\001"、"\\G" 变为 "\002"
  619.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  620.     text.gsub!(/\\[Gg]/) { "\002" }
  621.     # c 获取 1 个字
  622.     if ((c = text.slice!(/./m)) != nil)
  623.       # 选择项的情况
  624.       if @dy >= $game_temp.choice_start
  625.         # 处理字的缩进
  626.         @dx = 8
  627.         # 描绘文字
  628.         self.contents.draw_text(4 + @dx, 32 * @dy, 40, 32, c)
  629.         # x 为要描绘文字宽度的加法运算
  630.         @dx += self.contents.text_size(c).width
  631.         # 循环
  632.         while ((c = text.slice!(/./m)) != "\n")
  633.           # 描绘文字
  634.           self.contents.draw_text(4 + @dx, 32 * @dy, 40, 32, c)
  635.           # x 为要描绘文字宽度的加法运算
  636.           @dx += self.contents.text_size(c).width
  637.         end
  638.         if c == "\n"
  639.           # 更新光标宽度
  640.           @cursor_width = [@cursor_width, @dx].max
  641.           # dy 累加 1
  642.           @dy += 1
  643.           @dx = 0
  644.         end
  645.         return
  646.       end
  647.       # \\ 的情况下
  648.       if c == "\000"
  649.         # 还原为本来的文字
  650.         c = "\\"
  651.       end
  652.       #\C[n] 的情况下
  653.       if c == "\001"
  654.         # 更改文字色
  655.         text.sub!(/\[([0-9]+)\]/, "")
  656.         color = $1.to_i
  657.         if color >= 0 and color <= 7
  658.           self.contents.font.color = text_color(color)
  659.         end
  660.       end
  661.       # \G 的情况下
  662.       if c == "\002"
  663.         # 生成金钱窗口
  664.         if @gold_window == nil
  665.           @gold_window = Window_Gold.new
  666.           @gold_window.x = 560 - @gold_window.width
  667.           if $game_temp.in_battle
  668.             @gold_window.y = 192
  669.           else
  670.             @gold_window.y = self.y >= 128 ? 32 : 384
  671.           end
  672.           @gold_window.opacity = self.opacity
  673.           @gold_window.back_opacity = self.back_opacity
  674.         end
  675.       end
  676.       # 另起一行文字的情况下
  677.       if c == "\n"
  678.         # dy 累加 1
  679.         @dy += 1
  680.         @dx = 0
  681.       end
  682.       # 描绘文字
  683.       self.contents.font.size = FUKI::MES_FONT_SIZE
  684.       font_size = self.contents.font.size
  685.       #self.contents.draw_text(4+@dx, (font_size+10)*@dy, font_size, font_size, c)
  686.       if c == "\001" or c == "\002" or c == "\003" or c == "\n"
  687.          c = ""
  688.        else
  689.          self.contents.draw_text(4+@dx, (font_size+10)*@dy, font_size, font_size, c)
  690.        end
  691.       # dx 为要描绘文字的宽度加法运算
  692.       @dx += self.contents.text_size(c).width
  693.     end
  694.   end
  695. end

  696. #--------------------------------------------------------------------------
  697. # ○ 选择项和输入数值的情况下
  698. #--------------------------------------------------------------------------
  699. def draw_opt_text
  700.   # 选择项的情况下
  701.   if $game_temp.choice_max > 0
  702.     @item_max = $game_temp.choice_max
  703.     self.active = true
  704.     self.index = 0
  705.   end
  706.   # 输入数值的情况下
  707.   if $game_temp.num_input_variable_id > 0
  708.     digits_max = $game_temp.num_input_digits_max
  709.     number = $game_variables[$game_temp.num_input_variable_id]
  710.     @input_number_window = Window_InputNumber.new(digits_max)
  711.     @input_number_window.number = number
  712.     @input_number_window.x = self.x + 8
  713.     @input_number_window.y = self.y + $game_temp.num_input_start * 32
  714.   end
  715. end

  716. #--------------------------------------------------------------------------
  717. # ○ 设置呼出对话框
  718. #--------------------------------------------------------------------------
  719. def set_fukidasi(x, y, width, height)
  720.   # $mes_id 为空的时候,不显示呼出对话框
  721.   if $mes_id == nil or $mes_id == ""
  722.     del_fukidasi
  723.     reset_window
  724.   else
  725.     # 不显示暂停标志
  726.     self.pause = false
  727.     # 取得对话框位置
  728.     pos = get_fuki_pos(width, height)
  729.     x = pos[0]
  730.     y = pos[1]
  731.     skin = FUKI::FUKI_SKIN_NAME != "" ? FUKI::FUKI_SKIN_NAME : $game_system.windowskin_name
  732.     # 生成呼出对话框
  733.     self.windowskin = RPG::Cache.windowskin(skin)
  734.     self.x = x
  735.     self.y = y
  736.     self.height = height
  737.     self.width = width
  738.     self.contents.dispose
  739.     self.contents = Bitmap.new(width - 32, height - 32)
  740.     self.back_opacity = FUKI::FUKI_OPACITY
  741.     self.contents.clear
  742.     self.contents.font.color = normal_color
  743.     self.contents.font.size = FUKI::MES_FONT_SIZE
  744.     # 描绘尾部图标
  745.     if $game_system.message_frame == 0
  746.       # 取得位置
  747.       tale_pos = get_tale_pos
  748.       @tale = Sprite.new
  749.       # 是否显示尾部图标 <- bbschat
  750.       if FUKI::TAIL_SHOW == true
  751.         case @message_position
  752.           when 0  # 上
  753.             @tale.bitmap = RPG::Cache.windowskin(skin + "-top")
  754.             @tale.x = tale_pos[0]
  755.             @tale.y = tale_pos[1]
  756.             @tale.z = self.z + 1
  757.           when 1  # 中
  758.             @tale.dispose
  759.             @tale = nil
  760.           when 2  # 下
  761.             @tale.bitmap = RPG::Cache.windowskin(skin + "-under")
  762.             @tale.x = tale_pos[0]
  763.             @tale.y = tale_pos[1]
  764.             @tale.z = self.z + 1
  765.         end
  766.       end
  767.     end
  768.   end
  769. end

  770. #--------------------------------------------------------------------------
  771. # ○ 计算呼出对话框的位置
  772. #--------------------------------------------------------------------------
  773. def get_fuki_pos(width, height)
  774.   
  775.   # 取得角色
  776.   @character = get_character($mes_id)
  777.   if @character == nil
  778.     # 角色不存在的情况下使用默认信息框
  779.     del_fukidasi
  780.     reset_window
  781.     return
  782.   end
  783.   # 处理坐标
  784.   x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - (width / 2)
  785.   # 为尽量显示在画面内而移动横坐标
  786.   if x + width > 640
  787.     x = 640 - width
  788.   elsif x < 0
  789.     x = 0
  790.   end
  791.   # 决定窗口位置
  792.   case $game_system.message_position
  793.     when 0  # 上
  794.       y = (@character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
  795.     when 1  # 中
  796.       y = (480 - height) / 2
  797.       x = (640 - width) / 2
  798.     when 2  # 下
  799.       y =  (@character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
  800.   end
  801.   # 纪录文章显示位置
  802.   @message_position = $game_system.message_position
  803.   # 如果选择自动修正,则如果文章会显示到画面外则自动改变窗口的尺寸(高度)
  804.   if FUKI::POS_FIX
  805.     case @message_position
  806.       when 0  # 上
  807.         if y <= 0
  808.           @message_position = 2
  809.           y =  (@character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER
  810.         end
  811.       when 2  # 下
  812.         if y + height >= 480
  813.           p "上"
  814.           @message_position = 0
  815.           y = (@character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP
  816.         end
  817.     end
  818.   end
  819.   return [x,y]
  820.   
  821. end

  822. #--------------------------------------------------------------------------
  823. # ○ 计算尾部图标的位置
  824. #--------------------------------------------------------------------------
  825. def get_tale_pos
  826.   case @message_position
  827.     when 0  # 上
  828.       # 处理坐标
  829.       x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
  830.       # 画面边缘的话则移动位置
  831.       if FUKI::CORNER_SHIFT
  832.         if x == 0
  833.           x = FUKI::SHIFT_PIXEL
  834.         elsif x == 640 - 32
  835.           x = 640 - 32 - FUKI::SHIFT_PIXEL
  836.         end
  837.       end
  838.       y = self.y + self.height - 16
  839.     when 1  # 中
  840.       x = nil
  841.       y = nil
  842.     when 2  # 下
  843.       # 处理坐标
  844.       x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16
  845.       # 画面边缘的话则移动位置
  846.       if FUKI::CORNER_SHIFT
  847.         if x == 0
  848.           x = FUKI::SHIFT_PIXEL
  849.         elsif @tale.x == 640 - 32
  850.           x = 640 - 32 - FUKI::SHIFT_PIXEL
  851.         end
  852.       end
  853.       y = self.y - 16
  854.   end
  855.   return [x,y]
  856. end

  857. #--------------------------------------------------------------------------
  858. # ○ 计算名字窗口的位置
  859. #--------------------------------------------------------------------------
  860. def get_name_pos
  861.   case @face_pic_txt
  862.     when 0  # 文字
  863.       x = self.x + FUKI::NAME_SHIFT_X
  864.       y = self.y - FUKI::NAME_FONT_SIZE - 16 + FUKI::NAME_SHIFT_Y
  865.     when 1  # 图片
  866.       if self.x >= @pic_width + 5
  867.         # 默认头像显示在对话框左边
  868.         x = self.x-@pic_width-5
  869.       else
  870.         # 对话框左边放不下时头像显示在右边
  871.         x = self.x + self.width
  872.       end
  873.       y = self.y+self.height/2 - (@pic_height + 5)/2
  874.     end

  875.   return [x,y]
  876. end
  877. #--------------------------------------------------------------------------
  878. # ○ 设置角色名字窗口
  879. #--------------------------------------------------------------------------
  880. def set_namewindow
  881.   
  882.   # $mes_name为空时不显示角色名字窗口
  883.   if $mes_name == nil or $mes_name == ""
  884.     return
  885.   else
  886.     # 设定变量
  887.     mes_name = $mes_name
  888.     skin = FUKI::NAME_SKIN_NAME != "" ? FUKI::NAME_SKIN_NAME : $game_system.windowskin_name
  889.    
  890.     #判断名称是否有对应的图片"Graphics/heads/" +
  891.     if $game_temp.namebmp[mes_name] == nil then
  892.       sFile = "Graphics/heads/" + mes_name + ".png"
  893.     else
  894.       sFile = "Graphics/heads/" + $game_temp.namebmp[mes_name] + ".png"
  895.     end
  896.    
  897.     if FileTest.exist?(sFile) == true then
  898.       
  899.       @face_pic_txt = 1                       #名字窗口使用头像<- bbschat
  900.       
  901.       # 生成头像
  902.       bmp = Bitmap.new(sFile)
  903.       @pic_width = bmp.width
  904.       @pic_height = bmp.height
  905.       
  906.       if self.x >= @pic_width + 5
  907.         # 默认头像显示在对话框左边
  908.         name_x = self.x-@pic_width-5
  909.       else
  910.         # 对话框左边放不下时头像显示在右边
  911.         name_x = self.x + self.width
  912.       end
  913.       name_y = self.y+self.height/2 - (@pic_height + 5)/2
  914.       
  915.       # 生成角色头像窗口
  916.       @name_win = Window_Base.new(name_x, name_y, @pic_width + 5, @pic_height + 5)
  917.       @name_win.windowskin = RPG::Cache.windowskin(skin)
  918.       @name_win.back_opacity =0     
  919.       @name_win.z = self.z + 1
  920.       
  921.       @name_contents = Sprite.new
  922.       @name_contents.x = name_x + 2
  923.       @name_contents.y = name_y + 2
  924.       @name_contents.bitmap = bmp
  925.       #@name_contents.z = @name_win.z + 2     #这个用了似乎效果不好<- bbschat
  926.       
  927.     else
  928.       
  929.       @face_pic_txt = 0                       #名字窗口使用文字<- bbschat

  930.       # 生成名字
  931.       name_width = mes_name.size / 2 * FUKI::NAME_FONT_SIZE
  932.       name_height = FUKI::NAME_FONT_SIZE
  933.       name_x = self.x + FUKI::NAME_SHIFT_X
  934.       name_y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y

  935.       # 生成角色名字窗口(只有边框)
  936.       @name_win = Window_Base.new(name_x, name_y, name_width + 16, name_height + 16)
  937.       @name_win.windowskin = RPG::Cache.windowskin(skin)
  938.       @name_win.back_opacity = FUKI::NAME_OPACITY
  939.       @name_win.z = self.z + 1
  940.       
  941.       # 为了使空白比Windows类限定的更小使用双重结构
  942.       @name_contents = Sprite.new
  943.       @name_contents.x = name_x + 12
  944.       @name_contents.y = name_y + 8
  945.       @name_contents.bitmap = Bitmap.new(name_width, name_height)
  946.       @name_contents.z = @name_win.z + 2
  947.       
  948.       # 设定文字色
  949.       nil_color = Color.new(0,0,0,0)
  950.       if FUKI::NAME_COLOR != nil_color
  951.         @name_contents.bitmap.font.color = FUKI::NAME_COLOR
  952.       else
  953.         @name_contents.bitmap.font.color = normal_color
  954.       end
  955.       @name_contents.bitmap.font.size = FUKI::NAME_FONT_SIZE
  956.       # 调整窗口尺寸
  957.       rect = @name_contents.bitmap.text_size(mes_name)
  958.       @name_win.width = rect.width + 32
  959.       # 描画名字
  960.       @name_contents.bitmap.draw_text(rect, mes_name)
  961.     end
  962.   end

  963. end

  964. #--------------------------------------------------------------------------
  965. # ○ 释放呼出对话框和角色名字窗口
  966. #--------------------------------------------------------------------------
  967. def del_fukidasi
  968.   if @tale != nil
  969.     @tale.dispose
  970.     @tale = nil
  971.   end
  972.   if @name_win != nil
  973.     @name_win.dispose
  974.     @name_win = nil
  975.     @name_contents.dispose
  976.     @name_contents = nil
  977.   end
  978.   self.opacity = 0
  979.   self.x = 80
  980.   self.width = 480
  981.   self.height = 160
  982.   self.contents.dispose
  983.   self.contents = Bitmap.new(width - 32, height - 32)
  984.   self.pause = true
  985. end

  986. #--------------------------------------------------------------------------
  987. # ○ 取得角色
  988. #     parameter : 参数
  989. #--------------------------------------------------------------------------
  990. def get_character(parameter)
  991. if $game_switches[33]
  992.   #........................................................................
  993.   case parameter
  994.   when 0
  995.     return $game_player
  996.   else
  997.     events = $game_map.events
  998.     return events == nil ? nil : events[parameter]
  999.   end
  1000.   #........................................................................
  1001. else
  1002.   # 参数分歧
  1003.   case parameter
  1004.   when -1  # 玩家
  1005.     return $game_player
  1006.   when 0   # 该事件
  1007.     events = $game_map.events
  1008.     return events == nil ? nil : events[$active_event_id]
  1009.   else     # 特定事件
  1010.    if parameter >0
  1011.      events = $game_map.events
  1012.      return events == nil ? nil : events[parameter]
  1013.    else
  1014.      $game_party.return_char(-parameter-2)
  1015.    end
  1016.   end
  1017. end
  1018. end

  1019. #--------------------------------------------------------------------------
  1020. # ● 设定窗口位置和不透明度
  1021. #--------------------------------------------------------------------------
  1022. def reset_window
  1023. if $game_switches[33]
  1024.    #........................................................................
  1025.    # 判定
  1026.    if @popchar >= 0
  1027.      events = $game_map.events
  1028.      if events != nil
  1029.        character = get_character(@popchar)
  1030.        x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  1031.        y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  1032.        self.x = x
  1033.        self.y = y
  1034.      end
  1035.    elsif @popchar == -1
  1036.      self.x = -4
  1037.      self.y = -4
  1038.      self.width = 648
  1039.      self.height = 488
  1040.    else
  1041.      if $game_temp.in_battle
  1042.        self.y = 16
  1043.        #y = 16
  1044.      else
  1045.        case $game_system.message_position
  1046.        when 0 # 上
  1047.          #self.y = 16
  1048.          self.y = 16
  1049.        when 1 # 中
  1050.          self.y = 160
  1051.        when 2 # 下
  1052.          self.y = 304
  1053.        end
  1054.        self.x = 80
  1055.        if @face_file == nil
  1056.          self.width = 480
  1057.        else
  1058.          self.width = 600
  1059.          self.x -= 60
  1060.        end
  1061.        self.height = 160
  1062.      end
  1063.    end
  1064.    self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1065.    if @face_file != nil
  1066.      self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  1067.    end
  1068.    if @popchar == -1
  1069.      self.opacity = 255
  1070.      self.back_opacity = 0
  1071.    elsif $game_system.message_frame == 0
  1072.      self.opacity = 255
  1073.      self.back_opacity = 200
  1074.    else
  1075.      self.opacity = 0
  1076.      self.back_opacity = 200
  1077.    end
  1078.    #........................................................................
  1079. else
  1080.   if $game_temp.in_battle
  1081.     #self.y = 16
  1082.     self.y = 16
  1083.   else
  1084.     case $game_system.message_position
  1085.     when 0  # 上
  1086.       self.y = 16
  1087.       #self.y = 16
  1088.     when 1  # 中
  1089.       self.y = 160
  1090.     when 2  # 下
  1091.       self.y = 304
  1092.     end
  1093.   end
  1094.   if $game_system.message_frame == 0
  1095.     self.opacity = 255
  1096.   else
  1097.     self.opacity = 0
  1098.   end
  1099.   self.back_opacity = FUKI::MES_OPACITY
  1100. end
  1101. end

  1102. #--------------------------------------------------------------------------
  1103. # ● line_height-66rpg
  1104. #--------------------------------------------------------------------------
  1105. # 返回値:行高
  1106. #--------------------------------------------------------------------------
  1107. def line_height
  1108.   return 32
  1109.   if self.contents.font.size >= 20 and self.contents.font.size <= 24
  1110.     return 32
  1111.   else
  1112.     return self.contents.font.size * 15 / 10
  1113.   end
  1114. end
  1115. #--------------------------------------------------------------------------
  1116. # ● \V 变换-66rpg
  1117. #--------------------------------------------------------------------------
  1118. def convart_value(option, index)
  1119.   option == nil ? option = "" : nil
  1120.   option.downcase!
  1121.   case option
  1122.     when "i"
  1123.       unless $data_items[index].name == nil
  1124.         r = sprintf("\030[%s]%s", $data_items[index].icon_name, $data_items[index].name)
  1125.       end
  1126.     when "w"
  1127.       unless $data_weapons[index].name == nil
  1128.         r = sprintf("\030[%s]%s", $data_weapons[index].icon_name, $data_weapons[index].name)
  1129.       end
  1130.     when "a"
  1131.       unless $data_armors[index].name == nil
  1132.         r = sprintf("\030[%s]%s", $data_armors[index].icon_name, $data_armors[index].name)
  1133.       end
  1134.     when "s"
  1135.       unless $data_skills[index].name == nil
  1136.         r = sprintf("\030[%s]%s", $data_skills[index].icon_name, $data_skills[index].name)
  1137.       end
  1138.     else
  1139.     r = $game_variables[index]
  1140.   end
  1141.   r == nil ? r = "" : nil
  1142.   return r
  1143. end
  1144. #--------------------------------------------------------------------------
  1145. # ● 刷新画面
  1146. #--------------------------------------------------------------------------
  1147. def update
  1148.   if $game_switches[33]
  1149.    #........................................................................
  1150.    super
  1151.    if @fade_in
  1152.      self.contents_opacity += 24
  1153.      if @input_number_window != nil
  1154.        @input_number_window.contents_opacity += 24
  1155.      end
  1156.      if self.contents_opacity == 255
  1157.        @fade_in = false
  1158.      end
  1159.      return
  1160.    end
  1161.    @now_text = nil if @now_text == ""
  1162.    
  1163.    if @now_text != nil and @mid_stop == false
  1164.      if @write_wait > 0
  1165.        @write_wait -= 1
  1166.        return
  1167.      end
  1168.      text_not_skip = $game_system.typing
  1169.      while true
  1170.        @max_x = @x if @max_x < @x
  1171.        @max_y = @y if @max_y < @y
  1172.        if (c = @now_text.slice!(/./m)) != nil
  1173.          if c == "\000"
  1174.            c = "\\"
  1175.          end
  1176.          if c == "\001"
  1177.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1178.            color = $1.to_i
  1179.            if color >= 0 and color <= 7
  1180.              self.contents.font.color = text_color(color)
  1181.            end
  1182.            c = ""
  1183.          end
  1184.          if c == "\002"
  1185.            if @gold_window == nil and @popchar <= 0
  1186.              @gold_window = Window_Gold.new
  1187.              @gold_window.x = 560 - @gold_window.width
  1188.              if $game_temp.in_battle
  1189.                @gold_window.y = 192
  1190.              else
  1191.                @gold_window.y = self.y >= 128 ? 32 : 384
  1192.              end
  1193.              @gold_window.opacity = self.opacity
  1194.              @gold_window.back_opacity = self.back_opacity
  1195.            end
  1196.            c = ""
  1197.          end
  1198.          if c == "\003"
  1199.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1200.            speed = $1.to_i
  1201.            if speed >= 0 and speed <= 19
  1202.              @write_speed = speed
  1203.            end
  1204.            c = ""
  1205.          end
  1206.          if c == "\004"
  1207.            @now_text.sub!(/\[(.*?)\]/, "")
  1208.            buftxt = $1.dup.to_s
  1209.            if buftxt.match(/\//) == nil and buftxt != "" then
  1210.              $game_system.soundname_on_speak = "Audio/SE/" + buftxt
  1211.            else
  1212.              $game_system.soundname_on_speak = buftxt.dup
  1213.            end
  1214.            c = ""
  1215.          elsif c == "\004"
  1216.            c = ""
  1217.          end
  1218.          if c == "\005"
  1219.            @write_wait += 5
  1220.            c = ""
  1221.          end
  1222.          if c == "\006"
  1223.            @write_wait += 20
  1224.            c = ""
  1225.          end
  1226.          if c == "\016"
  1227.            text_not_skip = false
  1228.            c = ""
  1229.          end
  1230.          if c == "\017"
  1231.            text_not_skip = true
  1232.            c = ""
  1233.          end
  1234.          if c == "\020"
  1235.            @mid_stop = true
  1236.            c = ""
  1237.          end
  1238.          if c == "\021"
  1239.            terminate_message
  1240.            return
  1241.          end
  1242.          if c == "\023"
  1243.            @indent = @x
  1244.            c = ""
  1245.          end
  1246.          if c == "\024"
  1247.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1248.            @opacity = $1.to_i
  1249.            c = ""
  1250.          end
  1251.          if c == "\025"
  1252.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1253.            self.contents.font.size = [[$1.to_i, 6].max, 32].min
  1254.            c = ""
  1255.          end
  1256.          if c == "\026"
  1257.            @now_text.sub!(/\[([0-9]+)\]/, "")
  1258.            @x += $1.to_i
  1259.            c = ""
  1260.          end
  1261.          if c == "\027"
  1262.            @now_text.sub!(/\[(.*?)\]/, "")
  1263.            @x += ruby_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), $1, @opacity)
  1264.            if $game_system.soundname_on_speak != ""
  1265.              Audio.se_play($game_system.soundname_on_speak)
  1266.            end
  1267.            c = ""
  1268.          end
  1269.          if c == "\030"
  1270.            @now_text.sub!(/\[(.*?)\]/, "")
  1271.            self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  1272.           if $game_system.soundname_on_speak != ""
  1273.              Audio.se_play($game_system.soundname_on_speak)
  1274.            end
  1275.            @x += 24
  1276.            c = ""
  1277.          end
  1278.          if c == "\n"
  1279.            if @lines >= $game_temp.choice_start
  1280.              @cursor_width = [@cursor_width, @max_x - @face_indent].max
  1281.            end
  1282.            @lines += 1
  1283.            @y += 1
  1284.            @x = 0 + @indent + @face_indent
  1285.            if @lines >= $game_temp.choice_start
  1286.              @x = 8 + @indent + @face_indent
  1287.            end
  1288.            c = ""
  1289.          end
  1290.          if c != ""
  1291.            # 文字描画
  1292.            @x += opacity_draw_text(self.contents, @x, @y * line_height + (line_height - self.contents.font.size), c, @opacity)
  1293.            if $game_system.soundname_on_speak != "" then
  1294.            Audio.se_play($game_system.soundname_on_speak)
  1295.            end
  1296.          end
  1297.          if Input.press?(Input::C) and $game_switches[34]
  1298.            text_not_skip = false
  1299.          end
  1300.          if Input.press?(Input::B)
  1301.            text_not_skip = false
  1302.          end
  1303.        else
  1304.          text_not_skip = true
  1305.          break
  1306.        end
  1307.        # 終了判定
  1308.        if text_not_skip
  1309.          break
  1310.        end
  1311.      end
  1312.      @write_wait += @write_speed
  1313.      return
  1314.    end

  1315.    if @input_number_window != nil
  1316.      @input_number_window.update
  1317.      # 決定
  1318.      if Input.trigger?(Input::C)
  1319.        $game_system.se_play($data_system.decision_se)
  1320.        $game_variables[$game_temp.num_input_variable_id] =
  1321.        @input_number_window.number
  1322.        $game_map.need_refresh = true
  1323.        @input_number_window.dispose
  1324.        @input_number_window = nil
  1325.        terminate_message
  1326.      end
  1327.      return
  1328.    end
  1329.    if @contents_showing
  1330.      if $game_temp.choice_max == 0
  1331.        self.pause = true
  1332.      end
  1333.      # 取消
  1334.      if Input.trigger?(Input::B)
  1335.        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1336.          $game_system.se_play($data_system.cancel_se)
  1337.          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1338.          terminate_message
  1339.        end
  1340.      end
  1341.      # 決定
  1342.      if Input.trigger?(Input::C)
  1343.        if $game_temp.choice_max > 0
  1344.          $game_system.se_play($data_system.decision_se)
  1345.          $game_temp.choice_proc.call(self.index)
  1346.        end
  1347.        if @mid_stop
  1348.          @mid_stop = false
  1349.          return
  1350.        else
  1351.          terminate_message
  1352.        end
  1353.      end
  1354.      return
  1355.    end
  1356.    if @fade_out == false and $game_temp.message_text != nil
  1357.      @contents_showing = true
  1358.      $game_temp.message_window_showing = true
  1359.      refresh
  1360.      Graphics.frame_reset
  1361.      self.visible = true
  1362.      self.contents_opacity = 0
  1363.    if @input_number_window != nil
  1364.      @input_number_window.contents_opacity = 0
  1365.    end
  1366.      @fade_in = true
  1367.      return
  1368.    end
  1369.    if self.visible
  1370.      @fade_out = true
  1371.      self.opacity -= 48
  1372.      if self.opacity == 0
  1373.        self.visible = false
  1374.        @fade_out = false
  1375.        $game_temp.message_window_showing = false
  1376.      end
  1377.      return
  1378.    end
  1379.    #........................................................................
  1380. else
  1381.   super
  1382.   # 呼出模式下跟随事件移动
  1383.   if @tale != nil
  1384.     pos = get_fuki_pos(self.width, self.height)
  1385.     self.x = pos[0]
  1386.     self.y = pos[1]

  1387.     tale_pos = get_tale_pos
  1388.     @tale.x = tale_pos[0]
  1389.     @tale.y = tale_pos[1]
  1390.    
  1391.     if @name_win != nil
  1392.       name_pos = get_name_pos
  1393.       @name_win.x = name_pos[0]
  1394.       @name_win.y = name_pos[1]
  1395.       case @face_pic_txt
  1396.         when 0  # 文字
  1397.           @name_contents.x = @name_win.x + 12
  1398.           @name_contents.y = @name_win.y + 8
  1399.         when 1  # 图片
  1400.           @name_contents.x = @name_win.x + 2
  1401.           @name_contents.y = @name_win.y + 2
  1402.         end
  1403.     end
  1404.   end
  1405.   
  1406.   # 渐变的情况下
  1407.   if @fade_in
  1408.     self.contents_opacity += 24
  1409.     if @name_win != nil
  1410.       @name_win.opacity += 24
  1411.     end
  1412.     if @tale != nil
  1413.       @tale.opacity += 24
  1414.     end
  1415.     if @input_number_window != nil
  1416.       @input_number_window.contents_opacity += 24
  1417.     end
  1418.     if self.contents_opacity == 255
  1419.       @fade_in = false
  1420.     end
  1421.     return
  1422.   end
  1423.   # 显示信息中的情况下
  1424.   if @contents_drawing
  1425.     refresh_drawtext
  1426.     return
  1427.   end
  1428.   # 输入数值的情况下
  1429.   if @input_number_window != nil
  1430.     @input_number_window.update
  1431.     # 确定
  1432.     if Input.trigger?(Input::C)
  1433.       $game_system.se_play($data_system.decision_se)
  1434.       $game_variables[$game_temp.num_input_variable_id] =
  1435.         @input_number_window.number
  1436.       $game_map.need_refresh = true
  1437.       # 释放输入数值窗口
  1438.       @input_number_window.dispose
  1439.       @input_number_window = nil
  1440.       terminate_message
  1441.     end
  1442.     return
  1443.   end
  1444.   # 显示信息结束的情况下
  1445.   if @contents_showing_end
  1446.     # 不是显示选择项且不是呼出对话模式则显示暂停标志
  1447.     if $game_temp.choice_max == 0 and @tale == nil
  1448.       self.pause = true
  1449.     else
  1450.       self.pause = false
  1451.     end
  1452.     # 取消
  1453.     if Input.trigger?(Input::B)
  1454.       if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
  1455.         $game_system.se_play($data_system.cancel_se)
  1456.         $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
  1457.         terminate_message
  1458.       end
  1459.     end
  1460.     # 确定
  1461.     if Input.trigger?(Input::C)
  1462.       if $game_temp.choice_max > 0
  1463.         $game_system.se_play($data_system.decision_se)
  1464.         $game_temp.choice_proc.call(self.index)
  1465.       end
  1466.       terminate_message
  1467.       # 释放呼出窗口
  1468.       del_fukidasi
  1469.     end
  1470.     return
  1471.   end
  1472.   # 在渐变以外的状态下有等待显示的信息与选择项的场合
  1473.   if @fade_out == false and $game_temp.message_text != nil
  1474.     @contents_showing = true
  1475.     $game_temp.message_window_showing = true
  1476. refresh
  1477.     reset_window
  1478.     refresh_create

  1479.     if @name_win != nil
  1480.       @name_win.opacity = 0
  1481.     end
  1482.     if @tale != nil
  1483.       @tale.opacity = 0
  1484.     end
  1485.     Graphics.frame_reset
  1486.     self.visible = true
  1487.     self.contents_opacity = 0
  1488.     if @input_number_window != nil
  1489.       @input_number_window.contents_opacity = 0
  1490.     end
  1491.     @fade_in = true

  1492.     return
  1493.   end
  1494.   # 没有可以显示的信息、但是窗口为可见的情况下
  1495.   if self.visible
  1496.     @fade_out = true
  1497.     self.opacity -= 48
  1498.     if @name_win != nil
  1499.       @name_win.opacity -= 48
  1500.     end
  1501.     if @tale != nil
  1502.       @tale.opacity -= 48
  1503.     end
  1504.     if self.opacity == 0
  1505.       self.visible = false
  1506.       @fade_out = false
  1507.       $game_temp.message_window_showing = false
  1508.       del_fukidasi
  1509.     end
  1510.     return
  1511.   end

  1512. end

  1513. end

  1514. #--------------------------------------------------------------------------
  1515. # ● 透過文字描画 - 66rpg
  1516. #--------------------------------------------------------------------------
  1517. # target :描画対象。Bitmapクラスを指定。
  1518. # x :x座標
  1519. # y :y座標
  1520. # str  :描画文字列
  1521. # opacity:透過率(0~255)
  1522. # 返回値 :文字幅(@x増加値)。
  1523. #--------------------------------------------------------------------------
  1524. def opacity_draw_text(target, x, y, str,opacity)
  1525.   height = target.font.size
  1526.   width = target.text_size(str).width
  1527.   opacity = [[opacity, 0].max, 255].min
  1528.   if opacity == 255
  1529.     target.draw_text(x, y, width, height, str)
  1530.     return width
  1531.   else
  1532.     if @opacity_text_buf.width < width or @opacity_text_buf.height < height
  1533.       @opacity_text_buf.dispose
  1534.       @opacity_text_buf = Bitmap.new(width, height)
  1535.     else
  1536.       @opacity_text_buf.clear
  1537.     end
  1538.     @opacity_text_buf.font.size = target.font.size
  1539.     @opacity_text_buf.draw_text(0, 0, width, height, str)
  1540.     target.blt(x, y, @opacity_text_buf, Rect.new(0, 0, width, height), opacity)
  1541.   return width
  1542.   end
  1543. end
  1544. def ruby_draw_text(target, x, y, str,opacity)
  1545.   sizeback = target.font.size
  1546.   target.font.size * 3 / 2 > 32 ? rubysize = 32 - target.font.size : rubysize = target.font.size / 2
  1547.   rubysize = [rubysize, 6].max
  1548.   
  1549.   opacity = [[opacity, 0].max, 255].min
  1550.   split_s = str.split(/,/)
  1551.   
  1552.   split_s[0] == nil ? split_s[0] = "" : nil
  1553.   split_s[1] == nil ? split_s[1] = "" : nil
  1554.   
  1555.   height = sizeback + rubysize
  1556.   width = target.text_size(split_s[0]).width
  1557.   
  1558.   target.font.size = rubysize
  1559.   ruby_width = target.text_size(split_s[1]).width
  1560.   target.font.size = sizeback
  1561.   
  1562.   buf_width = [target.text_size(split_s[0]).width, ruby_width].max
  1563.   
  1564.   width - ruby_width != 0 ? sub_x = (width - ruby_width) / 2 : sub_x = 0
  1565.   
  1566.   if opacity == 255
  1567.     target.font.size = rubysize
  1568.     target.draw_text(x + sub_x, y - target.font.size, target.text_size(split_s[1]).width, target.font.size, split_s[1])
  1569.     target.font.size = sizeback
  1570.     target.draw_text(x, y, width, target.font.size, split_s[0])
  1571.     return width
  1572.   else
  1573.     if @opacity_text_buf.width < buf_width or @opacity_text_buf.height < height
  1574.       @opacity_text_buf.dispose
  1575.       @opacity_text_buf = Bitmap.new(buf_width, height)
  1576.     else
  1577.       @opacity_text_buf.clear
  1578.     end
  1579.     @opacity_text_buf.font.size = rubysize
  1580.     @opacity_text_buf.draw_text(0 , 0, buf_width, rubysize, split_s[1], 1)
  1581.     @opacity_text_buf.font.size = sizeback
  1582.     @opacity_text_buf.draw_text(0 , rubysize, buf_width, sizeback, split_s[0], 1)
  1583.     if sub_x >= 0
  1584.       target.blt(x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  1585.     else
  1586.       target.blt(x + sub_x, y - rubysize, @opacity_text_buf, Rect.new(0, 0, buf_width, height), opacity)
  1587.     end
  1588.     return width
  1589.   end
  1590. end

  1591. #--------------------------------------------------------------------------
  1592. # ● 释放
  1593. #--------------------------------------------------------------------------
  1594. def dispose
  1595. if $game_switches[33]
  1596.   #........................................................................
  1597.   terminate_message
  1598.   if @gaiji_cache != nil
  1599.     unless @gaiji_cache.disposed?
  1600.       @gaiji_cache.dispose
  1601.     end
  1602.   end
  1603.   unless @opacity_text_buf.disposed?
  1604.     @opacity_text_buf.dispose
  1605.   end
  1606.   $game_temp.message_window_showing = false
  1607.   if @input_number_window != nil
  1608.     @input_number_window.dispose
  1609.   end
  1610.   super
  1611.   #........................................................................
  1612. else
  1613.   terminate_message
  1614.   $game_temp.message_window_showing = false
  1615.   if @input_number_window != nil
  1616.     @input_number_window.dispose
  1617.   end
  1618.   super
  1619. end
  1620. end

  1621. #--------------------------------------------------------------------------
  1622. # ● 信息结束处理
  1623. #--------------------------------------------------------------------------
  1624. def terminate_message
  1625. if $game_switches[33]
  1626.   #........................................................................
  1627.   self.active = false
  1628.   self.pause = false
  1629.   self.index = -1
  1630.   self.contents.clear
  1631.   # 清除显示中标志
  1632.   @contents_showing = false
  1633.   # 呼叫信息调用
  1634.   if $game_temp.message_proc != nil
  1635.     $game_temp.message_proc.call
  1636.   end
  1637.   # 清除文章、选择项、输入数值的相关变量
  1638.   $game_temp.message_text = nil
  1639.   $game_temp.message_proc = nil
  1640.   $game_temp.choice_start = 99
  1641.   $game_temp.choice_max = 0
  1642.   $game_temp.choice_cancel_type = 0
  1643.   $game_temp.choice_proc = nil
  1644.   $game_temp.num_input_start = 99
  1645.   $game_temp.num_input_variable_id = 0
  1646.   $game_temp.num_input_digits_max = 0
  1647.   # 开放金钱窗口
  1648.   if @gold_window != nil
  1649.     @gold_window.dispose
  1650.     @gold_window = nil
  1651.   end
  1652.   if @name_window_frame != nil
  1653.     @name_window_frame.dispose
  1654.     @name_window_frame = nil
  1655.   end
  1656.   if @name_window_text != nil
  1657.     @name_window_text.dispose
  1658.     @name_window_text = nil
  1659.   end
  1660.   if @right_picture != nil and @right_keep == true
  1661.     @right_picture.dispose
  1662.   end   
  1663.   if @left_picture != nil and @left_keep == true
  1664.     @left_picture.dispose
  1665.   end
  1666.   #........................................................................
  1667. else
  1668.   self.active = false
  1669.   self.pause = false
  1670.   self.index = -1
  1671.   self.contents.clear
  1672.   # 清除显示中标志
  1673.   @contents_showing = false
  1674.   @contents_showing_end = false
  1675.   # 呼叫信息调用
  1676.   if $game_temp.message_proc != nil
  1677.     $game_temp.message_proc.call
  1678.   end
  1679.   # 清除文章、选择项、输入数值的相关变量
  1680.   $game_temp.message_text = nil
  1681.   $game_temp.message_proc = nil
  1682.   $game_temp.choice_start = 99
  1683.   $game_temp.choice_max = 0
  1684.   $game_temp.choice_cancel_type = 0
  1685.   $game_temp.choice_proc = nil
  1686.   $game_temp.num_input_start = 99
  1687.   $game_temp.num_input_variable_id = 0
  1688.   $game_temp.num_input_digits_max = 0
  1689.   # 释放金钱窗口
  1690.   if @gold_window != nil
  1691.     @gold_window.dispose
  1692.     @gold_window = nil
  1693.   end
  1694. end
  1695. end

  1696. #--------------------------------------------------------------------------
  1697. # ● 刷新光标矩形
  1698. #--------------------------------------------------------------------------
  1699. def update_cursor_rect
  1700. if $game_switches[33]
  1701.   #.........................................................................
  1702.   if @index >= 0
  1703.     n = $game_temp.choice_start + @index
  1704.     self.cursor_rect.set(4 + @indent + @face_indent, n * 32 + 4, @cursor_width, 32)
  1705.   else
  1706.     self.cursor_rect.empty
  1707.   end
  1708.   #.........................................................................
  1709. else
  1710.   if @index >= 0
  1711.     n = $game_temp.choice_start + @index
  1712.     self.cursor_rect.set(8, n * 32, @cursor_width, 32)
  1713.   else
  1714.     self.cursor_rect.empty
  1715.   end
  1716. end
  1717. end
  1718. #--------------------------------------------------------------------------
  1719. # ● 取得普通文字色
  1720. #--------------------------------------------------------------------------
  1721. def normal_color
  1722.   nil_color = Color.new(0,0,0,0)
  1723.   if FUKI::FUKI_COLOR != nil_color
  1724.     color = FUKI::FUKI_COLOR
  1725.   else
  1726.     color = super
  1727.   end
  1728.   return color
  1729. end
  1730. end

  1731. #==============================================================================
  1732. # ■ Interpreter
  1733. #==============================================================================

  1734. class Interpreter
  1735. #--------------------------------------------------------------------------
  1736. # ● 设置事件
  1737. #     event_id : 事件 ID
  1738. #--------------------------------------------------------------------------
  1739. alias setup_fuki setup
  1740. def setup(list, event_id)
  1741.   setup_fuki(list, event_id)
  1742.   # 如果不是战斗中
  1743.   if !($game_temp.in_battle)
  1744.     # 记录事件 ID
  1745.     $active_event_id = event_id
  1746.   end
  1747. end
  1748. end

  1749. #==============================================================================
  1750. # ■ Scene_Map
  1751. #==============================================================================

  1752. class Scene_Map
  1753. #--------------------------------------------------------------------------
  1754. # ● 主处理
  1755. #--------------------------------------------------------------------------
  1756. def main
  1757.   # 生成活动块
  1758.   @spriteset = Spriteset_Map.new
  1759.   # 生成信息窗口
  1760.   @message_window = Window_FukiMessage.new
  1761.   #@equipments.opacity = 0
  1762.   # 执行过渡
  1763.   Graphics.transition
  1764.   # 主循环
  1765.   loop do
  1766.     # 刷新游戏画面
  1767.     Graphics.update
  1768.     # 刷新输入信息
  1769.     Input.update
  1770.     # 刷新画面
  1771.     update
  1772.     # 如果画面切换的话就中断循环
  1773.     if $scene != self
  1774.       break
  1775.     end
  1776.   end
  1777.   # 准备过渡
  1778.   Graphics.freeze
  1779.   # 释放活动块
  1780.   @spriteset.dispose
  1781.   # 释放信息窗口
  1782.   @message_window.dispose
  1783.   # 标题画面切换中的情况下
  1784.   if $scene.is_a?(Scene_Title)
  1785.     # 淡入淡出画面
  1786.     Graphics.transition
  1787.     Graphics.freeze
  1788.   end
  1789. end
  1790. end

  1791. #==============================================================================
  1792. # ■ Window_InputNumber
  1793. #==============================================================================

  1794. class Window_InputNumber < Window_Base
  1795. #--------------------------------------------------------------------------
  1796. # ● 初始化对像
  1797. #     digits_max : 位数
  1798. #--------------------------------------------------------------------------
  1799. def initialize(digits_max)
  1800.   @digits_max = digits_max
  1801.   @number = 0
  1802.   # 从数字的幅度计算(假定与 0~9 等幅)光标的幅度
  1803.   dummy_bitmap = Bitmap.new(32, 32)
  1804.   dummy_bitmap.font.size = FUKI::MES_FONT_SIZE
  1805.   @cursor_width = dummy_bitmap.text_size("0").width + 8
  1806.   dummy_bitmap.dispose
  1807.   super(0, 0, @cursor_width * @digits_max + 32, 64)
  1808.   self.contents = Bitmap.new(width - 32, height - 32)
  1809.   self.contents.font.size = FUKI::MES_FONT_SIZE
  1810.   self.z += 9999
  1811.   self.opacity = 0
  1812.   @index = 0
  1813.   refresh
  1814.   update_cursor_rect
  1815. end
  1816. end
复制代码

Lv2.观梦者

梦石
0
星屑
439
在线时间
38 小时
注册时间
2018-5-3
帖子
18
2
 楼主| 发表于 2019-5-5 15:26:53 | 只看该作者
不求大佬帮我改脚本啊,主要是求一个满足我要求的新脚本
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
439
在线时间
38 小时
注册时间
2018-5-3
帖子
18
3
 楼主| 发表于 2019-5-6 21:37:43 | 只看该作者

把这段插在754行(大概)

  1. if c == "\005"
  2.     @wait += 5
  3. end
  4. if c == "\006"
  5.     @wait += 20
  6. end
复制代码


再把下面这个插在695行

  1.    text.gsub!(/\\[.]/) { "\005" }
  2.    text.gsub!(/\\[|]/) { "\006" }
复制代码


再把342行的      @Wait = $mes_speed
改成                @wait += $mes_speed

就实现了使用fuki对话框时也支持\.和\|这两个符号了

(伤心,挂了两天没人睬我)
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-25 05:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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