查看: 3478|回复: 3

[RMVX发布] 新邮件系统测试版。

[复制链接]
梦石
0
星屑
50
在线时间
149 小时
注册时间
2008-5-19
回帖
126
发表于 2012-7-19 01:51:42 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 wapwb520pwb 于 2012-7-19 05:55 编辑

配有打字声,简单使用方法。   
\p[角色ID]\nb[角色名字]  便是最常用的方法。








  1. [pre lang="ruby" line="1"]
  2. ##================================================= ==============
  3. ##+ [VX的] [网管 - 新邮件系统3.0测试版] + by wapwb520pwb  
  4. ##------------------------------------------------- -------------
  5. ##由Woratana [[email]woratana@hotmail.com[/email] >>
  6. ##>> Thaiw​​are RPG MAKER社区
  7. ##>>特别感谢:鲨鱼,Yatzumo,迷途猫咪,Erzengel,角色扮演,
  8. ##Dubalex,近世代数,均衡的守护者
  9. ##------------------------------------------------- -------------
  10. ##发行日期:07/06/2008(四 - M - Y)
  11. ##------------------------------------------------- -------------
  12. ##包括:NEO面的系统由Woratana的进展(3.0版)
  13. ##================================================= ==============

  14. #开始
  15. #=============================================
  16. #+网管3测试版+ [07/06/2008]
  17. #- 添加“文字删除名单”
  18. #- 更改窗口大小和位置暂时
  19. #- 你现在可以调用脚本:
  20. #美元game_message.create_nms_data
  21. #,重置网管数据或为保存旧文件创建网管数据
  22. #- 修正写演员的类名
  23. #- 修正屏幕名称“框中
  24. #- 加入NAMEBOX_Y_PLUS_TOP修复屏幕名称“框中时,显示在最前面的消息
  25. #- 集名称“框中的透明度,为不同类型的消息背景
  26. #- 如果消息窗口自动修复屏幕
  27. #- 可以绘制新的面貌,而消息正在运行,并设置新的大小脸
  28. #=============================================
  29. #=============================================
  30. #+网管系统2.3 + [11/03/2008 - 06/04/2008]
  31. #- 删除[写入文本]功能的彩色
  32. #- “快速文字”功能
  33. #- 动画面
  34. #- 玩SE / ME的
  35. #- 打字声
  36. #- 滚动文本垂直和水平
  37. #- 自动切割文本(而不是很好地工作)
  38. #- 十六进制颜色(特别感谢:RPG&Erzengel)
  39. #- POP邮件(正在进行中)
  40. #- 添加脚本代码在评论一些设置,
  41. #因此,用户可以更改在游戏中调用脚本。
  42. #=============================================
  43. #=============================================
  44. #+网管系统2.1 + [11/03/2008]:固定名称框问题
  45. #=============================================
  46. #=====================================
  47. #     +网管系统2.0功能列表+
  48. #=====================================
  49. #使用这些功能,在消息框
  50. #----------------------------------
  51. #>>网管信息功能
  52. #----------------------------------
  53. #--------------------------
  54. #>> [特别呼吁]部分
  55. #--------------------------
  56. #立即\ CE [公共事件ID <<运行公共事件

  57. #\ ANI动画编号] <<“此事件”显示动画
  58. #\ BAL [气球ID <<显示金球奖上“此事件”

  59. #*注意:此事件=事件,显示此消息

  60. #--------------------------
  61. #>> [讯息视窗]部分
  62. #--------------------------
  63. #*临时性质,将只使用一次
  64. #\ WX [X] <<设置临时x到x
  65. #\ WY [Y] <<设置临时Ÿ为y
  66. #\ WW [宽] <<设置临时宽度宽度
  67. #\ WH [身高<<设置临时高度高度

  68. #----------------------------------------
  69. #>> [民意文] +
  70. #----------------------------------------
  71. #弹出的文本将显示以上字符的消息框
  72. #并有大小相等的邮件大小

  73. #您可以打电话把这个消息弹出文字
  74. #\ P [人物]

  75. #*字符:字符,你要显示消息框〜
  76. #0播放机
  77. #-1此事件
  78. #1个或多个该事件ID

  79. #----------------------------------------
  80. #>> [快速文本] +又名快捷的
  81. #----------------------------------------
  82. #新增及来电很长的文本(或)文字使用快捷多次。
  83. #你可以把它特殊的语法,例如: “欢迎来到\ C [10]叙利亚村\ C [0]

  84. #美元nms.qt [快速文本ID] ='想要的文字'<<快速文本

  85. #\ QT [快速文本ID <<呼叫快速文本消息框

  86. #--------------------------
  87. #[绘制图像]部分
  88. #--------------------------
  89. #\ DW [武器编号<<抽奖武器图标+武器名字
  90. #\ DA [装甲ID <<抽奖护甲图标+护甲名称
  91. #\ DI [项目编号<<抽奖项目图标+项目名称
  92. #\ DS [技能ID] <<抽奖技能图标+技能名称

  93. #\ IC [图标ID <<抽奖图标

  94. #\ DP [IMAGE_NAME <<绘制图像从文件夹“系统”

  95. #--------------------------
  96. #>> [写入文本]第
  97. #--------------------------
  98. #\地图<<写地图名称

  99. #\ NC [演员ID <<写Actor类
  100. #\ NP [1至4(在党的顺序排列)] <<演员写入名称的顺序
  101. #\ nm的[怪物编号] <<写怪物名称
  102. #\ NT部队编号<<书写部队名称

  103. #\ NW [武器编号<<写入武器名字
  104. #\ NA [装甲ID <<写护甲名
  105. #\ NS [技能ID] <<写技能名称
  106. #\ NI [项目编号<<写产品名称
  107. #\价格[项目编号] <<写项目价格

  108. #--------------------------
  109. #>> [文字效果]
  110. #--------------------------
  111. #\ FN [字体名称](或)<<变更字体名称
  112. #\ FS [字体大小<<改变字体大小
  113. #\延迟[延迟] <<变更每个字母的文字延迟(帧,60帧约1秒)

  114. #\文献<<重置字体名称
  115. #\ RES <<复位字体大小
  116. #\红<<重置文本延迟

  117. #\ B <<开启/关闭粗体
  118. #\ I <<开启/关闭斜体文字
  119. #\ SH开启/关闭阴影文本<<
  120. #\ LBL <<打开/关闭字母按字母模式(默认为ON)

  121. #--------------------------
  122. #>> [名称框脸部]部分
  123. #--------------------------
  124. #\ NB [名称] <<在当前消息窗口中显示名称框

  125. #\ RNB [名称](或)$ nms._name =“姓名”<<重复名称框:
  126. #这个名字名称框将显示在未来的消息一次又一次
  127. #除非有\ NB [名称]在该消息,或者你停止这种类型的选项\ RNB []

  128. #\ SD [方](或)$ nms.side =侧<<更改半边脸:
  129. #(0:-1:右侧左侧正常的面孔正常的面孔)
  130. #(1:左侧新脸| 2:右侧新脸)

  131. #美元nms.color = [红,绿,蓝<<更改名称文字颜色:
  132. #把RGB颜色,例如: [255100200]

  133. #\发[face_file_name face_index](或)\发[face_file_name,face_index,new_side]
  134. #<<绘制新的面貌,而正在运行的消息〜
  135. #face_file_name:人脸图像的名称
  136. #face_index:面部图像指数(0 - 7)
  137. #new_side:半边脸,你要改变

  138. #--------------------------
  139. #>> [声音]第
  140. #--------------------------
  141. #\ SE [文件名] <<播放东南
  142. #\我[文件名] <<发挥我
  143. #\ BGM [文件名] <<播放的BGM

  144. #\典型<<打开/关闭输入的声音

  145. #--------------------------
  146. #>> [其他]第
  147. #--------------------------
  148. #\ CB <<开启/关闭取消跳过文本功能(玩家可以/无法按[Enter]跳过文本)
  149. #\ NL <<开始新行
  150. #\ SC [X] <<创建空白空间X像素
  151. #\ W [X] <<等待X展架
  152. #\ C#XXXXXX,<<文本使用十六进制颜色

  153. #----------------------------------
  154. #>> VX默认邮件功能
  155. #----------------------------------
  156. #\ V [变量ID <<写入值从变量
  157. #\ n【演员ID <<写演员的名字
  158. #\ C [编号] <<更改文字的颜色(从向下向右Windowskin角落的彩色ID)
  159. #\ G <<显示黄金窗口
  160. #\。 <<等待15帧(约1/4秒)
  161. #\ | <<等待60帧(约1秒)
  162. #\! <<等待供玩家按下按钮,继续消息
  163. #\> <<跳过​​信信在当前行
  164. #\ <<<停止跳过信,信“在当前行
  165. #\ ^ <<立即关闭消息框

  166. =end
  167. class Window_Base
  168.   
  169.   #---------------------------------
  170.   # [START] SETUP SCRIPT PART
  171.   #-------------------------------
  172.   #---------------------------------
  173.   # ? MESSAGE SYSTEM
  174.   #-------------------------------
  175.   NMS_FONT_NAME = "方正准圆简体"#Font.default_name # Default Font Name
  176.   NMS_FONT_SIZE = 20 # Default Font Size
  177.   
  178.   # COLOR_ID is from Windowskin image in down-right corder
  179.   NMS_ITEM_NAME_COLOR_ID = 5
  180.   NMS_WEAPON_NAME_COLOR_ID = 10
  181.   NMS_ARMOR_NAME_COLOR_ID = 4
  182.   NMS_SKILL_NAME_COLOR_ID = 2
  183.   
  184.   NMS_DELAY_PER_LETTER = 0 # Delay between letter when showing text letter-by-letter
  185.   # Delay is in frame, 60 frames = 1 second
  186.   # $nms.text_delay = (number)
  187.   
  188.   TEXT_X_PLUS = 0 # Move Text Horizontally
  189.   CHOICE_INPUT_X_PLUS = 0
  190.   # Move Choices Text and Input Number Text Horizontally
  191.   
  192.   # [NEW SETTING] #
  193.   NMS_MSGWIN_X = 128 # Default Message Window X
  194.   # $nms.msg_x = (number)
  195.   
  196.   NMS_MSGWIN_WIDTH = 480 # Default Message Window Width
  197.   # $nms.msg_w = (number)
  198.   NMS_MSGWIN_MIN_HEIGHT = 128 # Default & Minimum Message Window Height
  199.   # $nms.msg_h_user = (number)
  200.   
  201.   NMS_MAX_LINE = 4 # Max Message Lines to display per page
  202.   # $nms.max_line = (number)
  203.   NMS_GET_NEXT_LINE = false # Get messages from next message command, if box is not full
  204.   # $nms.next_msg = true/false
  205.   
  206.   NMS_MSG_BACK = "MessageBack" # Message Back Image File Name (For 'Dim Background' Message)
  207.   # (Must be in folder 'System')
  208.   # $nms.mback = 'Image Name'
  209.   NMS_MSG_BACK_OPACITY = 255 # message Back's Opacity
  210.   # $nms.mback_opac = (0 - 255)
  211.   
  212.   NMS_TEXT_SCROLL = false # Use Vertical Text Scroll?
  213.   # $nms.txt_scrl = true/false
  214.   
  215.   NMS_TEXT_AUTO_CUT = false # Text will automatically start new line if that line is full
  216.   # (Some bug, it may cut in the middle of word..)
  217.   # $nms.txt_cut = true/false
  218.   
  219.   NMS_TEXT_AUTO_SCROLL_HORIZONTAL = false # Text will automatically scroll to the left if line is full
  220.   # This will not work if NMS_TEXT_AUTO_CUT is true
  221.   # $nms.txt_scrl_hori = true/false
  222.   NMS_TEXT_AUTO_SCROLL_HORIZONTAL_DELAY = 1 # Scroll Delay (in frame)
  223.   # $nms.txt_scrl_hori_delay = (number)
  224.   
  225.   NMS_USER_NEW_LINE = false # Text will goes in new line ONLY when type \nl
  226.   # (Good for Text Auto Cut)
  227.   # $nms.txt_unl = true/false
  228.   
  229.   NMS_REMOVE_LIST = [] # List of text that you want to remove from message
  230.   # for example, NMS_REMOVE_LIST = ['test', '[MS]']
  231.   # will remove text 'test' and '[MS]' before show message
  232.   # Note that this is NOT case sensitive
  233.   
  234.   #---------------------------------
  235.   # ? FACE SYSTEM
  236.   #-------------------------------
  237.   #------------------------------------------------
  238.   # ** BOTH FACE SYSTEMS SETUP
  239.   #----------------------------------------------
  240.   DEFAULT_FACE_SIDE = 0 # Default Face Side when game start~
  241.   # (0: Left Side Normal Face | -1: Right Side Normal Face)
  242.   # (1: Left Side Neo Face | 2: Right Side Neo Face)
  243.   # $nms.side = (side no.)
  244.   
  245.   FACE_X_PLUS = 0 # Move Face Horizontally (Left: -, Right: +)
  246.   FACE_Y_PLUS = 0 # Move Face Vertically (Up: -, Down: +)
  247.   
  248.   MOVE_TEXT = true # (true/false)
  249.   # Move text to right side of face, when showing face in left side.
  250.   
  251.   #-------------------------------------
  252.   # **SHOW FACE EFFECT
  253.   # * For both Face Systems *
  254.   #----------------------------------
  255.   FADE_EFFECT = true # Turn on/off fade effect (true/false)
  256.   # $nms.face_fade = true/false
  257.   FADE_SPEED = 10 # Speed up face's fade effect by increase this number
  258.   FADE_ONLY_FIRST = true # Use Fade Effect only in first message window?
  259.   
  260.   MOVE_EFFECT = false # Turn on/off "move in" effect (true/false)
  261.   # $nms.face_move = true/false
  262.   MOVE_SPEED = 50 # Speed up face's "move in" effect by increase this number
  263.   MOVE_ONLY_FIRST = true # Use Move Effect only in first message window?
  264.   
  265.   FADE_MOVE_WHEN_USE_NEW_FACE = true
  266.   # Use Fade and Move effect when change Face graphic
  267.   # (In case using FADE_ONLY_FIRST and MOVE_ONLY_FIRST)
  268.   
  269.   #-------------------------------
  270.   # ** NEO FACE SYSTEM
  271.   #----------------------------
  272.   EightFaces_File = false
  273.   # Use 8 Faces per file (or) 1 Face per file (true/false)
  274.   
  275.   #-------------------------------
  276.   # ** ANIMATED FACE SYSTEM
  277.   #----------------------------
  278.   ANIMATE_FACE_DELAY = 6 # Face animate every _ frame
  279.   # $nms.animf_delay = (number)
  280.   
  281.   ANIMATE_FACE_CONTINUE = false # Face continue to animate after text stop writing?
  282.   # $nms.animf_cont = (true/false)
  283.   
  284.   #------------------------------------
  285.   # ? NAME BOX SYSTEM
  286.   #----------------------------------
  287.   NAMEBOX_SKIN = 'Window' # Windowskin of Name Box (In folder 'Graphics/System')
  288.   NAMEBOX_OPACITY = 255 # Name Box Opacity when using 'Normal Background' message
  289.   # (Lowest 0 - 255 Highest)
  290.   NAMEBOX_OPACITY_DIM_BG = 0 # Name Box Opacity when using 'Dim Background'
  291.   NAMEBOX_OPACITY_NO_BG = 0 # Name Box Opacity when using 'Transparent' Background
  292.   NAMEBOX_BACK_OPACITY = 180 # Name Box Background Opacity
  293.   
  294.   NAMEBOX_X_PLUS_NOR = 102 # Additional Name Box X [Horizontal] for Normal Face Name Box
  295.   NAMEBOX_X_PLUS_NEO = 160 # Additional Name Box X for Neo Face Name Box
  296.   NAMEBOX_X_PLUS_EIENSHINKEN = -2
  297.   NAMEBOX_Y_PLUS = 0 # Move Name Box & Text Vertically
  298.   NAMEBOX_Y_PLUS_TOP = 140
  299.   # Move Name Box & Text Vertically if message box is on Top
  300.   
  301.   NAMEBOX_TEXT_FONT = "方正准圆简体" # Name Text Font's Name
  302.   NAMEBOX_TEXT_SIZE = Font.default_size # Name Text Font's Size
  303.   NAMEBOX_TEXT_HEIGHT_PLUS = 2 # Increase Name Text Height (For Big Size Text)

  304.   NAMEBOX_TEXT_BOLD = false # Make Text in Name Box Bold
  305.   NAMEBOX_TEXT_OUTLINE = false # Make Black Outline around Text (Good with Opacity = 0)
  306.   NAMEBOX_TEXT_DEFAULT_COLOR = [255,255,255]#[255,255,255] # [Red,Green,Blue]: Name Text Color (RGB)
  307.   # You can easily find color code for RGB (Red Green Blue) color in Google :)
  308.   # You are allow to change color in game by call script:
  309.   # $nms.color = [Red,Green,Blue]
  310.   
  311.   NAMEBOX_TEXT_AFTER_NAME = " " # Add Text after Name, leave "" to disable.
  312.   
  313.   NAMEBOX_BOX_WIDTH_PLUS = 6 # Increase Name Box Width
  314.   NAMEBOX_BOX_HEIGHT_PLUS = 7 # Increase Name Box Height
  315.   
  316.   MOVE_NAMEBOX = true
  317.   # (true/false) Move Text Box to Right Side if showing Face in Right side.

  318.   #---------------------------------
  319.   # ? TEXT TYPING SOUND SYSTEM
  320.   #-------------------------------
  321.   TYPING_SOUND = true # Use Typing Sound?
  322.   # $nms.typ_se = true/false
  323.   TYPING_SOUND_FILE = 'Cursor'
  324.   # Sound File Name for Typing Sound (Must be in Folder 'Audio/SE')
  325.   # $nms.typ_file = 'filename'
  326.   TYPING_SOUND_VOLUME = 60 # Typing Sound's Volume
  327.   # $nms.typ_vol = 0 - 100
  328.   TYPING_SOUND_SKIP = 4
  329.   # How many frames you want to skip before play typing sound again?
  330.   # $nms.typ_skip = (no. of frames)
  331.   #---------------------------------
  332.   # [END] SETUP SCRIPT PART
  333.   #-------------------------------
  334. end
  335.   $worale = {} if $worale == nil
  336.   $worale["NMS"] = true
  337.   
  338. class Window_Message < Window_Selectable
  339.   #--------------------------------------------------------------------------
  340.   # ? ALIAS
  341.   #--------------------------------------------------------------------------
  342.     alias wor_nms_winmsg_ini initialize
  343.     def initialize
  344.       wor_nms_winmsg_ini
  345.       $nms = $game_message
  346.       contents.font.name = $nms.nms_fontname
  347.       contents.font.size = $nms.nms_fontsize
  348.       @face = Sprite.new
  349.       @face.z = self.z + 5
  350.       @nametxt = Sprite.new
  351.       @nametxt.z = self.z + 15
  352.       @namebox = nil
  353.       @ori_x = 0
  354.       @name_text = nil
  355.       @showtime = 0 # To check if this is first time it shows message (For face)
  356.       @face_data = Array.new(3)
  357.       @face_data_old = Array.new(3)
  358.       
  359.       #NMS 2++
  360.       self.width = $nms.msg_w
  361.       self.height = $nms.msg_h
  362.       update_window_size(true)
  363.       self.x = $nms.msg_x
  364.       
  365.       @typse_count = 0
  366.       @delay_text = 0
  367.       @no_press_input = false
  368.       @biggest_text_height = 0
  369.       @all_text_width = 0
  370.       @animf_dl = 0 # Animation Face Delay
  371.       @animf = false # Using Animation Face?
  372.       @animf_ind = 0 # Animation Face Index
  373.       @pop = nil # Pop ID
  374.     end
  375.   #--------------------------------------------------------------------------
  376.   # ? ??
  377.   #--------------------------------------------------------------------------
  378.   def dispose
  379.     super
  380.     dispose_gold_window
  381.     dispose_number_input_window
  382.     dispose_back_sprite
  383.     $game_switches[22] = true
  384.   end
  385.   #--------------------------------------------------------------------------
  386.   # ? EDITED
  387.   #--------------------------------------------------------------------------
  388.   def update
  389.     super
  390.   if self.visible == true
  391.     update_back_sprite
  392.     update_gold_window
  393.     update_number_input_window
  394.     update_show_fast
  395.     update_window_size
  396.     update_animate_face if @animf
  397.    
  398.     @typse_count -= 1 if @typse_count > 0
  399.    
  400.     if @name_text != nil
  401.       draw_name(@name_text,self.x,self.y)
  402.     end
  403.     if @face.bitmap != nil
  404.       # UPDATE FADE IN EFFECT
  405.       if @face.opacity < 255
  406.         @face.opacity += FADE_SPEED
  407.       end
  408.       # UPDATE MOVE IN EFFECT
  409.       if $nms.face_move and @ori_x != @face.x
  410.         if (@ori_x > @face.x and @face.x + MOVE_SPEED < @ori_x) or (@ori_x < @face.x and @face.x - MOVE_SPEED > @ori_x)
  411.           @face.x += MOVE_SPEED if @ori_x > @face.x
  412.           @face.x -= MOVE_SPEED if @ori_x < @face.x
  413.         else
  414.           @face.x = @ori_x
  415.         end
  416.       end
  417.     end
  418.   end
  419.     unless @opening or @closing
  420.       if @wait_count > 0
  421.         @wait_count -= 1
  422.       elsif self.pause
  423.         input_pause
  424.       elsif self.active
  425.         input_choice
  426.       elsif @number_input_window.visible
  427.         input_number
  428.       elsif @text != nil
  429.         if @delay_text > 0
  430.           @delay_text -= 1
  431.         else
  432.           update_message
  433.         end
  434.       elsif continue?
  435.         @showtime += 1
  436.         start_message
  437.         open
  438.         $game_message.visible = true
  439.       else
  440.         close
  441.         @showtime = 0
  442.         if @face.bitmap != nil
  443.          @face.bitmap.dispose
  444.         end
  445.         clear_namebox if @namebox != nil
  446.         $game_message.visible = @closing
  447.       end
  448.     end
  449.   end
  450.   #--------------------------------------------------------------------------
  451.   # ? NEW
  452.   #--------------------------------------------------------------------------
  453.   def update_window_size(direct = false, create_bitmap = true)
  454.     if (self.width != $nms.msg_w or self.height != $nms.msg_h) or direct
  455.       self.width = $nms.msg_w if $nms.msg_w > 32
  456.       self.height = $nms.msg_h if $nms.msg_h > 32
  457.       create_contents if create_bitmap
  458.     end
  459.   end
  460.   #--------------------------------------------------------------------------
  461.   # ? ???????????
  462.   #--------------------------------------------------------------------------
  463.   def create_gold_window
  464.     @gold_window = Window_Gold.new(384, 0)
  465.     @gold_window.openness = 0
  466.   end
  467.   #--------------------------------------------------------------------------
  468.   # ? ????????????
  469.   #--------------------------------------------------------------------------
  470.   def create_number_input_window
  471.     @number_input_window = Window_NumberInput.new
  472.     @number_input_window.visible = false
  473.   end
  474.   #--------------------------------------------------------------------------
  475.   # ? ??????????
  476.   #--------------------------------------------------------------------------
  477.   def create_back_sprite
  478.     @back_sprite = Sprite.new
  479.     @back_sprite.bitmap = @old_mback = Cache.system($game_message.mback)
  480.     @back_sprite.opacity = @old_mback_opac = $game_message.mback_opac
  481.     @back_sprite.visible = (@background == 1)
  482.     @back_sprite.z = 190
  483.   end
  484.   #--------------------------------------------------------------------------
  485.   # ? ???????????
  486.   #--------------------------------------------------------------------------
  487.   def dispose_gold_window
  488.     @gold_window.dispose
  489.   end
  490.   #--------------------------------------------------------------------------
  491.   # ? ????????????
  492.   #--------------------------------------------------------------------------
  493.   def dispose_number_input_window
  494.     @number_input_window.dispose
  495.   end
  496.   #--------------------------------------------------------------------------
  497.   # ? ??????????
  498.   #--------------------------------------------------------------------------
  499.   def dispose_back_sprite
  500.     @back_sprite.dispose
  501.   end
  502.   #--------------------------------------------------------------------------
  503.   # ? ???????????
  504.   #--------------------------------------------------------------------------
  505.   def update_gold_window
  506.     @gold_window.update
  507.   end
  508.   #--------------------------------------------------------------------------
  509.   # ? ????????????
  510.   #--------------------------------------------------------------------------
  511.   def update_number_input_window
  512.     @number_input_window.update
  513.   end
  514.   #--------------------------------------------------------------------------
  515.   # ? ??????????
  516.   #--------------------------------------------------------------------------
  517.   def update_back_sprite
  518.     @back_sprite.visible = (@background == 1)
  519.     @back_sprite.y = y - 16
  520.     @back_sprite.opacity = $nms.mback_opac > openness ? openness : $nms.mback_opac
  521.     @back_sprite.update
  522.   end
  523.   #--------------------------------------------------------------------------
  524.   # ? ?????????
  525.   #--------------------------------------------------------------------------
  526.   def update_show_fast
  527.     if self.pause or self.openness < 255
  528.       @show_fast = false
  529.     elsif Input.trigger?(Input::C) and @wait_count < 2 and !@no_press_input
  530.       @show_fast = true
  531.     elsif not Input.press?(Input::C)
  532.       @show_fast = false
  533.     end
  534.     if @show_fast and @wait_count > 0
  535.       @wait_count -= 1
  536.     end
  537.   end
  538.   #--------------------------------------------------------------------------
  539.   # ? ????????????????????
  540.   #--------------------------------------------------------------------------
  541.   def continue?
  542.     return true if $game_message.num_input_variable_id > 0
  543.     return false if $game_message.texts.empty?
  544.     if self.openness > 0 and not $game_temp.in_battle
  545.       return false if @background != $game_message.background
  546.       return false if @position != $game_message.position
  547.     end
  548.     return true
  549.   end
  550.   #--------------------------------------------------------------------------
  551.   # ? EDITED: NMS 2.2+
  552.   #--------------------------------------------------------------------------
  553.   def start_message
  554.     @all_text_width = 0
  555.     @pop = nil
  556.    
  557.     @text = ""
  558.     @text_line = $game_message.texts.size < $game_message.max_line ? $game_message.texts.size + 1 : MAX_LINE + 1
  559.     for i in 0...$game_message.texts.size
  560.       # Change "    " to "" (Spacing for choice)
  561.       @text += "" if i >= $game_message.choice_start
  562.       @text += $game_message.texts[i].clone + "\x00"
  563.     end
  564.      
  565.     @item_max = $game_message.choice_max
  566.     convert_special_characters
  567.     reset_window
  568.     update_window_size
  569.     new_page
  570.   end
  571.   #--------------------------------------------------------------------------
  572.   # ? EDITED
  573.   #--------------------------------------------------------------------------
  574.   def new_page
  575.     @animf = false
  576.     contents.clear
  577.    
  578.     if @face.bitmap != nil
  579.     @face.bitmap.dispose
  580.     end
  581.     if $game_message.face_name.empty?
  582.     @contents_x = TEXT_X_PLUS
  583.     else
  584.       nms_draw_new_face
  585.       # CHECK FOR MOVE EFFECT
  586.       @ori_x = @face.x
  587.       if $nms.face_move and ((MOVE_ONLY_FIRST and @showtime <= 1) or (MOVE_ONLY_FIRST == false))
  588.         if $game_message.side == 0 or $game_message.side == 1
  589.           @face.x = 0 - @face.width
  590.         else
  591.           @face.x = Graphics.width
  592.         end
  593.       end
  594.       @contents_x = get_x_face
  595.     end
  596.     @main_contents_x = @contents_x
  597.     @contents_y = 0
  598.     @line_count = 0
  599.     @typse_count = 0
  600.     @show_fast = false
  601.     @line_show_fast = false
  602.     @pause_skip = false
  603.     contents.font.color = text_color(0)
  604.     @contents_x += CHOICE_INPUT_X_PLUS if $game_message.choice_max > 00
  605.    
  606.     if @old_mback != Cache.system($nms.mback) or @old_mback_opac != $nms.mback_opac
  607.       dispose_back_sprite; create_back_sprite
  608.     end
  609.    
  610.     @no_press_input = false
  611.     self.oy = 0
  612.   end
  613.   #--------------------------------------------------------------------------
  614.   # ? EDITED
  615.   #--------------------------------------------------------------------------
  616.   def new_line
  617.     biggest = @biggest_text_height > WLH ? @biggest_text_height : WLH
  618.     @contents_y += biggest
  619.     if $nms.txt_scrl and @contents_y >= contents.height and @text != ""
  620.       rect = Rect.new(0, biggest, contents.width, contents.height - biggest)
  621.       cont_s = Bitmap.new(contents.width,contents.height)
  622.       cont_s.blt(0, 0, contents, rect)
  623.       rect_s = Rect.new(0,0,contents.width,contents.height)
  624.       contents.clear_rect(0, 0, contents.width, contents.height)
  625.       contents.blt(0, 0, cont_s, rect_s)
  626.       @contents_y = rect.height
  627.       cont_s.dispose
  628.       @show_fast = false
  629.       @no_press_input = true
  630.     end
  631.     @contents_x = @main_contents_x
  632.     @contents_x += CHOICE_INPUT_X_PLUS if $game_message.choice_max > 0
  633.     @biggest_text_height = WLH
  634.     @line_count += 1
  635.     @line_show_fast = false
  636.   end
  637.   #--------------------------------------------------------------------------
  638.   # ? EDITED
  639.   #--------------------------------------------------------------------------
  640.   def convert_special_characters
  641.     clear_namebox if @namebox != nil
  642.    
  643.     # Woratana's :: Quick Text
  644.     @text.gsub!(/\\QT\[([0-9]+)\]/i) { $nms.qt[$1.to_i] }
  645.    
  646.     #--------------------------
  647.     # DEFAULT FEATURES
  648.     #-----------------------
  649.     @text.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
  650.     @text.gsub!(/\\N\[([0-9]+)\]/i) { $game_party.members[($1.to_i)-1].name}
  651.     @text.gsub!(/\\C\[(.*?)\]/i) { "\x01{#{$1}}" }
  652.     @text.gsub!(/\\G/i)              { "\x02" }
  653.     @text.gsub!(/\\\./)             { "\x03" }
  654.     @text.gsub!(/\\\|/)             { "\x04" }
  655.     @text.gsub!(/\\!/)              { "\x05" }
  656.     @text.gsub!(/\\>/)              { "\x06" }
  657.     @text.gsub!(/\\</)              { "\x07" }
  658.     @text.gsub!(/\\\^/)             { "\x08" }
  659.     @text.gsub!(/\\\\/)             { "\" }
  660.    
  661.     #--------------------------
  662.     # * NMS FEATURES!!
  663.     #-----------------------
  664.     # Woratana's :: Draw Weapon Name + Icon
  665.     @text.gsub!(/\\DW\[([0-9]+)\]/i) { "\x83[#{$data_weapons[$1.to_i].icon_index}]\x01{#{NMS_WEAPON_NAME_COLOR_ID}}\\nw[#{$1.to_i}]\x01{#{$nms.last_color}}"}
  666.     # Woratana's :: Draw Item Name + Icon
  667.     @text.gsub!(/\\DI\[([0-9]+)\]/i) { "\x83[#{$data_items[$1.to_i].icon_index}]\x01{#{NMS_ITEM_NAME_COLOR_ID}}\\ni[#{$1.to_i}]\x01{#{$nms.last_color}}" }
  668.     # Woratana's :: Draw Armor Name + Icon
  669.     @text.gsub!(/\\DA\[([0-9]+)\]/i) { "\x83[#{$data_armors[$1.to_i].icon_index}]\x01{#{NMS_ARMOR_NAME_COLOR_ID}}\\na[#{$1.to_i}]\x01{#{$nms.last_color}}"}
  670.     # Woratana's :: Draw Skill Name + Icon
  671.     @text.gsub!(/\\DS\[([0-9]+)\]/i) { "\x83[#{$data_skills[$1.to_i].icon_index}]\x01{#{NMS_ITEM_NAME_COLOR_ID}}\\ns[#{$1.to_i}]\x01{#{$nms.last_color}}"}

  672.     # Woratana's :: Call Animation
  673.     @text.gsub!(/\\ANI\[([0-9]+)\]/i) { "\x80[#{$1}]" }
  674.     # Woratana's :: Call Balloon
  675.     @text.gsub!(/\\BAL\[([0-9]+)\]/i) { "\x81[#{$1}]" }
  676.     # Woratana's :: Call Common Event
  677.     @text.gsub!(/\\CE\[([0-9]+)\]/i) { "\x82[#{$1}]" }
  678.     # Woratana's :: Draw Icon
  679.     @text.gsub!(/\\IC\[([0-9]+)\]/i) { "\x83[#{$1}]" }

  680.     # Woratana's :: Map Name
  681.     @text.gsub!(/\\MAP/i) { nms_get_map_name }
  682.     # Woratana's :: Actor Class Name
  683.     @text.gsub!(/\\NC\[([0-9]+)\]/i) { $data_classes[$game_actors[$1.to_i].class_id].name }
  684.     # Woratana's :: Party Actor Name
  685.     @text.gsub!(/\\NP\[([0-9]+)\]/i) { $game_party.members[($1.to_i - 1)].name }
  686.     # Woratana's :: Monster Name
  687.     @text.gsub!(/\\NM\[([0-9]+)\]/i) { $data_enemies[$1.to_i].name }
  688.     # Woratana's :: Troop Name
  689.     @text.gsub!(/\\NT\[([0-9]+)\]/i) { $data_troops[$1.to_i].name }
  690.     # Woratana's :: Item Name
  691.     @text.gsub!(/\\NI\[([0-9]+)\]/i) { $data_items[$1.to_i].name }
  692.     # Woratana's :: Weapon Name
  693.     @text.gsub!(/\\NW\[([0-9]+)\]/i) { $data_weapons[$1.to_i].name }
  694.     # Woratana's :: Armor Name
  695.     @text.gsub!(/\\NA\[([0-9]+)\]/i) { $data_armors[$1.to_i].name }
  696.     # Woratana's :: Skill Name
  697.     @text.gsub!(/\\NS\[([0-9]+)\]/i) { $data_skills[$1.to_i].name }
  698.     # Woratana's :: Item Price
  699.     @text.gsub!(/\\PRICE\[([0-9]+)\]/i) { $data_items[$1.to_i].price.to_s }
  700.    
  701.     # Woratana's :: Font Name Change
  702.     @text.gsub!(/\\FN\[(.*?)\]/i) { "\x84[#{$1}]" }
  703.     # Woratana's :: Font Size Change
  704.     @text.gsub!(/\\FS\[(.*?)\]/i) { "\x85[#{$1}]" }
  705.     # Woratana's :: Reset Font Name
  706.     @text.gsub!(/\\REF/i) { "\x86" }
  707.     # Woratana's :: Reset Font Size
  708.     @text.gsub!(/\\RES/i) { "\x87" }
  709.     # Woratana's :: BOLD Text
  710.     @text.gsub!(/\\B/i) { "\x88" }
  711.     # Woratana's :: ITALIC Text
  712.     @text.gsub!(/\\I/i) { "\x89" }
  713.     # Woratana's :: Text DELAY
  714.     @text.gsub!(/\\DELAY\[([0-9]+)\]/i) { "\x90[#{$1}]"}
  715.     # Woratana's :: Reset Text Delay
  716.     @text.gsub!(/\\RED/i) { "\x91" }
  717.     # Woratana's :: Turn On/Off Letter by Letter
  718.     @text.gsub!(/\\LBL/i) { "\x92" }
  719.    
  720.      # Woratana's NeoFace System
  721.      @text.scan(/\\SD\[([-,0-9]+)\]/i)
  722.      if $1.to_s != ""
  723.        $game_message.side = $1.to_i
  724.        @text.sub!(/\\SD\[([-,0-9]+)\]/i) {}
  725.      end
  726.    
  727.      # Woratana's :: Name Box
  728.      @text.scan(/\\NB\[(.*?)\]/i)
  729.      if $1.to_s != ""
  730.        n_text = $1.to_s.gsub(/\x01\{(.*?)\}/i) {} # Clear If there's Color
  731.        @name_text = n_text
  732.        @text.sub!(/\\NB\[(.*?)\]/i) {}
  733.      end
  734.    
  735.      # Woratana's :: Repeat Name Box
  736.      @text.gsub!(/\\RNB\[(.*?)\]/i) do
  737.        $game_message._name = $1.to_s
  738.        a = ""
  739.      end
  740.      
  741.      # NMS 2++
  742.      # Woratana's :: SHADOW Text
  743.      @text.gsub!(/\\SH/i) { "\x93" }
  744.      # Woratana's :: Cancel Skip Text Button
  745.      @text.gsub!(/\\CB/i) { "\x94" }
  746.      # Woratana's :: Wait X Frame
  747.      @text.gsub!(/\\W\[([0-9]+)\]/i) { "\x95[#{$1}]" }
  748.      # Woratana's :: Add Space X Pixel
  749.      @text.gsub!(/\\SC\[([0-9]+)\]/i) { "\x96[#{$1}]" }
  750.      
  751.      # Woratana's :: Play SE
  752.      @text.gsub!(/\\SE\[(.*?)\]/i) { "\x97[#{$1}]" }
  753.      # Woratana's :: Play ME
  754.      @text.gsub!(/\\ME\[(.*?)\]/i) { "\x98[#{$1}]" }
  755.      # Woratana's :: Play BGM
  756.      @text.gsub!(/\\BGM\[(.*?)\]/i) { "\x99[#{$1}]" }
  757.      
  758.      # Woratana's :: Start New Line
  759.      @text.gsub!(/\\NL/i) { "\x09" }
  760.      # Woratana's :: Turn ON/OFF Typing Sound
  761.      @text.gsub!(/\\TYP/i) { "\x10" }
  762.      # Woratana's :: Draw Picture
  763.      @text.gsub!(/\\DP\[(.*?)\]/i) { "\x11[#{$1}]" }
  764.      
  765.      # Woratana's :: Draw Face
  766.      @text.gsub!(/\\FA\{(.*?)\}/i) { "\x12{#{$1}}" }
  767.      
  768.      # Woratana's :: Temporary Width
  769.      @text.scan(/\\WW\[([-,0-9]+)\]/i)
  770.      if $1.to_s != ''
  771.        $nms.msg_temp_w = $1.to_i
  772.        @text.sub!(/\\WW\[([-,0-9]+)\]/i) {}
  773.      end
  774.      # Woratana's :: Temporary Height
  775.      @text.scan(/\\WH\[([-,0-9]+)\]/i)
  776.      if $1.to_s != ''
  777.        $nms.msg_temp_h = $1.to_i
  778.        @text.sub!(/\\WH\[([-,0-9]+)\]/i) {}
  779.      end
  780.      # Woratana's :: Temporary X
  781.      @text.scan(/\\WX\[([-,0-9]+)\]/i)
  782.      if $1.to_s != ''
  783.        $nms.msg_temp_x = $1.to_i
  784.        @text.sub!(/\\WX\[([-,0-9]+)\]/i) {}
  785.      end
  786.      # Woratana's :: Temporary Y
  787.      @text.scan(/\\WY\[([-,0-9]+)\]/i)
  788.      if $1.to_s != ''
  789.        $nms.msg_temp_y = $1.to_i
  790.        @text.sub!(/\\WY\[([-,0-9]+)\]/i) {}
  791.      end

  792.     # Woratana's :: Remove text list
  793.      NMS_REMOVE_LIST.each {|i| @text.gsub!(/#{i}/i) {} }
  794.      
  795.      # Woratana's :: Pop Text
  796.      @text.scan(/\\P\[(.*?)\]/i)
  797.      if $1.to_s != ""
  798.       @pop = $1.to_i
  799.       contents.font.name = $nms.nms_fontname if contents.font.name != $nms.nms_fontname
  800.       contents.font.size = $nms.nms_fontsize if contents.font.size != $nms.nms_fontsize
  801.       a = @text.split(/\x00/)
  802.       for i in 0..(a.size - 1)
  803.         text_width = contents.text_size(a[i]).width
  804.         @all_text_width = text_width if @all_text_width < text_width
  805.       end
  806.        nms_draw_new_face
  807.        if @face.bitmap != nil
  808.         if get_x_face == 0 and MOVE_TEXT
  809.           @all_text_width += (@face.width + TEXT_X_PLUS)
  810.         else
  811.           @all_text_width += get_x_face
  812.         end
  813.         @face.bitmap.dispose
  814.         @face.bitmap = nil
  815.       end
  816.       @text.sub!(/\\P\[(.*?)\]/i) {}
  817.       end
  818.   
  819.      @name_text = $game_message._name if @name_text == nil and $game_message._name != ""
  820.    end
  821.   #--------------------------------------------------------------------------
  822.   # ? EDIT: NMS 2.2++
  823.   #--------------------------------------------------------------------------
  824.   def reset_window
  825.     @background = $game_message.background
  826.     @position = $game_message.position
  827.     if @background == 0
  828.       self.opacity = 255
  829.     else
  830.       self.opacity = 0
  831.     end
  832.     # Calculate Window X/Y and Size depends on Pop or normal message
  833.     if @pop != nil
  834.       $nms.msg_h = [((@text_line * WLH) + 8), $nms.msg_h_user].min
  835.       $nms.msg_w = @all_text_width + 32
  836.       
  837.       case @pop
  838.       when 0 # Player
  839.         set_window_xy($game_player)
  840.       when -1 # This Event
  841.         set_window_xy($game_map.events[$game_message.event_id])
  842.       else # Event ID
  843.         set_window_xy($game_map.events[@pop])
  844.       end
  845.     else
  846.       $nms.msg_h = ((((@text_line * WLH) + 8) > $nms.msg_h_user) and ($nms.txt_scrl == false)) ? ((@text_line * WLH) + 8) : $nms.msg_h_user
  847.       $nms.msg_w = NMS_MSGWIN_WIDTH
  848.       self.x = $nms.msg_x
  849.       case @position
  850.       when 0  # Down
  851.         self.y = 0
  852.         @gold_window.y = 360
  853.       when 1  # Middle
  854.         self.y = ((Graphics.height - $nms.msg_h) / 2)
  855.         @gold_window.y = 0
  856.       when 2  # Up
  857.         self.y = Graphics.height - $nms.msg_h
  858.         @gold_window.y = 0
  859.       end
  860.     end
  861.     # Temporary Size & Position
  862.     if !$nms.msg_temp_w.nil?
  863.       $nms.msg_w = $nms.msg_temp_w
  864.       $nms.msg_temp_w = nil
  865.     end
  866.     if !$nms.msg_temp_h.nil?
  867.       $nms.msg_h = $nms.msg_temp_h
  868.       $nms.msg_temp_h = nil
  869.     end
  870.     if !$nms.msg_temp_x.nil?
  871.       self.x = $nms.msg_temp_x
  872.       $nms.msg_temp_x = nil
  873.     end
  874.     if !$nms.msg_temp_y.nil?
  875.       self.y = $nms.msg_temp_y
  876.       $nms.msg_temp_y = nil
  877.     end
  878.     # Fix Window Position if it's out of screen
  879.     self.x = 0 if self.x < 0
  880.     self.x = Graphics.width - $nms.msg_w if (self.x + $nms.msg_w) > Graphics.width
  881.     self.y = 0 if self.y < 0
  882.     self.y = Graphics.height - $nms.msg_h if (self.y + $nms.msg_h) > Graphics.height
  883.   end
  884.   #--------------------------------------------------------------------------
  885.   # ? SET Window XY for Pop Message
  886.   #--------------------------------------------------------------------------
  887.   def set_window_xy(chara)
  888.     char_x = chara.screen_x
  889.     char_y = chara.screen_y
  890.     self.x = char_x - ($nms.msg_w / 2)
  891.     self.y = ((char_y - 32 - $nms.msg_h) >= 0) ? (char_y - 32 - $nms.msg_h) : (char_y + 32)
  892.   end
  893.   #--------------------------------------------------------------------------
  894.   # ? ????????
  895.   #--------------------------------------------------------------------------
  896.   def terminate_message
  897.     self.active = false
  898.     self.pause = false
  899.     self.index = -1
  900.     @gold_window.close
  901.     @number_input_window.active = false
  902.     @number_input_window.visible = false
  903.     $game_message.main_proc.call if $game_message.main_proc != nil
  904.     $game_message.clear
  905.   end
  906.   #--------------------------------------------------------------------------
  907.   # ? EDITED
  908.   #--------------------------------------------------------------------------
  909.   def update_message
  910.     loop do
  911.       c = @text.slice!(/./m)
  912.       case c
  913.       when nil
  914.         finish_message
  915.         break
  916.       when "\x00"
  917.         new_line if !$nms.txt_unl
  918.         if @line_count >= $game_message.max_line
  919.           unless @text.empty?
  920.             self.pause = true
  921.             break
  922.           end
  923.         end
  924.       when "\x80"
  925.         @text.sub!(/\[([0-9]+)\]/, "")
  926.         $game_map.events[$game_message.event_id].animation_id = $1.to_i
  927.       when "\x81"
  928.         @text.sub!(/\[([0-9]+)\]/, "")
  929.         $game_map.events[$game_message.event_id].balloon_id = $1.to_i
  930.       when "\x82"
  931.         @text.sub!(/\[([0-9]+)\]/, "")
  932.         a = $game_map.interpreter.params[0]
  933.         $game_map.interpreter.params[0] = $1.to_i
  934.         $game_map.interpreter.command_117
  935.         $game_map.interpreter.params[0] = a
  936.       when "\x83"
  937.         @text.sub!(/\[([0-9]+)\]/, "")
  938.         bitmap = Cache.system("Iconset")
  939.         icon_index = $1.to_i
  940.         # Check for Auto Cut
  941.         new_line if $nms.txt_cut and (@contents_x + 24 > contents.width)
  942.         # Draw ICON
  943.         draw_icon(icon_index, @contents_x, @contents_y, true)
  944.         @contents_x += 24
  945.       when "\x84"
  946.         @text.sub!(/\[(.*?)\]/, "")
  947.         $nms.nms_fontname = $1.to_s
  948.         next
  949.       when "\x85"
  950.         @text.sub!(/\[([0-9]+)\]/, "")
  951.         $nms.nms_fontsize = $1.to_i; next
  952.       when "\x86"
  953.         $nms.nms_fontname = NMS_FONT_NAME; next
  954.       when "\x87"
  955.         $nms.nms_fontsize = NMS_FONT_SIZE; next
  956.       when "\x88"
  957.         contents.font.bold = contents.font.bold == true ? false : true
  958.         next
  959.       when "\x89"
  960.         contents.font.italic = contents.font.italic == true ? false : true
  961.         next
  962.       when "\x90"
  963.         @text.sub!(/\[([0-9]+)\]/, "")
  964.         $nms.text_delay = $1.to_i; next
  965.       when "\x91"
  966.         $nms.text_delay = NMS_DELAY_PER_LETTER; next
  967.       when "\x92"
  968.         $nms.lbl = $nms.lbl == true ? false : true; next
  969.       when "\x93"
  970.         contents.font.shadow = contents.font.shadow == true ? false : true
  971.         next
  972.       when "\x94"
  973.         @no_press_input = @no_press_input == true ? false : true
  974.         next
  975.       when "\x95"
  976.         @text.sub!(/\[([0-9]+)\]/, "")
  977.         @wait_count = $1.to_i
  978.         break
  979.       when "\x96"
  980.         @text.sub!(/\[([0-9]+)\]/, "")
  981.         @contents_x += $1.to_i
  982.         next
  983.       when "\x97"
  984.         @text.sub!(/\[(.*?)\]/, "")
  985.         RPG::SE.new($1).play
  986.       when "\x98"
  987.         @text.sub!(/\[(.*?)\]/, "")
  988.         RPG::ME.new($1).play
  989.       when "\x99"
  990.         @text.sub!(/\[(.*?)\]/, "")
  991.         RPG::BGM.new($1).play
  992.       when "\x09"
  993.         new_line
  994.       when "\x10"
  995.         $nms.typ_se = !$nms.typ_se
  996.       when "\x11"
  997.         @text.sub!(/\[(.*?)\]/, "")
  998.         bitmap = Cache.system($1.to_s)
  999.         rect = Rect.new(0,0,0,0)
  1000.         rect.width = bitmap.width
  1001.         rect.height = bitmap.height
  1002.         # Check for Auto Cut & Scroll
  1003.         if (@contents_x + bitmap.width > contents.width)
  1004.           if $nms.txt_cut; new_line
  1005.           elsif $nms.txt_scrl_hori; nms_scroll_hori(bitmap.width)
  1006.           end
  1007.         end
  1008.         # Draw Image
  1009.         self.contents.blt(@contents_x, @contents_y, bitmap, rect)
  1010.         @contents_x += bitmap.width
  1011.         @biggest_text_height = bitmap.height if bitmap.height > @biggest_text_height
  1012.         bitmap.dispose
  1013.       when "\x12"
  1014.         @text.sub!(/\{(.*?)\}/, "")
  1015.         a = $1.to_s.split(',')
  1016.         $nms.face_name = a[0]
  1017.         $nms.face_index = a[1].to_i
  1018.         $nms.side = a[2].to_i unless a[2].nil?
  1019.         nms_draw_new_face
  1020.         @ori_x = @face.x
  1021.       when "\x01"
  1022.         @text.sub!(/\{(.*?)\}/, "")
  1023.         color_code = $1.to_s
  1024.         if color_code.include?('#')
  1025.           color_code.sub!(/([0123456789ABCDEF]+)/, "")
  1026.           contents.font.color = get_hex($1)
  1027.         else
  1028.           $nms.last_color = color_code.to_i
  1029.           contents.font.color = text_color($nms.last_color)
  1030.         end
  1031.         next
  1032.       when "\x02"
  1033.         @gold_window.refresh
  1034.         @gold_window.open
  1035.       when "\x03"
  1036.         @wait_count = 15
  1037.         break
  1038.       when "\x04"
  1039.         @wait_count = 60
  1040.         break
  1041.       when "\x05"
  1042.         self.pause = true
  1043.         break
  1044.       when "\x06"
  1045.         @line_show_fast = true
  1046.       when "\x07"
  1047.         @line_show_fast = false
  1048.       when "\x08"
  1049.         @pause_skip = true
  1050.       else
  1051.         contents.font.name = $nms.nms_fontname if contents.font.name != $nms.nms_fontname
  1052.         contents.font.size = $nms.nms_fontsize if contents.font.size != $nms.nms_fontsize
  1053.         c_width = contents.text_size(c).width
  1054.         
  1055.         # Check for Text Cut & Scroll Horizontal
  1056.         if (@contents_x + c_width > contents.width)
  1057.           if $nms.txt_cut; new_line
  1058.           elsif $nms.txt_scrl_hori
  1059.             nms_scroll_hori(c_width)
  1060.             @wait_count = $nms.txt_scrl_hori_delay
  1061.             @text = c + @text
  1062.             return
  1063.           end
  1064.         end
  1065.         nms_line_height = contents.text_size(c).height
  1066.         contents.draw_text(@contents_x, @contents_y, 40, nms_line_height, c)
  1067.         @contents_x += c_width
  1068.         # Change Biggest Text Height
  1069.         @biggest_text_height = nms_line_height if nms_line_height > @biggest_text_height
  1070.         
  1071.         # Play Typing Sound
  1072.         if $nms.typ_se and @typse_count <= 0
  1073.           RPG::SE.new($nms.typ_file, $nms.typ_vol).play
  1074.           @typse_count += $nms.typ_skip
  1075.         end
  1076.         #Show Fast & Text Delay
  1077.         @show_fast = true if $nms.lbl == false

  1078.         @delay_text += $nms.text_delay
  1079.       end
  1080.       break unless @show_fast or @line_show_fast
  1081.     end
  1082.   end
  1083.   #--------------------------------------------------------------------------
  1084.   # ? ??????????
  1085.   #--------------------------------------------------------------------------
  1086.   def finish_message
  1087.     if $game_message.choice_max > 0
  1088.       start_choice
  1089.     elsif $game_message.num_input_variable_id > 0
  1090.       start_number_input
  1091.     elsif @pause_skip
  1092.       terminate_message
  1093.     else
  1094.       self.pause = true
  1095.     end
  1096.     @wait_count = 10
  1097.     @text = nil
  1098.   end
  1099.   #--------------------------------------------------------------------------
  1100.   # ? ??????
  1101.   #--------------------------------------------------------------------------
  1102.   def start_choice
  1103.     self.active = true
  1104.     self.index = 0
  1105.   end
  1106.   #--------------------------------------------------------------------------
  1107.   # ? EDITED
  1108.   #--------------------------------------------------------------------------
  1109.   def start_number_input
  1110.     digits_max = $game_message.num_input_digits_max
  1111.     number = $game_variables[$game_message.num_input_variable_id]
  1112.     @number_input_window.digits_max = digits_max
  1113.     @number_input_window.number = number
  1114.     if $game_message.face_name.empty? or MOVE_TEXT == false
  1115.       @number_input_window.x = x - 23
  1116.     else
  1117.       case $game_message.side
  1118.       when 0
  1119.         @number_input_window.x = (x + 112) - 23
  1120.       when 1
  1121.         @number_input_window.x = (x + text_x) - 23
  1122.       when 2
  1123.         @number_input_window.x = x - 23
  1124.       when -1
  1125.         @number_input_window.x = x - 23
  1126.       end
  1127.     end
  1128.     @number_input_window.x += CHOICE_INPUT_X_PLUS
  1129.     @number_input_window.y = y + @contents_y
  1130.     @number_input_window.active = true
  1131.     @number_input_window.visible = true
  1132.     @number_input_window.update
  1133.   end
  1134.   #--------------------------------------------------------------------------
  1135.   # ? EDITED
  1136.   #--------------------------------------------------------------------------
  1137.   def update_cursor
  1138.     if @index >= 0
  1139.       if $game_message.face_name.empty?
  1140.       x = TEXT_X_PLUS
  1141.       else
  1142.       x = get_x_face
  1143.       end
  1144.       y = ($game_message.choice_start + @index) * WLH
  1145.       # CHANGE WIDTH OF CURSOR FOR CHOICE SELECT
  1146.       if $game_message.face_name.empty? or MOVE_TEXT == false
  1147.         facesize = x
  1148.       else
  1149.         facesize = get_x_face
  1150.         facesize += @face.width if $game_message.side == 2
  1151.         facesize += @face.width + 16 if $game_message.side == -1
  1152.       end
  1153.       self.cursor_rect.set(x, y, contents.width - facesize, WLH)
  1154.     else
  1155.       self.cursor_rect.empty
  1156.     end
  1157.   end

  1158.   #--------------------------------------------------------------------------
  1159.   # ? ?????????
  1160.   #--------------------------------------------------------------------------
  1161.   def input_pause
  1162.     if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  1163.       self.pause = false
  1164.       if @text != nil and not @text.empty?
  1165.         new_page if @line_count >= $game_message.max_line
  1166.       else
  1167.         terminate_message
  1168.       end
  1169.     end
  1170.   end
  1171.   #--------------------------------------------------------------------------
  1172.   # ? ????????
  1173.   #--------------------------------------------------------------------------
  1174.   def input_choice
  1175.     if Input.trigger?(Input::B)
  1176.       if $game_message.choice_cancel_type > 0
  1177.         Sound.play_cancel
  1178.         $game_message.choice_proc.call($game_message.choice_cancel_type - 1)
  1179.         terminate_message
  1180.       end
  1181.     elsif Input.trigger?(Input::C)
  1182.       Sound.play_decision
  1183.       $game_message.choice_proc.call(self.index)
  1184.       terminate_message
  1185.     end
  1186.   end
  1187.   #--------------------------------------------------------------------------
  1188.   # ? ???????
  1189.   #--------------------------------------------------------------------------
  1190.   def input_number
  1191.     if Input.trigger?(Input::C)
  1192.       Sound.play_decision
  1193.       $game_variables[$game_message.num_input_variable_id] =
  1194.         @number_input_window.number
  1195.       $game_map.need_refresh = true
  1196.       terminate_message
  1197.     end
  1198.   end
  1199. end

  1200. #==============================================================================
  1201. # NMS +[ADD ON]+ WINDOW_MESSAGE_CLASS
  1202. #------------------------------------------------------------------------------
  1203. #==============================================================================

  1204. class Window_Message < Window_Selectable
  1205.   
  1206. # Return X for Text
  1207. def get_x_face
  1208.   if MOVE_TEXT == true
  1209.     case $game_message.side
  1210.     when 0
  1211.       return 112 + TEXT_X_PLUS
  1212.     when 1
  1213.       return text_x
  1214.     when 2
  1215.       return TEXT_X_PLUS
  1216.     else
  1217.       return TEXT_X_PLUS
  1218.     end
  1219.   else
  1220.     return TEXT_X_PLUS
  1221.   end
  1222. end

  1223.   def text_x
  1224.     return @face.width + TEXT_X_PLUS
  1225.   end
  1226.   
  1227.   # Clear Name Box & Name Text
  1228.   def clear_namebox
  1229.     @nametxt.bitmap.dispose
  1230.     @namebox.dispose
  1231.     @namebox = nil
  1232.     @name_text = nil
  1233.   end
  1234.   
  1235.   def nms_get_map_name
  1236.     mapdata = load_data("Data/MapInfos.rvdata")
  1237.     map_id = $game_map.map_id
  1238.     return mapdata[map_id].name
  1239.   end
  1240.   
  1241.   #--------------------------------------
  1242.   # DRAW FACE [Both Systems] METHOD
  1243.   #------------------------------------
  1244.   def draw_face2(face_name, x, y, index = 0, animf = false, animf_index = 0, animf_max = 1, nofade = false)
  1245.   if animf
  1246.     # Use Animated Face
  1247.     bitmap = Cache.face(face_name)
  1248.     rect = Rect.new(0,0,0,0)
  1249.     rect.width = (bitmap.width / animf_max)
  1250.     rect.height = bitmap.height
  1251.     rect.x = animf_index * rect.width
  1252.     rect.y = 0
  1253.     @face.bitmap = Bitmap.new(rect.width,rect.height)
  1254.     @face.bitmap.blt(0,0,bitmap,rect)
  1255.     bitmap.dispose
  1256.   elsif $game_message.side == 0 or $game_message.side == -1 or EightFaces_File
  1257.     # USE 8 FACES PER FILE
  1258.     bitmap = Cache.face(face_name)
  1259.     faceskin = Cache.face("faceskin")
  1260.     rect = Rect.new(0,0,0,0)
  1261.     rect.width = (bitmap.width / 4)
  1262.     rect.height = (bitmap.height / 2)
  1263.     rect.x = index % 4 * rect.width
  1264.     rect.y = index / 4 * rect.height
  1265.     @face.bitmap = Bitmap.new(rect.width,rect.height)
  1266.     @face.bitmap.blt(0,0,bitmap,rect)
  1267.     @face.bitmap.blt(0,0,faceskin,rect)
  1268.     bitmap.dispose
  1269.   else
  1270.     # USE 1 FACES PER FILE
  1271.     @face.bitmap = Cache.face(face_name)
  1272.   end
  1273.   # SET X/Y OF FACE DEPENDS ON FACE SIDE
  1274.   if $game_message.side == 1
  1275.     @face.mirror = false
  1276.     @face.x = x + 6
  1277.     @face.y = y - 6 + height - @face.height
  1278.   elsif $game_message.side == 2
  1279.     @face.mirror = true
  1280.     @face.x = x + ((self.width - 6) - @face.width)
  1281.     @face.y = y - 6 + height - @face.height
  1282.   elsif $game_message.side == 0
  1283.     @face.mirror = false
  1284.     @face.x = x + 16
  1285.     @face.y = y - 16 + height - @face.height
  1286.   elsif $game_message.side == -1
  1287.     @face.mirror = true
  1288.     @face.x = x + self.contents.width - @face.width + 16
  1289.     @face.y = y - 16 + height - @face.height
  1290.   end
  1291.     @face.x += FACE_X_PLUS
  1292.     @face.y += FACE_Y_PLUS
  1293.     @face_data = [face_name, index, $game_message.side]
  1294.     if @face_data != @face_data_old and FADE_MOVE_WHEN_USE_NEW_FACE; @showtime = 1; @face_data_old = @face_data; end
  1295.     @face.opacity = 0 if !nofade and ($nms.face_fade == true and ((FADE_ONLY_FIRST and @showtime <= 1) or (FADE_ONLY_FIRST == false)))
  1296.   end
  1297.   #--------------------------------------
  1298.   # DRAW NAME BOX METHOD
  1299.   #-----------------------------------
  1300.   def draw_name(name,x,y)
  1301.     name = name + NAMEBOX_TEXT_AFTER_NAME
  1302.     a = Bitmap.new(33,33)
  1303.     a.font.name = NAMEBOX_TEXT_FONT
  1304.     a.font.size = NAMEBOX_TEXT_SIZE
  1305.     rect = a.text_size(name)
  1306.     a.dispose
  1307.     @nametxt.bitmap = Bitmap.new(16 + rect.width, rect.height + NAMEBOX_TEXT_HEIGHT_PLUS)
  1308.     @nametxt.x = x + 8
  1309.     # Eienshinken
  1310.     if $game_message.side == 1 or $game_message.side == 2
  1311.       if @face.bitmap == nil
  1312.         @nametxt.x += NAMEBOX_X_PLUS_EIENSHINKEN
  1313.       else
  1314.         @nametxt.x += NAMEBOX_X_PLUS_NEO
  1315.       end
  1316.     else
  1317.       if @face.bitmap == nil
  1318.         @nametxt.x += NAMEBOX_X_PLUS_EIENSHINKEN
  1319.       else
  1320.         @nametxt.x += NAMEBOX_X_PLUS_NOR
  1321.       end
  1322.     end
  1323.     @nametxt.y = y - 20 + ($game_message.position == 0 ? NAMEBOX_Y_PLUS_TOP : NAMEBOX_Y_PLUS)
  1324.     namebox_x_plus = ($game_message.side == 1 or $game_message.side == 2) ? NAMEBOX_X_PLUS_NEO : NAMEBOX_X_PLUS_NOR
  1325.     @nametxt.x = ((self.x + $nms.msg_w) - namebox_x_plus - @nametxt.width) if MOVE_NAMEBOX and ($game_message.side == 2 or $game_message.side == -1)
  1326.     @namebox = Window.new
  1327.     @namebox.windowskin = Cache.system(NAMEBOX_SKIN)
  1328.     @namebox.z = self.z + 10
  1329.     @namebox.opacity = case @background
  1330.     when 0; NAMEBOX_OPACITY
  1331.     when 1; NAMEBOX_OPACITY_DIM_BG
  1332.     when 2; NAMEBOX_OPACITY_NO_BG
  1333.     end
  1334.     @namebox.back_opacity = NAMEBOX_BACK_OPACITY
  1335.     @namebox.openness = 255
  1336.     @namebox.x = @nametxt.x - NAMEBOX_BOX_WIDTH_PLUS
  1337.     @namebox.y = @nametxt.y - NAMEBOX_BOX_HEIGHT_PLUS
  1338.     @namebox.width = @nametxt.bitmap.width + (NAMEBOX_BOX_WIDTH_PLUS * 2)
  1339.     @namebox.height = @nametxt.bitmap.height + (NAMEBOX_BOX_HEIGHT_PLUS * 2)
  1340.     # Fixed position bug
  1341.     @namebox.x = 0 if @namebox.x < 0
  1342.     @namebox.x = (Graphics.width - @namebox.width) if (@namebox.x + @namebox.width) > Graphics.width
  1343.     @nametxt.bitmap.font.name = NAMEBOX_TEXT_FONT
  1344.     @nametxt.bitmap.font.size = NAMEBOX_TEXT_SIZE
  1345.     @nametxt.bitmap.font.bold = NAMEBOX_TEXT_BOLD
  1346.     if NAMEBOX_TEXT_OUTLINE == true
  1347.       # MAKE TEXT OUTLINE
  1348.       old_shadow = @nametxt.bitmap.font.shadow
  1349.       @nametxt.bitmap.font.color = Color.new(0,0,0)
  1350.       @nametxt.bitmap.draw_text(0,2,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1351.       @nametxt.bitmap.draw_text(0,0,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1352.       @nametxt.bitmap.draw_text(2,0,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1353.       @nametxt.bitmap.draw_text(2,2,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1354.       @nametxt.bitmap.font.shadow = old_shadow
  1355.     end
  1356.     @nametxt.bitmap.font.color = Color.new($game_message.color[0],$game_message.color[1],$game_message.color[2])
  1357.     @nametxt.bitmap.draw_text(1,1,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1358.     @name_text = nil
  1359.   end
  1360.   
  1361.   #--------------------------------------
  1362.   # DRAW NEW FACE
  1363.   #-----------------------------------
  1364.   def nms_draw_new_face
  1365.     # Setup Face Name / Index
  1366.     name = $game_message.face_name
  1367.     index = $game_message.face_index
  1368.     animf_test = name.sub(/\[([0-9]+)\]/, "")
  1369.     # Animated?
  1370.     @animf = $1.to_i > 0 ? true : false
  1371.     @animf_maxind = $1.to_i
  1372.     @animf_ind = 0
  1373.     @animf_dl = $nms.animf_delay
  1374.     # CALL DRAW FACE METHOD
  1375.     draw_face2(name, self.x, self.y, index, @animf, @animf_ind, @animf_maxind)
  1376.   end
  1377.   #--------------------------------------
  1378.   # UPDATE ANIMATION FACE
  1379.   #-----------------------------------
  1380.   def update_animate_face
  1381.     if (!self.pause or $nms.animf_cont)
  1382.       @animf_dl -= 1
  1383.       if @animf_dl <= 0
  1384.         @animf_ind = (@animf_ind + 1) % @animf_maxind
  1385.         @animf_dl = $nms.animf_delay
  1386.         draw_face2($game_message.face_name, self.x, self.y, index, @animf, @animf_ind, @animf_maxind, true)
  1387.       end
  1388.     elsif @animf_ind != 0
  1389.       @animf_ind = 0
  1390.       draw_face2($game_message.face_name, self.x, self.y, index, @animf, @animf_ind, @animf_maxind, true)
  1391.     end
  1392.   end
  1393.   #--------------------------------------
  1394.   # SCROLL TEXT HORIZONTAL
  1395.   #-----------------------------------
  1396.   def nms_scroll_hori(scr_width)
  1397.     biggest = @biggest_text_height > WLH ? @biggest_text_height : WLH
  1398.     rect = Rect.new(0, @contents_y, contents.width, biggest)
  1399.     bitmap = Bitmap.new(rect.width, rect.height)
  1400.     bitmap.blt(0, 0, contents, rect)
  1401.     contents.clear_rect(rect)
  1402.     rect = Rect.new(0, 0, rect.width, rect.height)
  1403.     contents.blt(0 - scr_width, @contents_y, bitmap, rect)
  1404.     contents.clear_rect(0, 0, @face.width, @face.height) if @face.bitmap != nil
  1405.     bitmap.dispose
  1406.     @contents_x = @contents_x - scr_width
  1407.   end
  1408.   
  1409.   #--------------------------------------
  1410.   # GET HEX COLOR by RPG & ERZENGEL
  1411.   #------------------------------------
  1412.   def get_hex(n)
  1413.     red = 0
  1414.     green = 0
  1415.     blue = 0
  1416.     if n.size != 6
  1417.       print("Hex triplets must be six characters long!\nNormal color will be used.")
  1418.       return normal_color
  1419.     end
  1420.     for i in 1..6
  1421.       sliced = n.slice!(/./m)
  1422.       value = hexconvert(sliced)
  1423.       case i
  1424.       when 1; red += value * 16
  1425.       when 2; red += value
  1426.       when 3; green += value * 16
  1427.       when 4; green += value
  1428.       when 5; blue += value * 16
  1429.       when 6; blue += value
  1430.       end
  1431.     end
  1432.     return Color.new(red, green, blue)
  1433.   end
  1434.   def hexconvert(n)
  1435.     case n
  1436.     when "0"; return 0
  1437.     when "1"; return 1
  1438.     when "2"; return 2
  1439.     when "3"; return 3
  1440.     when "4"; return 4
  1441.     when "5"; return 5
  1442.     when "6"; return 6
  1443.     when "7"; return 7
  1444.     when "8"; return 8
  1445.     when "9"; return 9
  1446.     when "A"; return 10
  1447.     when "B"; return 11
  1448.     when "C"; return 12
  1449.     when "D"; return 13
  1450.     when "E"; return 14
  1451.     when "F";return 15
  1452.     else; return -1
  1453.     end
  1454.   end
  1455. end # CLASS END

  1456. #==============================================================================
  1457. # NMS +[ADD ON]+ OTHER CLASS
  1458. #------------------------------------------------------------------------------
  1459. #==============================================================================

  1460. # STORE variables here~*
  1461. class Game_Message
  1462.   attr_accessor :nms_fontname, :nms_fontsize, :event_id, :side, :color, :_name,
  1463. :last_color, :text_delay, :lbl, :msg_w, :msg_h, :msg_x, :max_line, :nms_face_name,
  1464. :nms_face_index, :next_msg, :typ_se, :typ_file, :typ_skip, :typ_vol, :mback, :mback_opac,
  1465. :qt, :txt_scrl, :msg_h_user, :animf_delay, :animf_cont, :txt_cut, :txt_unl, :txt_scrl_hori,
  1466. :txt_scrl_hori_delay, :face_fade, :face_move, :msg_temp_y, :msg_temp_x, :msg_temp_h,
  1467. :msg_temp_w

  1468.   
  1469.   alias wor_nms_old_ini initialize
  1470.   def initialize
  1471.     create_nms_data
  1472.     wor_nms_old_ini
  1473.   end
  1474.   
  1475.   def create_nms_data
  1476.     # NFS
  1477.     @side = Window_Base::DEFAULT_FACE_SIDE
  1478.     @_name = ""
  1479.     @color = Window_Base::NAMEBOX_TEXT_DEFAULT_COLOR
  1480.     # NMS
  1481.     @last_color = 0
  1482.     @nms_fontname = Window_Base::NMS_FONT_NAME
  1483.     @nms_fontsize = Window_Base::NMS_FONT_SIZE
  1484.     @event_id = 0
  1485.     @text_delay = Window_Base::NMS_DELAY_PER_LETTER
  1486.     @lbl = true
  1487.     @msg_w = Window_Base::NMS_MSGWIN_WIDTH
  1488.     @msg_h = @msg_h_user = Window_Base::NMS_MSGWIN_MIN_HEIGHT
  1489.     @msg_x = Window_Base::NMS_MSGWIN_X
  1490.     @max_line = Window_Base::NMS_MAX_LINE
  1491.     @nms_face_name = ""
  1492.     @nms_face_index = 1
  1493.     @next_msg = false
  1494.     @typ_se = Window_Base::TYPING_SOUND
  1495.     @typ_file = Window_Base::TYPING_SOUND_FILE
  1496.     @typ_skip = Window_Base::TYPING_SOUND_SKIP
  1497.     @typ_vol = Window_Base::TYPING_SOUND_VOLUME
  1498.     @mback = Window_Base::NMS_MSG_BACK
  1499.     @mback_opac = Window_Base::NMS_MSG_BACK_OPACITY
  1500.     @qt = Array.new
  1501.     @txt_scrl = Window_Base::NMS_TEXT_SCROLL
  1502.     @animf_delay = Window_Base::ANIMATE_FACE_DELAY
  1503.     @animf_cont = Window_Base::ANIMATE_FACE_CONTINUE
  1504.     @txt_cut = Window_Base::NMS_TEXT_AUTO_CUT
  1505.     @txt_scrl_hori = Window_Base::NMS_TEXT_AUTO_SCROLL_HORIZONTAL
  1506.     @txt_scrl_hori_delay = Window_Base::NMS_TEXT_AUTO_SCROLL_HORIZONTAL_DELAY
  1507.     @txt_unl = Window_Base::NMS_USER_NEW_LINE
  1508.     @face_fade = Window_Base::FADE_EFFECT
  1509.     @face_move = Window_Base::MOVE_EFFECT
  1510.     @msg_temp_x = nil
  1511.     @msg_temp_y = nil
  1512.     @msg_temp_h = nil
  1513.     @msg_temp_w = nil
  1514.   end
  1515. end

  1516. class Game_Map
  1517.   attr_accessor :interpreter
  1518. end

  1519. class Game_Interpreter
  1520.   attr_accessor :params
  1521. end

  1522. class Game_Interpreter
  1523.   def command_101
  1524.     unless $game_message.busy
  1525.       $game_message.event_id = @event_id
  1526.       $game_message.face_name = @params[0]
  1527.       $game_message.face_index = @params[1]
  1528.       $game_message.background = @params[2]
  1529.       $game_message.position = @params[3]
  1530.       next_msg = true
  1531.     loop do
  1532.       if @list[@index].code == 101 and $game_message.max_line > $game_message.texts.size and next_msg
  1533.         @index += 1
  1534.       else
  1535.         break
  1536.       end
  1537.       next_msg = false
  1538.       while @list[@index].code == 401 and $game_message.max_line > $game_message.texts.size
  1539.         next_msg = $game_message.next_msg
  1540.         $game_message.texts.push(@list[@index].parameters[0])
  1541.         @index += 1
  1542.       end
  1543.     end
  1544.       if @list[@index].code == 102
  1545.         setup_choices(@list[@index].parameters)
  1546.       elsif @list[@index].code == 103
  1547.         setup_num_input(@list[@index].parameters)
  1548.       end
  1549.       set_message_waiting
  1550.     end
  1551.     return false
  1552.   end
  1553.   
  1554.   def setup_choices(params)
  1555.     if $game_message.texts.size <= $game_message.max_line - params[0].size
  1556.       $game_message.choice_start = $game_message.texts.size
  1557.       $game_message.choice_max = params[0].size
  1558.       for s in params[0]
  1559.         $game_message.texts.push(s)
  1560.       end
  1561.       $game_message.choice_cancel_type = params[1]
  1562.       $game_message.choice_proc = Proc.new { |n| @branch[@indent] = n }
  1563.       @index += 1
  1564.     end
  1565.   end
  1566. end
复制代码
[/pre]



Project1.rar (260.54 KB, 下载次数: 428)

VILAN4]W51UGHSU9TZG6QPM.jpg 0NPG6H7P[9EC{HACPP13QA3.jpg ~GD3Y)N_DI]FH[K9EW[`KI7.jpg

虚構歪曲

梦石
0
星屑
354
在线时间
1196 小时
注册时间
2010-12-18
回帖
3842

贵宾

发表于 2012-7-19 13:00:14 | 显示全部楼层
UI> 从截图上我没看出这是邮件系统= =……

点评

+1 看不出  发表于 2012-8-9 11:37
回复

使用道具 举报

梦石
0
星屑
50
在线时间
0 小时
注册时间
2012-7-22
回帖
12
发表于 2012-7-23 03:03:22 | 显示全部楼层
我只看出是 对话加强系统。 邮件呐?
我还以为是游戏中不定时的显示出邮件信息呢

点评

+1,想要的是这种系统啊。  发表于 2012-7-27 13:07
回复

使用道具 举报

梦石
0
星屑
539
在线时间
664 小时
注册时间
2010-6-30
回帖
198
发表于 2012-8-9 09:56:21 | 显示全部楼层
范例出错,请楼主修复····

Script "对话 " line 194: SyntaxError occurred
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部