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

Project1

 找回密码
 注册会员
搜索
查看: 1187|回复: 5

[已经解决] 求这个脚本的使用方法

[复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
182 小时
注册时间
2009-4-22
帖子
208
发表于 2013-12-18 00:09:37 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 gz29767562 于 2013-12-18 21:19 编辑

RUBY 代码复制
  1. #===============================================================
  2. # + [VX] [ NMS - Neo Message System 3.0 Beta ] +
  3. #--------------------------------------------------------------
  4. # >> by Woratana [[email][email protected][/email]]
  5. # >> Thaiware RPG Maker Community
  6. # >> Special Thanks: Mako, Yatzumo, Straycat, Erzengel, RPG,
  7. # Dubalex, Modern Algebra, Equilibrium Keeper
  8. #--------------------------------------------------------------
  9. # Released on: 07/06/2008 (D-M-Y)
  10. #--------------------------------------------------------------
  11. # Include: NEO-FACE SYSTEM ADVANCE (Version 3.0) by Woratana
  12. #===============================================================
  13. # Note:
  14. # - This script started when VX English is not coming out yet,
  15. # so some of comments here are still be Japanese :)
  16. # - This script is included newest version of Neo-Face System,
  17. # so you have to remove old Neo-Face System if you have it.
  18.  
  19. =begin
  20. =============================================
  21. + NMS 3 Beta + [07/06/2008]
  22. - Add 'Text Remove List'
  23. - Change window size & position temporarily
  24. - You can now call script:
  25. $game_message.create_nms_data
  26. to reset NMS data or create NMS data for old save file
  27. - Fixed bug for write actor's class name
  28. - Fixed bug for out-of-screen name box
  29. - Add NAMEBOX_Y_PLUS_TOP to fix out-of-screen name box when show message on Top
  30. - Set name box's opacity for different types of message background
  31. - Auto fix if message window is out of screen
  32. - You can draw new face while message is running, and also set new face size
  33. =============================================
  34. =============================================
  35. + NMS 2.3 + [11/03/2008 - 06/04/2008]
  36. - Remove Color for [WRITE TEXT] features
  37. - 'Quick Text' feature
  38. - Animated Face
  39. - Play SE/ME
  40. - Typing Sound
  41. - Scroll Text Vertically and Horizontally
  42. - Auto-cut text (Not work perfectly)
  43. - Hex Color (Special Thanks: RPG & Erzengel)
  44. - Pop Message (Work in Progress)
  45. - Add the script code in comment of some settings,
  46. so user can change it in game by call script.
  47. =============================================
  48. =============================================
  49. + NMS 2.1 + [11/03/2008]: Fixed Name Box Bug
  50. =============================================
  51. =====================================
  52.      + NMS 2.0 FEATURES LIST +
  53. =====================================
  54. Use these features in message box
  55. ----------------------------------
  56. >> NMS MESSAGE FEATURES
  57. ----------------------------------
  58. --------------------------
  59. >> [SPECIAL CALL] PART
  60. --------------------------
  61. \ce[Common Event ID] << Run Common Event immediately
  62.  
  63. \ani[Animation ID] << Show Animation on 'This Event'
  64. \bal[Balloon ID] << Show Ballon on 'This Event'
  65.  
  66. * Note: This Event = Event that show this message
  67.  
  68. --------------------------
  69. >> [MESSAGE WINDOW] PART
  70. --------------------------
  71. * temporary properties will be using only one time
  72. \wx[x]        << Set temporary X to x
  73. \wy[y]        << Set temporary Y to y
  74. \ww[width]    << Set temporary Width to width
  75. \wh[height]   << Set temporary Height to height
  76.  
  77. ----------------------------------------
  78. >> +[ POP TEXT ]+
  79. ----------------------------------------
  80. Pop text is the message box that will show over character
  81. and has size equal to message size
  82.  
  83. You can call pop text by put this in message
  84. \p[character]
  85.  
  86. * character: Character you want to show message box over~
  87. 0 for Player
  88. -1 for This Event
  89. 1 or more for that event ID
  90.  
  91. ----------------------------------------
  92. >> +[ QUICK TEXT ]+ a.k.a. Shortcut
  93. ----------------------------------------
  94. Add & Call your very long text (or) text that you use many times by shortcut.
  95. You can put special syntax in it, e.g. 'Welcome to \c[10]Syria Village\c[0]
  96.  
  97. $nms.qt[Quick Text ID] = 'Text you want' << Add Quick Text
  98.  
  99. \qt[Quick Text ID] << Call Quick Text from message box
  100.  
  101. --------------------------
  102. >> [DRAW IMAGE] PART
  103. --------------------------
  104. \dw[weapon ID] << Draw Weapon Icon + Weapon Name
  105. \da[armor ID]  << Draw Armor Icon + Armor Name
  106. \di[item ID]   << Draw Item Icon + Item Name
  107. \ds[skill ID]  << Draw Skill Icon + Skill Name
  108.  
  109. \ic[icon ID]   << Draw Icon
  110.  
  111. \dp[image_name] << Draw Image from folder 'System'
  112.  
  113. --------------------------
  114. >> [WRITE TEXT] PART
  115. --------------------------
  116. \map                         << Write Map Name
  117.  
  118. \nc[actor ID]                << Write Class of Actor
  119. \np[1 to 4 (order in party)] << Write Name of actor in that order
  120. \nm[monster ID]              << Write Monster Name
  121. \nt[troop ID]                << Write Troop Name
  122.  
  123. \nw[weapon ID]               << Write Weapon Name
  124. \na[armor ID]                << Write Armor Name
  125. \ns[skill ID]                << Write Skill Name
  126. \ni[item ID]                 << Write Item Name
  127. \price[item ID]              << Write Item Price
  128.  
  129. --------------------------
  130. >> [TEXT EFFECT] PART
  131. --------------------------
  132. \fn[Font Name] (or) << Change Font Name
  133. \fs[Font Size] << Change Font Size
  134. \delay[Delay]  << Change text Delay per letter (in frame, 60 frames = about 1 sec)
  135.  
  136. \ref           << Reset Font Name
  137. \res           << Reset Font Size
  138. \red           << Reset text Delay
  139.  
  140. \b             << Turn on/off BOLD text
  141. \i             << Turn on/off ITALIC text
  142. \sh            << Turn on/off SHADOW text
  143. \lbl           << Turn on/off LETTER-BY-LETTER Mode (default is ON)
  144.  
  145. --------------------------
  146. >> [NAME BOX & FACE] PART
  147. --------------------------
  148. \nb[Name]  << Show Name Box in current message window
  149.  
  150. \rnb[Name] (or) $nms._name = 'Name' << Repeat Name Box:
  151. Name Box with this name will show again and again in next messages
  152. unless there is \nb[Name] in that message, or you've stop this option by type \rnb[]
  153.  
  154. \sd[side] (or) $nms.side = side << Change Face Side:
  155. (0: Left Side Normal Face | -1: Right Side Normal Face)
  156. (1: Left Side Neo Face | 2: Right Side Neo Face)
  157.  
  158. $nms.color = [Red,Green,Blue] << Change Name Text Color:
  159. Put RGB Color in, e.g. [255,100,200]
  160.  
  161. \fa[face_file_name, face_index] (or) \fa[face_file_name, face_index, new_side]
  162. << Draw new face while message is running~
  163. face_file_name: Face image's name
  164. face_index:     Index of the face in image (0 - 7)
  165. new_side:       Face side you want to change to
  166.  
  167. --------------------------
  168. >> [SOUND] PART
  169. --------------------------
  170. \se[filename]   << Play SE
  171. \me[filename]   << Play ME
  172. \bgm[filename]  << Play BGM
  173.  
  174. \typ            << Turn on/off typing sound
  175.  
  176. --------------------------
  177. >> [Misc.] PART
  178. --------------------------
  179. \cb           << Turn on/off cancel skip text feature (Player can/can't press [Enter] to skip text)
  180. \nl           << Start new line
  181. \sc[x]        << Create blank space x pixel
  182. \w[x]         << Wait x frames
  183. \c[#XXXXXX]   << Use Hex Color for text
  184.  
  185. ----------------------------------
  186. >> VX DEFAULT MESSAGE FEATURES
  187. ----------------------------------
  188. \v[variable ID] << Write value from variable
  189. \n[actor ID]    << Write actor's name
  190. \c[color ID]    << Change text color (Color ID is from Down-right corner in Windowskin)
  191. \g              << Show gold window
  192. \.              << Wait 15 frames (about 1/4 sec)
  193. \|              << Wait 60 frames (about 1 sec)
  194. \!              << Wait for player to press button to continue message
  195. \>              << Skip letter-by-letter in current line
  196. \<              << Stop 'skip letter-by-letter' in current line
  197. \^              << Close message box immediately
  198. \\              << Write '\'
  199.  
  200. =end
  201. class Window_Base
  202.  
  203.   #---------------------------------
  204.   # [START] SETUP SCRIPT PART
  205.   #-------------------------------
  206.   #---------------------------------
  207.   # ? MESSAGE SYSTEM
  208.   #-------------------------------
  209.   NMS_FONT_NAME = "方正准圆简体"#Font.default_name # Default Font Name
  210.   NMS_FONT_SIZE = 20 # Default Font Size
  211.  
  212.   # COLOR_ID is from Windowskin image in down-right corder
  213.   NMS_ITEM_NAME_COLOR_ID = 5
  214.   NMS_WEAPON_NAME_COLOR_ID = 10
  215.   NMS_ARMOR_NAME_COLOR_ID = 4
  216.   NMS_SKILL_NAME_COLOR_ID = 2
  217.  
  218.   NMS_DELAY_PER_LETTER = 0 # Delay between letter when showing text letter-by-letter
  219.   # Delay is in frame, 60 frames = 1 second
  220.   # $nms.text_delay = (number)
  221.  
  222.   TEXT_X_PLUS = 0 # Move Text Horizontally
  223.   CHOICE_INPUT_X_PLUS = 0
  224.   # Move Choices Text and Input Number Text Horizontally
  225.  
  226.   # [NEW SETTING] #
  227.   NMS_MSGWIN_X = 128 # Default Message Window X
  228.   # $nms.msg_x = (number)
  229.  
  230.   NMS_MSGWIN_WIDTH = 544 # Default Message Window Width
  231.   # $nms.msg_w = (number)
  232.   NMS_MSGWIN_MIN_HEIGHT = 128 # Default & Minimum Message Window Height
  233.   # $nms.msg_h_user = (number)
  234.  
  235.   NMS_MAX_LINE = 4 # Max Message Lines to display per page
  236.   # $nms.max_line = (number)
  237.   NMS_GET_NEXT_LINE = false # Get messages from next message command, if box is not full
  238.   # $nms.next_msg = true/false
  239.  
  240.   NMS_MSG_BACK = "MessageBack" # Message Back Image File Name (For 'Dim Background' Message)
  241.   # (Must be in folder 'System')
  242.   # $nms.mback = 'Image Name'
  243.   NMS_MSG_BACK_OPACITY = 255 # message Back's Opacity
  244.   # $nms.mback_opac = (0 - 255)
  245.  
  246.   NMS_TEXT_SCROLL = false # Use Vertical Text Scroll?
  247.   # $nms.txt_scrl = true/false
  248.  
  249.   NMS_TEXT_AUTO_CUT = false # Text will automatically start new line if that line is full
  250.   # (Some bug, it may cut in the middle of word..)
  251.   # $nms.txt_cut = true/false
  252.  
  253.   NMS_TEXT_AUTO_SCROLL_HORIZONTAL = false # Text will automatically scroll to the left if line is full
  254.   # This will not work if NMS_TEXT_AUTO_CUT is true
  255.   # $nms.txt_scrl_hori = true/false
  256.   NMS_TEXT_AUTO_SCROLL_HORIZONTAL_DELAY = 1 # Scroll Delay (in frame)
  257.   # $nms.txt_scrl_hori_delay = (number)
  258.  
  259.   NMS_USER_NEW_LINE = false # Text will goes in new line ONLY when type \nl
  260.   # (Good for Text Auto Cut)
  261.   # $nms.txt_unl = true/false
  262.  
  263.   NMS_REMOVE_LIST = [] # List of text that you want to remove from message
  264.   # for example, NMS_REMOVE_LIST = ['test', '[MS]']
  265.   # will remove text 'test' and '[MS]' before show message
  266.   # Note that this is NOT case sensitive
  267.  
  268.   #---------------------------------
  269.   # ? FACE SYSTEM
  270.   #-------------------------------
  271.   #------------------------------------------------
  272.   # ** BOTH FACE SYSTEMS SETUP
  273.   #----------------------------------------------
  274.   DEFAULT_FACE_SIDE = 0 # Default Face Side when game start~
  275.   # (0: Left Side Normal Face | -1: Right Side Normal Face)
  276.   # (1: Left Side Neo Face | 2: Right Side Neo Face)
  277.   # $nms.side = (side no.)
  278.  
  279.   FACE_X_PLUS = 0 # Move Face Horizontally (Left: -, Right: +)
  280.   FACE_Y_PLUS = 0 # Move Face Vertically (Up: -, Down: +)
  281.  
  282.   MOVE_TEXT = true # (true/false)
  283.   # Move text to right side of face, when showing face in left side.
  284.  
  285.   #-------------------------------------
  286.   # **SHOW FACE EFFECT
  287.   # * For both Face Systems *
  288.   #----------------------------------
  289.   FADE_EFFECT = true # Turn on/off fade effect (true/false)
  290.   # $nms.face_fade = true/false
  291.   FADE_SPEED = 10 # Speed up face's fade effect by increase this number
  292.   FADE_ONLY_FIRST = true # Use Fade Effect only in first message window?
  293.  
  294.   MOVE_EFFECT = false # Turn on/off "move in" effect (true/false)
  295.   # $nms.face_move = true/false
  296.   MOVE_SPEED = 50 # Speed up face's "move in" effect by increase this number
  297.   MOVE_ONLY_FIRST = true # Use Move Effect only in first message window?
  298.  
  299.   FADE_MOVE_WHEN_USE_NEW_FACE = true
  300.   # Use Fade and Move effect when change Face graphic
  301.   # (In case using FADE_ONLY_FIRST and MOVE_ONLY_FIRST)
  302.  
  303.   #-------------------------------
  304.   # ** NEO FACE SYSTEM
  305.   #----------------------------
  306.   EightFaces_File = false
  307.   # Use 8 Faces per file (or) 1 Face per file (true/false)
  308.  
  309.   #-------------------------------
  310.   # ** ANIMATED FACE SYSTEM
  311.   #----------------------------
  312.   ANIMATE_FACE_DELAY = 6 # Face animate every _ frame
  313.   # $nms.animf_delay = (number)
  314.  
  315.   ANIMATE_FACE_CONTINUE = false # Face continue to animate after text stop writing?
  316.   # $nms.animf_cont = (true/false)
  317.  
  318.   #------------------------------------
  319.   # ? NAME BOX SYSTEM
  320.   #----------------------------------
  321.   NAMEBOX_SKIN = 'Window' # Windowskin of Name Box (In folder 'Graphics/System')
  322.   NAMEBOX_OPACITY = 255 # Name Box Opacity when using 'Normal Background' message
  323.   # (Lowest 0 - 255 Highest)
  324.   NAMEBOX_OPACITY_DIM_BG = 0 # Name Box Opacity when using 'Dim Background'
  325.   NAMEBOX_OPACITY_NO_BG = 0 # Name Box Opacity when using 'Transparent' Background
  326.   NAMEBOX_BACK_OPACITY = 180 # Name Box Background Opacity
  327.  
  328.   NAMEBOX_X_PLUS_NOR = 102 # Additional Name Box X [Horizontal] for Normal Face Name Box
  329.   NAMEBOX_X_PLUS_NEO = 160 # Additional Name Box X for Neo Face Name Box
  330.   NAMEBOX_X_PLUS_EIENSHINKEN = -2
  331.   NAMEBOX_Y_PLUS = 0 # Move Name Box & Text Vertically
  332.   NAMEBOX_Y_PLUS_TOP = 140
  333.   # Move Name Box & Text Vertically if message box is on Top
  334.  
  335.   NAMEBOX_TEXT_FONT = "方正准圆简体" # Name Text Font's Name
  336.   NAMEBOX_TEXT_SIZE = Font.default_size # Name Text Font's Size
  337.   NAMEBOX_TEXT_HEIGHT_PLUS = 2 # Increase Name Text Height (For Big Size Text)
  338.  
  339.   NAMEBOX_TEXT_BOLD = false # Make Text in Name Box Bold
  340.   NAMEBOX_TEXT_OUTLINE = false # Make Black Outline around Text (Good with Opacity = 0)
  341.   NAMEBOX_TEXT_DEFAULT_COLOR = [255,255,255]#[255,255,255] # [Red,Green,Blue]: Name Text Color (RGB)
  342.   # You can easily find color code for RGB (Red Green Blue) color in Google :)
  343.   # You are allow to change color in game by call script:
  344.   # $nms.color = [Red,Green,Blue]
  345.  
  346.   NAMEBOX_TEXT_AFTER_NAME = " " # Add Text after Name, leave "" to disable.
  347.  
  348.   NAMEBOX_BOX_WIDTH_PLUS = 6 # Increase Name Box Width
  349.   NAMEBOX_BOX_HEIGHT_PLUS = 7 # Increase Name Box Height
  350.  
  351.   MOVE_NAMEBOX = true
  352.   # (true/false) Move Text Box to Right Side if showing Face in Right side.
  353.  
  354.   #---------------------------------
  355.   # ? TEXT TYPING SOUND SYSTEM
  356.   #-------------------------------
  357.   TYPING_SOUND = true # Use Typing Sound?
  358.   # $nms.typ_se = true/false
  359.   TYPING_SOUND_FILE = 'Cursor'
  360.   # Sound File Name for Typing Sound (Must be in Folder 'Audio/SE')
  361.   # $nms.typ_file = 'filename'
  362.   TYPING_SOUND_VOLUME = 60 # Typing Sound's Volume
  363.   # $nms.typ_vol = 0 - 100
  364.   TYPING_SOUND_SKIP = 4
  365.   # How many frames you want to skip before play typing sound again?
  366.   # $nms.typ_skip = (no. of frames)
  367.   #---------------------------------
  368.   # [END] SETUP SCRIPT PART
  369.   #-------------------------------
  370. end
  371.   $worale = {} if $worale == nil
  372.   $worale["NMS"] = true
  373.  
  374. class Window_Message < Window_Selectable
  375.   #--------------------------------------------------------------------------
  376.   # ? ALIAS
  377.   #--------------------------------------------------------------------------
  378.     alias wor_nms_winmsg_ini initialize
  379.     def initialize
  380.       wor_nms_winmsg_ini
  381.       $nms = $game_message
  382.       contents.font.name = $nms.nms_fontname
  383.       contents.font.size = $nms.nms_fontsize
  384.       [url=home.php?mod=space&uid=84331]@face[/url] = Sprite.new
  385.       @face.z = self.z + 5
  386.       @nametxt = Sprite.new
  387.       @nametxt.z = self.z + 15
  388.       @namebox = nil
  389.       @ori_x = 0
  390.       @name_text = nil
  391.       [url=home.php?mod=space&uid=32227]@ShowTime[/url] = 0 # To check if this is first time it shows message (For face)
  392.       @face_data = Array.new(3)
  393.       @face_data_old = Array.new(3)
  394.  
  395.       #NMS 2++
  396.       self.width = $nms.msg_w
  397.       self.height = $nms.msg_h
  398.       update_window_size(true)
  399.       self.x = $nms.msg_x
  400.  
  401.       @typse_count = 0
  402.       @delay_text = 0
  403.       @no_press_input = false
  404.       @biggest_text_height = 0
  405.       @all_text_width = 0
  406.       @animf_dl = 0 # Animation Face Delay
  407.       @animf = false # Using Animation Face?
  408.       @animf_ind = 0 # Animation Face Index
  409.       [url=home.php?mod=space&uid=81924]@pop[/url] = nil # Pop ID
  410.     end
  411.   #--------------------------------------------------------------------------
  412.   # ? ??
  413.   #--------------------------------------------------------------------------
  414.   def dispose
  415.     super
  416.     dispose_gold_window
  417.     dispose_number_input_window
  418.     dispose_back_sprite
  419.     $game_switches[22] = true
  420.   end
  421.   #--------------------------------------------------------------------------
  422.   # ? EDITED
  423.   #--------------------------------------------------------------------------
  424.   def update
  425.     super
  426.   if self.visible == true
  427.     update_back_sprite
  428.     update_gold_window
  429.     update_number_input_window
  430.     update_show_fast
  431.     update_window_size
  432.     update_animate_face if @animf
  433.  
  434.     @typse_count -= 1 if @typse_count > 0
  435.  
  436.     if @name_text != nil
  437.       draw_name(@name_text,self.x,self.y)
  438.     end
  439.     if @face.bitmap != nil
  440.       # UPDATE FADE IN EFFECT
  441.       if @face.opacity < 255
  442.         @face.opacity += FADE_SPEED
  443.       end
  444.       # UPDATE MOVE IN EFFECT
  445.       if $nms.face_move and @ori_x != @face.x
  446.         if (@ori_x > @face.x and @face.x + MOVE_SPEED < @ori_x) or (@ori_x < @face.x and @face.x - MOVE_SPEED > @ori_x)
  447.           @face.x += MOVE_SPEED if @ori_x > @face.x
  448.           @face.x -= MOVE_SPEED if @ori_x < @face.x
  449.         else
  450.           @face.x = @ori_x
  451.         end
  452.       end
  453.     end
  454.   end
  455.     unless @opening or @closing
  456.       if @wait_count > 0
  457.         @wait_count -= 1
  458.       elsif self.pause
  459.         input_pause
  460.       elsif self.active
  461.         input_choice
  462.       elsif @number_input_window.visible
  463.         input_number
  464.       elsif @text != nil
  465.         if @delay_text > 0
  466.           @delay_text -= 1
  467.         else
  468.           update_message
  469.         end
  470.       elsif continue?
  471.         [url=home.php?mod=space&uid=32227]@ShowTime[/url] += 1
  472.         start_message
  473.         open
  474.         $game_message.visible = true
  475.       else
  476.         close
  477.         @showtime = 0
  478.         if @face.bitmap != nil
  479.          @face.bitmap.dispose
  480.         end
  481.         clear_namebox if @namebox != nil
  482.         $game_message.visible = @closing
  483.       end
  484.     end
  485.   end
  486.   #--------------------------------------------------------------------------
  487.   # ? NEW
  488.   #--------------------------------------------------------------------------
  489.   def update_window_size(direct = false, create_bitmap = true)
  490.     if (self.width != $nms.msg_w or self.height != $nms.msg_h) or direct
  491.       self.width = $nms.msg_w if $nms.msg_w > 32
  492.       self.height = $nms.msg_h if $nms.msg_h > 32
  493.       create_contents if create_bitmap
  494.     end
  495.   end
  496.   #--------------------------------------------------------------------------
  497.   # ? ???????????
  498.   #--------------------------------------------------------------------------
  499.   def create_gold_window
  500.     @gold_window = Window_Gold.new(384, 0)
  501.     @gold_window.openness = 0
  502.   end
  503.   #--------------------------------------------------------------------------
  504.   # ? ????????????
  505.   #--------------------------------------------------------------------------
  506.   def create_number_input_window
  507.     @number_input_window = Window_NumberInput.new
  508.     @number_input_window.visible = false
  509.   end
  510.   #--------------------------------------------------------------------------
  511.   # ? ??????????
  512.   #--------------------------------------------------------------------------
  513.   def create_back_sprite
  514.     @back_sprite = Sprite.new
  515.     @back_sprite.bitmap = @old_mback = Cache.system($game_message.mback)
  516.     @back_sprite.opacity = @old_mback_opac = $game_message.mback_opac
  517.     @back_sprite.visible = (@background == 1)
  518.     @back_sprite.z = 190
  519.   end
  520.   #--------------------------------------------------------------------------
  521.   # ? ???????????
  522.   #--------------------------------------------------------------------------
  523.   def dispose_gold_window
  524.     @gold_window.dispose
  525.   end
  526.   #--------------------------------------------------------------------------
  527.   # ? ????????????
  528.   #--------------------------------------------------------------------------
  529.   def dispose_number_input_window
  530.     @number_input_window.dispose
  531.   end
  532.   #--------------------------------------------------------------------------
  533.   # ? ??????????
  534.   #--------------------------------------------------------------------------
  535.   def dispose_back_sprite
  536.     @back_sprite.dispose
  537.   end
  538.   #--------------------------------------------------------------------------
  539.   # ? ???????????
  540.   #--------------------------------------------------------------------------
  541.   def update_gold_window
  542.     @gold_window.update
  543.   end
  544.   #--------------------------------------------------------------------------
  545.   # ? ????????????
  546.   #--------------------------------------------------------------------------
  547.   def update_number_input_window
  548.     @number_input_window.update
  549.   end
  550.   #--------------------------------------------------------------------------
  551.   # ? ??????????
  552.   #--------------------------------------------------------------------------
  553.   def update_back_sprite
  554.     @back_sprite.visible = (@background == 1)
  555.     @back_sprite.y = y - 16
  556.     @back_sprite.opacity = $nms.mback_opac > openness ? openness : $nms.mback_opac
  557.     @back_sprite.update
  558.   end
  559.   #--------------------------------------------------------------------------
  560.   # ? ?????????
  561.   #--------------------------------------------------------------------------
  562.   def update_show_fast
  563.     if self.pause or self.openness < 255
  564.       @show_fast = false
  565.     elsif Input.trigger?(Input::C) and @wait_count < 2 and !@no_press_input
  566.       @show_fast = true
  567.     elsif not Input.press?(Input::C)
  568.       @show_fast = false
  569.     end
  570.     if @show_fast and @wait_count > 0
  571.       @wait_count -= 1
  572.     end
  573.   end
  574.   #--------------------------------------------------------------------------
  575.   # ? ????????????????????
  576.   #--------------------------------------------------------------------------
  577.   def continue?
  578.     return true if $game_message.num_input_variable_id > 0
  579.     return false if $game_message.texts.empty?
  580.     if self.openness > 0 and not $game_temp.in_battle
  581.       return false if @background != $game_message.background
  582.       return false if @position != $game_message.position
  583.     end
  584.     return true
  585.   end
  586.   #--------------------------------------------------------------------------
  587.   # ? EDITED: NMS 2.2+
  588.   #--------------------------------------------------------------------------
  589.   def start_message
  590.     @all_text_width = 0
  591.     @pop = nil
  592.  
  593.     @text = ""
  594.     @text_line = $game_message.texts.size < $game_message.max_line ? $game_message.texts.size + 1 : MAX_LINE + 1
  595.     for i in 0...$game_message.texts.size
  596.       # Change "    " to "" (Spacing for choice)
  597.       @text += "" if i >= $game_message.choice_start
  598.       @text += $game_message.texts[i].clone + "\x00"
  599.     end
  600.  
  601.     @item_max = $game_message.choice_max
  602.     convert_special_characters
  603.     reset_window
  604.     update_window_size
  605.     new_page
  606.   end
  607.   #--------------------------------------------------------------------------
  608.   # ? EDITED
  609.   #--------------------------------------------------------------------------
  610.   def new_page
  611.     @animf = false
  612.     contents.clear
  613.  
  614.     if @face.bitmap != nil
  615.     @face.bitmap.dispose
  616.     end
  617.     if $game_message.face_name.empty?
  618.     @contents_x = TEXT_X_PLUS
  619.     else
  620.       nms_draw_new_face
  621.       # CHECK FOR MOVE EFFECT
  622.       @ori_x = @face.x
  623.       if $nms.face_move and ((MOVE_ONLY_FIRST and @showtime <= 1) or (MOVE_ONLY_FIRST == false))
  624.         if $game_message.side == 0 or $game_message.side == 1
  625.           @face.x = 0 - @face.width
  626.         else
  627.           @face.x = Graphics.width
  628.         end
  629.       end
  630.       @contents_x = get_x_face
  631.     end
  632.     @main_contents_x = @contents_x
  633.     @contents_y = 0
  634.     @line_count = 0
  635.     @typse_count = 0
  636.     @show_fast = false
  637.     @line_show_fast = false
  638.     @pause_skip = false
  639.     contents.font.color = text_color(0)
  640.     @contents_x += CHOICE_INPUT_X_PLUS if $game_message.choice_max > 00
  641.  
  642.     if @old_mback != Cache.system($nms.mback) or @old_mback_opac != $nms.mback_opac
  643.       dispose_back_sprite; create_back_sprite
  644.     end
  645.  
  646.     @no_press_input = false
  647.     self.oy = 0
  648.   end
  649.   #--------------------------------------------------------------------------
  650.   # ? EDITED
  651.   #--------------------------------------------------------------------------
  652.   def new_line
  653.     biggest = @biggest_text_height > WLH ? @biggest_text_height : WLH
  654.     @contents_y += biggest
  655.     if $nms.txt_scrl and @contents_y >= contents.height and @text != ""
  656.       rect = Rect.new(0, biggest, contents.width, contents.height - biggest)
  657.       cont_s = Bitmap.new(contents.width,contents.height)
  658.       cont_s.blt(0, 0, contents, rect)
  659.       rect_s = Rect.new(0,0,contents.width,contents.height)
  660.       contents.clear_rect(0, 0, contents.width, contents.height)
  661.       contents.blt(0, 0, cont_s, rect_s)
  662.       @contents_y = rect.height
  663.       cont_s.dispose
  664.       @show_fast = false
  665.       @no_press_input = true
  666.     end
  667.     @contents_x = @main_contents_x
  668.     @contents_x += CHOICE_INPUT_X_PLUS if $game_message.choice_max > 0
  669.     @biggest_text_height = WLH
  670.     @line_count += 1
  671.     @line_show_fast = false
  672.   end
  673.   #--------------------------------------------------------------------------
  674.   # ? EDITED
  675.   #--------------------------------------------------------------------------
  676.   def convert_special_characters
  677.     clear_namebox if @namebox != nil
  678.  
  679.     # Woratana's :: Quick Text
  680.     @text.gsub!(/\\QT\[([0-9]+)\]/i) { $nms.qt[$1.to_i] }
  681.  
  682.     #--------------------------
  683.     # DEFAULT FEATURES
  684.     #-----------------------
  685.     @text.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
  686.     @text.gsub!(/\\N\[([0-9]+)\]/i) { $game_party.members[($1.to_i)-1].name}
  687.     @text.gsub!(/\\C\[(.*?)\]/i) { "\x01{#{$1}}" }
  688.     @text.gsub!(/\\G/i)              { "\x02" }
  689.     @text.gsub!(/\\\./)             { "\x03" }
  690.     @text.gsub!(/\\\|/)             { "\x04" }
  691.     @text.gsub!(/\\!/)              { "\x05" }
  692.     @text.gsub!(/\\>/)              { "\x06" }
  693.     @text.gsub!(/\\</)              { "\x07" }
  694.     @text.gsub!(/\\\^/)             { "\x08" }
  695.     @text.gsub!(/\\\\/)             { "\\" }
  696.  
  697.     #--------------------------
  698.     # * NMS FEATURES!!
  699.     #-----------------------
  700.     # Woratana's :: Draw Weapon Name + Icon
  701.     @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}}"}
  702.     # Woratana's :: Draw Item Name + Icon
  703.     @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}}" }
  704.     # Woratana's :: Draw Armor Name + Icon
  705.     @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}}"}
  706.     # Woratana's :: Draw Skill Name + Icon
  707.     @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}}"}
  708.  
  709.     # Woratana's :: Call Animation
  710.     @text.gsub!(/\\ANI\[([0-9]+)\]/i) { "\x80[#{$1}]" }
  711.     # Woratana's :: Call Balloon
  712.     @text.gsub!(/\\BAL\[([0-9]+)\]/i) { "\x81[#{$1}]" }
  713.     # Woratana's :: Call Common Event
  714.     @text.gsub!(/\\CE\[([0-9]+)\]/i) { "\x82[#{$1}]" }
  715.     # Woratana's :: Draw Icon
  716.     @text.gsub!(/\\IC\[([0-9]+)\]/i) { "\x83[#{$1}]" }
  717.  
  718.     # Woratana's :: Map Name
  719.     @text.gsub!(/\\MAP/i) { nms_get_map_name }
  720.     # Woratana's :: Actor Class Name
  721.     @text.gsub!(/\\NC\[([0-9]+)\]/i) { $data_classes[$game_actors[$1.to_i].class_id].name }
  722.     # Woratana's :: Party Actor Name
  723.     @text.gsub!(/\\NP\[([0-9]+)\]/i) { $game_party.members[($1.to_i - 1)].name }
  724.     # Woratana's :: Monster Name
  725.     @text.gsub!(/\\NM\[([0-9]+)\]/i) { $data_enemies[$1.to_i].name }
  726.     # Woratana's :: Troop Name
  727.     @text.gsub!(/\\NT\[([0-9]+)\]/i) { $data_troops[$1.to_i].name }
  728.     # Woratana's :: Item Name
  729.     @text.gsub!(/\\NI\[([0-9]+)\]/i) { $data_items[$1.to_i].name }
  730.     # Woratana's :: Weapon Name
  731.     @text.gsub!(/\\NW\[([0-9]+)\]/i) { $data_weapons[$1.to_i].name }
  732.     # Woratana's :: Armor Name
  733.     @text.gsub!(/\\NA\[([0-9]+)\]/i) { $data_armors[$1.to_i].name }
  734.     # Woratana's :: Skill Name
  735.     @text.gsub!(/\\NS\[([0-9]+)\]/i) { $data_skills[$1.to_i].name }
  736.     # Woratana's :: Item Price
  737.     @text.gsub!(/\\PRICE\[([0-9]+)\]/i) { $data_items[$1.to_i].price.to_s }
  738.  
  739.     # Woratana's :: Font Name Change
  740.     @text.gsub!(/\\FN\[(.*?)\]/i) { "\x84[#{$1}]" }
  741.     # Woratana's :: Font Size Change
  742.     @text.gsub!(/\\FS\[(.*?)\]/i) { "\x85[#{$1}]" }
  743.     # Woratana's :: Reset Font Name
  744.     @text.gsub!(/\\REF/i) { "\x86" }
  745.     # Woratana's :: Reset Font Size
  746.     @text.gsub!(/\\RES/i) { "\x87" }
  747.     # Woratana's :: BOLD Text
  748.     @text.gsub!(/\\B/i) { "\x88" }
  749.     # Woratana's :: ITALIC Text
  750.     @text.gsub!(/\\I/i) { "\x89" }
  751.     # Woratana's :: Text DELAY
  752.     @text.gsub!(/\\DELAY\[([0-9]+)\]/i) { "\x90[#{$1}]"}
  753.     # Woratana's :: Reset Text Delay
  754.     @text.gsub!(/\\RED/i) { "\x91" }
  755.     # Woratana's :: Turn On/Off Letter by Letter
  756.     @text.gsub!(/\\LBL/i) { "\x92" }
  757.  
  758.      # Woratana's NeoFace System
  759.      @text.scan(/\\SD\[([-,0-9]+)\]/i)
  760.      if $1.to_s != ""
  761.        $game_message.side = $1.to_i
  762.        @text.sub!(/\\SD\[([-,0-9]+)\]/i) {}
  763.      end
  764.  
  765.      # Woratana's :: Name Box
  766.      @text.scan(/\\NB\[(.*?)\]/i)
  767.      if $1.to_s != ""
  768.        n_text = $1.to_s.gsub(/\x01\{(.*?)\}/i) {} # Clear If there's Color
  769.        @name_text = n_text
  770.        @text.sub!(/\\NB\[(.*?)\]/i) {}
  771.      end
  772.  
  773.      # Woratana's :: Repeat Name Box
  774.      @text.gsub!(/\\RNB\[(.*?)\]/i) do
  775.        $game_message._name = $1.to_s
  776.        a = ""
  777.      end
  778.  
  779.      # NMS 2++
  780.      # Woratana's :: SHADOW Text
  781.      @text.gsub!(/\\SH/i) { "\x93" }
  782.      # Woratana's :: Cancel Skip Text Button
  783.      @text.gsub!(/\\CB/i) { "\x94" }
  784.      # Woratana's :: Wait X Frame
  785.      @text.gsub!(/\\W\[([0-9]+)\]/i) { "\x95[#{$1}]" }
  786.      # Woratana's :: Add Space X Pixel
  787.      @text.gsub!(/\\SC\[([0-9]+)\]/i) { "\x96[#{$1}]" }
  788.  
  789.      # Woratana's :: Play SE
  790.      @text.gsub!(/\\SE\[(.*?)\]/i) { "\x97[#{$1}]" }
  791.      # Woratana's :: Play ME
  792.      @text.gsub!(/\\ME\[(.*?)\]/i) { "\x98[#{$1}]" }
  793.      # Woratana's :: Play BGM
  794.      @text.gsub!(/\\BGM\[(.*?)\]/i) { "\x99[#{$1}]" }
  795.  
  796.      # Woratana's :: Start New Line
  797.      @text.gsub!(/\\NL/i) { "\x09" }
  798.      # Woratana's :: Turn ON/OFF Typing Sound
  799.      @text.gsub!(/\\TYP/i) { "\x10" }
  800.      # Woratana's :: Draw Picture
  801.      @text.gsub!(/\\DP\[(.*?)\]/i) { "\x11[#{$1}]" }
  802.  
  803.      # Woratana's :: Draw Face
  804.      @text.gsub!(/\\FA\{(.*?)\}/i) { "\x12{#{$1}}" }
  805.  
  806.      # Woratana's :: Temporary Width
  807.      @text.scan(/\\WW\[([-,0-9]+)\]/i)
  808.      if $1.to_s != ''
  809.        $nms.msg_temp_w = $1.to_i
  810.        @text.sub!(/\\WW\[([-,0-9]+)\]/i) {}
  811.      end
  812.      # Woratana's :: Temporary Height
  813.      @text.scan(/\\WH\[([-,0-9]+)\]/i)
  814.      if $1.to_s != ''
  815.        $nms.msg_temp_h = $1.to_i
  816.        @text.sub!(/\\WH\[([-,0-9]+)\]/i) {}
  817.      end
  818.      # Woratana's :: Temporary X
  819.      @text.scan(/\\WX\[([-,0-9]+)\]/i)
  820.      if $1.to_s != ''
  821.        $nms.msg_temp_x = $1.to_i
  822.        @text.sub!(/\\WX\[([-,0-9]+)\]/i) {}
  823.      end
  824.      # Woratana's :: Temporary Y
  825.      @text.scan(/\\WY\[([-,0-9]+)\]/i)
  826.      if $1.to_s != ''
  827.        $nms.msg_temp_y = $1.to_i
  828.        @text.sub!(/\\WY\[([-,0-9]+)\]/i) {}
  829.      end
  830.  
  831.     # Woratana's :: Remove text list
  832.      NMS_REMOVE_LIST.each {|i| @text.gsub!(/#{i}/i) {} }
  833.  
  834.      # Woratana's :: Pop Text
  835.      @text.scan(/\\P\[(.*?)\]/i)
  836.      if $1.to_s != ""
  837.       @pop = $1.to_i
  838.       contents.font.name = $nms.nms_fontname if contents.font.name != $nms.nms_fontname
  839.       contents.font.size = $nms.nms_fontsize if contents.font.size != $nms.nms_fontsize
  840.       a = @text.split(/\x00/)
  841.       for i in 0..(a.size - 1)
  842.         text_width = contents.text_size(a[i]).width
  843.         @all_text_width = text_width if @all_text_width < text_width
  844.       end
  845.        nms_draw_new_face
  846.        if @face.bitmap != nil
  847.         if get_x_face == 0 and MOVE_TEXT
  848.           @all_text_width += (@face.width + TEXT_X_PLUS)
  849.         else
  850.           @all_text_width += get_x_face
  851.         end
  852.         @face.bitmap.dispose
  853.         @face.bitmap = nil
  854.       end
  855.       @text.sub!(/\\P\[(.*?)\]/i) {}
  856.       end
  857.  
  858.      @name_text = $game_message._name if @name_text == nil and $game_message._name != ""
  859.    end
  860.   #--------------------------------------------------------------------------
  861.   # ? EDIT: NMS 2.2++
  862.   #--------------------------------------------------------------------------
  863.   def reset_window
  864.     @background = $game_message.background
  865.     @position = $game_message.position
  866.     if @background == 0
  867.       self.opacity = 255
  868.     else
  869.       self.opacity = 0
  870.     end
  871.     # Calculate Window X/Y and Size depends on Pop or normal message
  872.     if @pop != nil
  873.       $nms.msg_h = [((@text_line * WLH) + 8), $nms.msg_h_user].min
  874.       $nms.msg_w = @all_text_width + 32
  875.  
  876.       case @pop
  877.       when 0 # Player
  878.         set_window_xy($game_player)
  879.       when -1 # This Event
  880.         set_window_xy($game_map.events[$game_message.event_id])
  881.       else # Event ID
  882.         set_window_xy($game_map.events[@pop])
  883.       end
  884.     else
  885.       $nms.msg_h = ((((@text_line * WLH) + 8) > $nms.msg_h_user) and ($nms.txt_scrl == false)) ? ((@text_line * WLH) + 8) : $nms.msg_h_user
  886.       $nms.msg_w = NMS_MSGWIN_WIDTH
  887.       self.x = $nms.msg_x
  888.       case @position
  889.       when 0  # Down
  890.         self.y = 0
  891.         @gold_window.y = 360
  892.       when 1  # Middle
  893.         self.y = ((Graphics.height - $nms.msg_h) / 2)
  894.         @gold_window.y = 0
  895.       when 2  # Up
  896.         self.y = Graphics.height - $nms.msg_h
  897.         @gold_window.y = 0
  898.       end
  899.     end
  900.     # Temporary Size & Position
  901.     if !$nms.msg_temp_w.nil?
  902.       $nms.msg_w = $nms.msg_temp_w
  903.       $nms.msg_temp_w = nil
  904.     end
  905.     if !$nms.msg_temp_h.nil?
  906.       $nms.msg_h = $nms.msg_temp_h
  907.       $nms.msg_temp_h = nil
  908.     end
  909.     if !$nms.msg_temp_x.nil?
  910.       self.x = $nms.msg_temp_x
  911.       $nms.msg_temp_x = nil
  912.     end
  913.     if !$nms.msg_temp_y.nil?
  914.       self.y = $nms.msg_temp_y
  915.       $nms.msg_temp_y = nil
  916.     end
  917.     # Fix Window Position if it's out of screen
  918.     self.x = 0 if self.x < 0
  919.     self.x = Graphics.width - $nms.msg_w if (self.x + $nms.msg_w) > Graphics.width
  920.     self.y = 0 if self.y < 0
  921.     self.y = Graphics.height - $nms.msg_h if (self.y + $nms.msg_h) > Graphics.height
  922.   end
  923.   #--------------------------------------------------------------------------
  924.   # ? SET Window XY for Pop Message
  925.   #--------------------------------------------------------------------------
  926.   def set_window_xy(chara)
  927.     char_x = chara.screen_x
  928.     char_y = chara.screen_y
  929.     self.x = char_x - ($nms.msg_w / 2)
  930.     self.y = ((char_y - 32 - $nms.msg_h) >= 0) ? (char_y - 32 - $nms.msg_h) : (char_y + 32)
  931.   end
  932.   #--------------------------------------------------------------------------
  933.   # ? ????????
  934.   #--------------------------------------------------------------------------
  935.   def terminate_message
  936.     self.active = false
  937.     self.pause = false
  938.     self.index = -1
  939.     @gold_window.close
  940.     @number_input_window.active = false
  941.     @number_input_window.visible = false
  942.     $game_message.main_proc.call if $game_message.main_proc != nil
  943.     $game_message.clear
  944.   end
  945.   #--------------------------------------------------------------------------
  946.   # ? EDITED
  947.   #--------------------------------------------------------------------------
  948.   def update_message
  949.     loop do
  950.       c = @text.slice!(/./m)
  951.       case c
  952.       when nil
  953.         finish_message
  954.         break
  955.       when "\x00"
  956.         new_line if !$nms.txt_unl
  957.         if @line_count >= $game_message.max_line
  958.           unless @text.empty?
  959.             self.pause = true
  960.             break
  961.           end
  962.         end
  963.       when "\x80"
  964.         @text.sub!(/\[([0-9]+)\]/, "")
  965.         $game_map.events[$game_message.event_id].animation_id = $1.to_i
  966.       when "\x81"
  967.         @text.sub!(/\[([0-9]+)\]/, "")
  968.         $game_map.events[$game_message.event_id].balloon_id = $1.to_i
  969.       when "\x82"
  970.         @text.sub!(/\[([0-9]+)\]/, "")
  971.         a = $game_map.interpreter.params[0]
  972.         $game_map.interpreter.params[0] = $1.to_i
  973.         $game_map.interpreter.command_117
  974.         $game_map.interpreter.params[0] = a
  975.       when "\x83"
  976.         @text.sub!(/\[([0-9]+)\]/, "")
  977.         bitmap = Cache.system("Iconset")
  978.         icon_index = $1.to_i
  979.         # Check for Auto Cut
  980.         new_line if $nms.txt_cut and (@contents_x + 24 > contents.width)
  981.         # Draw ICON
  982.         draw_icon(icon_index, @contents_x, @contents_y, true)
  983.         @contents_x += 24
  984.       when "\x84"
  985.         @text.sub!(/\[(.*?)\]/, "")
  986.         $nms.nms_fontname = $1.to_s
  987.         next
  988.       when "\x85"
  989.         @text.sub!(/\[([0-9]+)\]/, "")
  990.         $nms.nms_fontsize = $1.to_i; next
  991.       when "\x86"
  992.         $nms.nms_fontname = NMS_FONT_NAME; next
  993.       when "\x87"
  994.         $nms.nms_fontsize = NMS_FONT_SIZE; next
  995.       when "\x88"
  996.         contents.font.bold = contents.font.bold == true ? false : true
  997.         next
  998.       when "\x89"
  999.         contents.font.italic = contents.font.italic == true ? false : true
  1000.         next
  1001.       when "\x90"
  1002.         @text.sub!(/\[([0-9]+)\]/, "")
  1003.         $nms.text_delay = $1.to_i; next
  1004.       when "\x91"
  1005.         $nms.text_delay = NMS_DELAY_PER_LETTER; next
  1006.       when "\x92"
  1007.         $nms.lbl = $nms.lbl == true ? false : true; next
  1008.       when "\x93"
  1009.         contents.font.shadow = contents.font.shadow == true ? false : true
  1010.         next
  1011.       when "\x94"
  1012.         @no_press_input = @no_press_input == true ? false : true
  1013.         next
  1014.       when "\x95"
  1015.         @text.sub!(/\[([0-9]+)\]/, "")
  1016.         @wait_count = $1.to_i
  1017.         break
  1018.       when "\x96"
  1019.         @text.sub!(/\[([0-9]+)\]/, "")
  1020.         @contents_x += $1.to_i
  1021.         next
  1022.       when "\x97"
  1023.         @text.sub!(/\[(.*?)\]/, "")
  1024.         RPG::SE.new($1).play
  1025.       when "\x98"
  1026.         @text.sub!(/\[(.*?)\]/, "")
  1027.         RPG::ME.new($1).play
  1028.       when "\x99"
  1029.         @text.sub!(/\[(.*?)\]/, "")
  1030.         RPG::BGM.new($1).play
  1031.       when "\x09"
  1032.         new_line
  1033.       when "\x10"
  1034.         $nms.typ_se = !$nms.typ_se
  1035.       when "\x11"
  1036.         @text.sub!(/\[(.*?)\]/, "")
  1037.         bitmap = Cache.system($1.to_s)
  1038.         rect = Rect.new(0,0,0,0)
  1039.         rect.width = bitmap.width
  1040.         rect.height = bitmap.height
  1041.         # Check for Auto Cut & Scroll
  1042.         if (@contents_x + bitmap.width > contents.width)
  1043.           if $nms.txt_cut; new_line
  1044.           elsif $nms.txt_scrl_hori; nms_scroll_hori(bitmap.width)
  1045.           end
  1046.         end
  1047.         # Draw Image
  1048.         self.contents.blt(@contents_x, @contents_y, bitmap, rect)
  1049.         @contents_x += bitmap.width
  1050.         @biggest_text_height = bitmap.height if bitmap.height > @biggest_text_height
  1051.         bitmap.dispose
  1052.       when "\x12"
  1053.         @text.sub!(/\{(.*?)\}/, "")
  1054.         a = $1.to_s.split(',')
  1055.         $nms.face_name = a[0]
  1056.         $nms.face_index = a[1].to_i
  1057.         $nms.side = a[2].to_i unless a[2].nil?
  1058.         nms_draw_new_face
  1059.         @ori_x = @face.x
  1060.       when "\x01"
  1061.         @text.sub!(/\{(.*?)\}/, "")
  1062.         color_code = $1.to_s
  1063.         if color_code.include?('#')
  1064.           color_code.sub!(/([0123456789ABCDEF]+)/, "")
  1065.           contents.font.color = get_hex($1)
  1066.         else
  1067.           $nms.last_color = color_code.to_i
  1068.           contents.font.color = text_color($nms.last_color)
  1069.         end
  1070.         next
  1071.       when "\x02"
  1072.         @gold_window.refresh
  1073.         @gold_window.open
  1074.       when "\x03"
  1075.         @wait_count = 15
  1076.         break
  1077.       when "\x04"
  1078.         @wait_count = 60
  1079.         break
  1080.       when "\x05"
  1081.         self.pause = true
  1082.         break
  1083.       when "\x06"
  1084.         @line_show_fast = true
  1085.       when "\x07"
  1086.         @line_show_fast = false
  1087.       when "\x08"
  1088.         @pause_skip = true
  1089.       else
  1090.         contents.font.name = $nms.nms_fontname if contents.font.name != $nms.nms_fontname
  1091.         contents.font.size = $nms.nms_fontsize if contents.font.size != $nms.nms_fontsize
  1092.         c_width = contents.text_size(c).width
  1093.  
  1094.         # Check for Text Cut & Scroll Horizontal
  1095.         if (@contents_x + c_width > contents.width)
  1096.           if $nms.txt_cut; new_line
  1097.           elsif $nms.txt_scrl_hori
  1098.             nms_scroll_hori(c_width)
  1099.             @wait_count = $nms.txt_scrl_hori_delay
  1100.             @text = c + @text
  1101.             return
  1102.           end
  1103.         end
  1104.         nms_line_height = contents.text_size(c).height
  1105.         contents.draw_text(@contents_x, @contents_y, 40, nms_line_height, c)
  1106.         @contents_x += c_width
  1107.         # Change Biggest Text Height
  1108.         @biggest_text_height = nms_line_height if nms_line_height > @biggest_text_height
  1109.  
  1110.         # Play Typing Sound
  1111.         if $nms.typ_se and @typse_count <= 0
  1112.           RPG::SE.new($nms.typ_file, $nms.typ_vol).play
  1113.           @typse_count += $nms.typ_skip
  1114.         end
  1115.         #Show Fast & Text Delay
  1116.         @show_fast = true if $nms.lbl == false
  1117.  
  1118.         @delay_text += $nms.text_delay
  1119.       end
  1120.       break unless @show_fast or @line_show_fast
  1121.     end
  1122.   end
  1123.   #--------------------------------------------------------------------------
  1124.   # ? ??????????
  1125.   #--------------------------------------------------------------------------
  1126.   def finish_message
  1127.     if $game_message.choice_max > 0
  1128.       start_choice
  1129.     elsif $game_message.num_input_variable_id > 0
  1130.       start_number_input
  1131.     elsif @pause_skip
  1132.       terminate_message
  1133.     else
  1134.       self.pause = true
  1135.     end
  1136.     @wait_count = 10
  1137.     @text = nil
  1138.   end
  1139.   #--------------------------------------------------------------------------
  1140.   # ? ??????
  1141.   #--------------------------------------------------------------------------
  1142.   def start_choice
  1143.     self.active = true
  1144.     self.index = 0
  1145.   end
  1146.   #--------------------------------------------------------------------------
  1147.   # ? EDITED
  1148.   #--------------------------------------------------------------------------
  1149.   def start_number_input
  1150.     digits_max = $game_message.num_input_digits_max
  1151.     number = $game_variables[$game_message.num_input_variable_id]
  1152.     @number_input_window.digits_max = digits_max
  1153.     @number_input_window.number = number
  1154.     if $game_message.face_name.empty? or MOVE_TEXT == false
  1155.       @number_input_window.x = x - 23
  1156.     else
  1157.       case $game_message.side
  1158.       when 0
  1159.         @number_input_window.x = (x + 112) - 23
  1160.       when 1
  1161.         @number_input_window.x = (x + text_x) - 23
  1162.       when 2
  1163.         @number_input_window.x = x - 23
  1164.       when -1
  1165.         @number_input_window.x = x - 23
  1166.       end
  1167.     end
  1168.     @number_input_window.x += CHOICE_INPUT_X_PLUS
  1169.     @number_input_window.y = y + @contents_y
  1170.     @number_input_window.active = true
  1171.     @number_input_window.visible = true
  1172.     @number_input_window.update
  1173.   end
  1174.   #--------------------------------------------------------------------------
  1175.   # ? EDITED
  1176.   #--------------------------------------------------------------------------
  1177.   def update_cursor
  1178.     if @index >= 0
  1179.       if $game_message.face_name.empty?
  1180.       x = TEXT_X_PLUS
  1181.       else
  1182.       x = get_x_face
  1183.       end
  1184.       y = ($game_message.choice_start + @index) * WLH
  1185.       # CHANGE WIDTH OF CURSOR FOR CHOICE SELECT
  1186.       if $game_message.face_name.empty? or MOVE_TEXT == false
  1187.         facesize = x
  1188.       else
  1189.         facesize = get_x_face
  1190.         facesize += @face.width if $game_message.side == 2
  1191.         facesize += @face.width + 16 if $game_message.side == -1
  1192.       end
  1193.       self.cursor_rect.set(x, y, contents.width - facesize, WLH)
  1194.     else
  1195.       self.cursor_rect.empty
  1196.     end
  1197.   end
  1198.  
  1199.   #--------------------------------------------------------------------------
  1200.   # ? ?????????
  1201.   #--------------------------------------------------------------------------
  1202.   def input_pause
  1203.     if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  1204.       self.pause = false
  1205.       if @text != nil and not @text.empty?
  1206.         new_page if @line_count >= $game_message.max_line
  1207.       else
  1208.         terminate_message
  1209.       end
  1210.     end
  1211.   end
  1212.   #--------------------------------------------------------------------------
  1213.   # ? ????????
  1214.   #--------------------------------------------------------------------------
  1215.   def input_choice
  1216.     if Input.trigger?(Input::B)
  1217.       if $game_message.choice_cancel_type > 0
  1218.         Sound.play_cancel
  1219.         $game_message.choice_proc.call($game_message.choice_cancel_type - 1)
  1220.         terminate_message
  1221.       end
  1222.     elsif Input.trigger?(Input::C)
  1223.       Sound.play_decision
  1224.       $game_message.choice_proc.call(self.index)
  1225.       terminate_message
  1226.     end
  1227.   end
  1228.   #--------------------------------------------------------------------------
  1229.   # ? ???????
  1230.   #--------------------------------------------------------------------------
  1231.   def input_number
  1232.     if Input.trigger?(Input::C)
  1233.       Sound.play_decision
  1234.       $game_variables[$game_message.num_input_variable_id] =
  1235.         @number_input_window.number
  1236.       $game_map.need_refresh = true
  1237.       terminate_message
  1238.     end
  1239.   end
  1240. end
  1241.  
  1242. #==============================================================================
  1243. # NMS +[ADD ON]+ WINDOW_MESSAGE_CLASS
  1244. #------------------------------------------------------------------------------
  1245. #==============================================================================
  1246.  
  1247. class Window_Message < Window_Selectable
  1248.  
  1249. # Return X for Text
  1250. def get_x_face
  1251.   if MOVE_TEXT == true
  1252.     case $game_message.side
  1253.     when 0
  1254.       return 112 + TEXT_X_PLUS
  1255.     when 1
  1256.       return text_x
  1257.     when 2
  1258.       return TEXT_X_PLUS
  1259.     else
  1260.       return TEXT_X_PLUS
  1261.     end
  1262.   else
  1263.     return TEXT_X_PLUS
  1264.   end
  1265. end
  1266.  
  1267.   def text_x
  1268.     return @face.width + TEXT_X_PLUS
  1269.   end
  1270.  
  1271.   # Clear Name Box & Name Text
  1272.   def clear_namebox
  1273.     @nametxt.bitmap.dispose
  1274.     @namebox.dispose
  1275.     @namebox = nil
  1276.     @name_text = nil
  1277.   end
  1278.  
  1279.   def nms_get_map_name
  1280.     mapdata = load_data("Data/MapInfos.rvdata")
  1281.     map_id = $game_map.map_id
  1282.     return mapdata[map_id].name
  1283.   end
  1284.  
  1285.   #--------------------------------------
  1286.   # DRAW FACE [Both Systems] METHOD
  1287.   #------------------------------------
  1288.   def draw_face2(face_name, x, y, index = 0, animf = false, animf_index = 0, animf_max = 1, nofade = false)
  1289.   if animf
  1290.     # Use Animated Face
  1291.     bitmap = Cache.face(face_name)
  1292.     rect = Rect.new(0,0,0,0)
  1293.     rect.width = (bitmap.width / animf_max)
  1294.     rect.height = bitmap.height
  1295.     rect.x = animf_index * rect.width
  1296.     rect.y = 0
  1297.     @face.bitmap = Bitmap.new(rect.width,rect.height)
  1298.     @face.bitmap.blt(0,0,bitmap,rect)
  1299.     bitmap.dispose
  1300.   elsif $game_message.side == 0 or $game_message.side == -1 or EightFaces_File
  1301.     # USE 8 FACES PER FILE
  1302.     bitmap = Cache.face(face_name)
  1303.     faceskin = Cache.face("faceskin")
  1304.     rect = Rect.new(0,0,0,0)
  1305.     rect.width = (bitmap.width / 4)
  1306.     rect.height = (bitmap.height / 2)
  1307.     rect.x = index % 4 * rect.width
  1308.     rect.y = index / 4 * rect.height
  1309.     @face.bitmap = Bitmap.new(rect.width,rect.height)
  1310.     @face.bitmap.blt(0,0,bitmap,rect)
  1311.     @face.bitmap.blt(0,0,faceskin,rect)
  1312.     bitmap.dispose
  1313.   else
  1314.     # USE 1 FACES PER FILE
  1315.     @face.bitmap = Cache.face(face_name)
  1316.   end
  1317.   # SET X/Y OF FACE DEPENDS ON FACE SIDE
  1318.   if $game_message.side == 1
  1319.     @face.mirror = false
  1320.     @face.x = x + 6
  1321.     @face.y = y - 6 + height - @face.height
  1322.   elsif $game_message.side == 2
  1323.     @face.mirror = true
  1324.     @face.x = x + ((self.width - 6) - @face.width)
  1325.     @face.y = y - 6 + height - @face.height
  1326.   elsif $game_message.side == 0
  1327.     @face.mirror = false
  1328.     @face.x = x + 16
  1329.     @face.y = y - 16 + height - @face.height
  1330.   elsif $game_message.side == -1
  1331.     @face.mirror = true
  1332.     @face.x = x + self.contents.width - @face.width + 16
  1333.     @face.y = y - 16 + height - @face.height
  1334.   end
  1335.     @face.x += FACE_X_PLUS
  1336.     @face.y += FACE_Y_PLUS
  1337.     @face_data = [face_name, index, $game_message.side]
  1338.     if @face_data != @face_data_old and FADE_MOVE_WHEN_USE_NEW_FACE; @showtime = 1; @face_data_old = @face_data; end
  1339.     @face.opacity = 0 if !nofade and ($nms.face_fade == true and ((FADE_ONLY_FIRST and @showtime <= 1) or (FADE_ONLY_FIRST == false)))
  1340.   end
  1341.   #--------------------------------------
  1342.   # DRAW NAME BOX METHOD
  1343.   #-----------------------------------
  1344.   def draw_name(name,x,y)
  1345.     name = name + NAMEBOX_TEXT_AFTER_NAME
  1346.     a = Bitmap.new(33,33)
  1347.     a.font.name = NAMEBOX_TEXT_FONT
  1348.     a.font.size = NAMEBOX_TEXT_SIZE
  1349.     rect = a.text_size(name)
  1350.     a.dispose
  1351.     @nametxt.bitmap = Bitmap.new(16 + rect.width, rect.height + NAMEBOX_TEXT_HEIGHT_PLUS)
  1352.     @nametxt.x = x + 8
  1353.     # Eienshinken
  1354.     if $game_message.side == 1 or $game_message.side == 2
  1355.       if @face.bitmap == nil
  1356.         @nametxt.x += NAMEBOX_X_PLUS_EIENSHINKEN
  1357.       else
  1358.         @nametxt.x += NAMEBOX_X_PLUS_NEO
  1359.       end
  1360.     else
  1361.       if @face.bitmap == nil
  1362.         @nametxt.x += NAMEBOX_X_PLUS_EIENSHINKEN
  1363.       else
  1364.         @nametxt.x += NAMEBOX_X_PLUS_NOR
  1365.       end
  1366.     end
  1367.     @nametxt.y = y - 20 + ($game_message.position == 0 ? NAMEBOX_Y_PLUS_TOP : NAMEBOX_Y_PLUS)
  1368.     namebox_x_plus = ($game_message.side == 1 or $game_message.side == 2) ? NAMEBOX_X_PLUS_NEO : NAMEBOX_X_PLUS_NOR
  1369.     @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)
  1370.     @namebox = Window.new
  1371.     @namebox.windowskin = Cache.system(NAMEBOX_SKIN)
  1372.     @namebox.z = self.z + 10
  1373.     @namebox.opacity = case @background
  1374.     when 0; NAMEBOX_OPACITY
  1375.     when 1; NAMEBOX_OPACITY_DIM_BG
  1376.     when 2; NAMEBOX_OPACITY_NO_BG
  1377.     end
  1378.     @namebox.back_opacity = NAMEBOX_BACK_OPACITY
  1379.     @namebox.openness = 255
  1380.     @namebox.x = @nametxt.x - NAMEBOX_BOX_WIDTH_PLUS
  1381.     @namebox.y = @nametxt.y - NAMEBOX_BOX_HEIGHT_PLUS
  1382.     @namebox.width = @nametxt.bitmap.width + (NAMEBOX_BOX_WIDTH_PLUS * 2)
  1383.     @namebox.height = @nametxt.bitmap.height + (NAMEBOX_BOX_HEIGHT_PLUS * 2)
  1384.     # Fixed position bug
  1385.     @namebox.x = 0 if @namebox.x < 0
  1386.     @namebox.x = (Graphics.width - @namebox.width) if (@namebox.x + @namebox.width) > Graphics.width
  1387.     @nametxt.bitmap.font.name = NAMEBOX_TEXT_FONT
  1388.     @nametxt.bitmap.font.size = NAMEBOX_TEXT_SIZE
  1389.     @nametxt.bitmap.font.bold = NAMEBOX_TEXT_BOLD
  1390.     if NAMEBOX_TEXT_OUTLINE == true
  1391.       # MAKE TEXT OUTLINE
  1392.       old_shadow = @nametxt.bitmap.font.shadow
  1393.       @nametxt.bitmap.font.color = Color.new(0,0,0)
  1394.       @nametxt.bitmap.draw_text(0,2,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1395.       @nametxt.bitmap.draw_text(0,0,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1396.       @nametxt.bitmap.draw_text(2,0,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1397.       @nametxt.bitmap.draw_text(2,2,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1398.       @nametxt.bitmap.font.shadow = old_shadow
  1399.     end
  1400.     @nametxt.bitmap.font.color = Color.new($game_message.color[0],$game_message.color[1],$game_message.color[2])
  1401.     @nametxt.bitmap.draw_text(1,1,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  1402.     @name_text = nil
  1403.   end
  1404.  
  1405.   #--------------------------------------
  1406.   # DRAW NEW FACE
  1407.   #-----------------------------------
  1408.   def nms_draw_new_face
  1409.     # Setup Face Name / Index
  1410.     name = $game_message.face_name
  1411.     index = $game_message.face_index
  1412.     animf_test = name.sub(/\[([0-9]+)\]/, "")
  1413.     # Animated?
  1414.     @animf = $1.to_i > 0 ? true : false
  1415.     @animf_maxind = $1.to_i
  1416.     @animf_ind = 0
  1417.     @animf_dl = $nms.animf_delay
  1418.     # CALL DRAW FACE METHOD
  1419.     draw_face2(name, self.x, self.y, index, @animf, @animf_ind, @animf_maxind)
  1420.   end
  1421.   #--------------------------------------
  1422.   # UPDATE ANIMATION FACE
  1423.   #-----------------------------------
  1424.   def update_animate_face
  1425.     if (!self.pause or $nms.animf_cont)
  1426.       @animf_dl -= 1
  1427.       if @animf_dl <= 0
  1428.         @animf_ind = (@animf_ind + 1) % @animf_maxind
  1429.         @animf_dl = $nms.animf_delay
  1430.         draw_face2($game_message.face_name, self.x, self.y, index, @animf, @animf_ind, @animf_maxind, true)
  1431.       end
  1432.     elsif @animf_ind != 0
  1433.       @animf_ind = 0
  1434.       draw_face2($game_message.face_name, self.x, self.y, index, @animf, @animf_ind, @animf_maxind, true)
  1435.     end
  1436.   end
  1437.   #--------------------------------------
  1438.   # SCROLL TEXT HORIZONTAL
  1439.   #-----------------------------------
  1440.   def nms_scroll_hori(scr_width)
  1441.     biggest = @biggest_text_height > WLH ? @biggest_text_height : WLH
  1442.     rect = Rect.new(0, @contents_y, contents.width, biggest)
  1443.     bitmap = Bitmap.new(rect.width, rect.height)
  1444.     bitmap.blt(0, 0, contents, rect)
  1445.     contents.clear_rect(rect)
  1446.     rect = Rect.new(0, 0, rect.width, rect.height)
  1447.     contents.blt(0 - scr_width, @contents_y, bitmap, rect)
  1448.     contents.clear_rect(0, 0, @face.width, @face.height) if @face.bitmap != nil
  1449.     bitmap.dispose
  1450.     @contents_x = @contents_x - scr_width
  1451.   end
  1452.  
  1453.   #--------------------------------------
  1454.   # GET HEX COLOR by RPG & ERZENGEL
  1455.   #------------------------------------
  1456.   def get_hex(n)
  1457.     red = 0
  1458.     green = 0
  1459.     blue = 0
  1460.     if n.size != 6
  1461.       print("Hex triplets must be six characters long!\nNormal color will be used.")
  1462.       return normal_color
  1463.     end
  1464.     for i in 1..6
  1465.       sliced = n.slice!(/./m)
  1466.       value = hexconvert(sliced)
  1467.       case i
  1468.       when 1; red += value * 16
  1469.       when 2; red += value
  1470.       when 3; green += value * 16
  1471.       when 4; green += value
  1472.       when 5; blue += value * 16
  1473.       when 6; blue += value
  1474.       end
  1475.     end
  1476.     return Color.new(red, green, blue)
  1477.   end
  1478.   def hexconvert(n)
  1479.     case n
  1480.     when "0"; return 0
  1481.     when "1"; return 1
  1482.     when "2"; return 2
  1483.     when "3"; return 3
  1484.     when "4"; return 4
  1485.     when "5"; return 5
  1486.     when "6"; return 6
  1487.     when "7"; return 7
  1488.     when "8"; return 8
  1489.     when "9"; return 9
  1490.     when "A"; return 10
  1491.     when "B"; return 11
  1492.     when "C"; return 12
  1493.     when "D"; return 13
  1494.     when "E"; return 14
  1495.     when "F";return 15
  1496.     else; return -1
  1497.     end
  1498.   end
  1499. end # CLASS END
  1500.  
  1501. #==============================================================================
  1502. # NMS +[ADD ON]+ OTHER CLASS
  1503. #------------------------------------------------------------------------------
  1504. #==============================================================================
  1505.  
  1506. # STORE variables here~*
  1507. class Game_Message
  1508.   attr_accessor :nms_fontname, :nms_fontsize, :event_id, :side, :color, :_name,
  1509. :last_color, :text_delay, :lbl, :msg_w, :msg_h, :msg_x, :max_line, :nms_face_name,
  1510. :nms_face_index, :next_msg, :typ_se, :typ_file, :typ_skip, :typ_vol, :mback, :mback_opac,
  1511. :qt, :txt_scrl, :msg_h_user, :animf_delay, :animf_cont, :txt_cut, :txt_unl, :txt_scrl_hori,
  1512. :txt_scrl_hori_delay, :face_fade, :face_move, :msg_temp_y, :msg_temp_x, :msg_temp_h,
  1513. :msg_temp_w
  1514.  
  1515.  
  1516.   alias wor_nms_old_ini initialize
  1517.   def initialize
  1518.     create_nms_data
  1519.     wor_nms_old_ini
  1520.   end
  1521.  
  1522.   def create_nms_data
  1523.     # NFS
  1524.     @side = Window_Base::DEFAULT_FACE_SIDE
  1525.     @_name = ""
  1526.     @color = Window_Base::NAMEBOX_TEXT_DEFAULT_COLOR
  1527.     # NMS
  1528.     @last_color = 0
  1529.     @nms_fontname = Window_Base::NMS_FONT_NAME
  1530.     @nms_fontsize = Window_Base::NMS_FONT_SIZE
  1531.     @event_id = 0
  1532.     @text_delay = Window_Base::NMS_DELAY_PER_LETTER
  1533.     @lbl = true
  1534.     @msg_w = Window_Base::NMS_MSGWIN_WIDTH
  1535.     @msg_h = @msg_h_user = Window_Base::NMS_MSGWIN_MIN_HEIGHT
  1536.     @msg_x = Window_Base::NMS_MSGWIN_X
  1537.     @max_line = Window_Base::NMS_MAX_LINE
  1538.     @nms_face_name = ""
  1539.     @nms_face_index = 1
  1540.     @next_msg = false
  1541.     @typ_se = Window_Base::TYPING_SOUND
  1542.     @typ_file = Window_Base::TYPING_SOUND_FILE
  1543.     @typ_skip = Window_Base::TYPING_SOUND_SKIP
  1544.     @typ_vol = Window_Base::TYPING_SOUND_VOLUME
  1545.     @mback = Window_Base::NMS_MSG_BACK
  1546.     @mback_opac = Window_Base::NMS_MSG_BACK_OPACITY
  1547.     @qt = Array.new
  1548.     @txt_scrl = Window_Base::NMS_TEXT_SCROLL
  1549.     @animf_delay = Window_Base::ANIMATE_FACE_DELAY
  1550.     @animf_cont = Window_Base::ANIMATE_FACE_CONTINUE
  1551.     @txt_cut = Window_Base::NMS_TEXT_AUTO_CUT
  1552.     @txt_scrl_hori = Window_Base::NMS_TEXT_AUTO_SCROLL_HORIZONTAL
  1553.     @txt_scrl_hori_delay = Window_Base::NMS_TEXT_AUTO_SCROLL_HORIZONTAL_DELAY
  1554.     @txt_unl = Window_Base::NMS_USER_NEW_LINE
  1555.     @face_fade = Window_Base::FADE_EFFECT
  1556.     @face_move = Window_Base::MOVE_EFFECT
  1557.     @msg_temp_x = nil
  1558.     @msg_temp_y = nil
  1559.     @msg_temp_h = nil
  1560.     @msg_temp_w = nil
  1561.   end
  1562. end
  1563.  
  1564. class Game_Map
  1565.   attr_accessor :interpreter
  1566. end
  1567.  
  1568. class Game_Interpreter
  1569.   attr_accessor :params
  1570. end
  1571.  
  1572. class Game_Interpreter
  1573.   def command_101
  1574.     unless $game_message.busy
  1575.       $game_message.event_id = @event_id
  1576.       $game_message.face_name = @params[0]
  1577.       $game_message.face_index = @params[1]
  1578.       $game_message.background = @params[2]
  1579.       $game_message.position = @params[3]
  1580.       next_msg = true
  1581.     loop do
  1582.       if @list[@index].code == 101 and $game_message.max_line > $game_message.texts.size and next_msg
  1583.         @index += 1
  1584.       else
  1585.         break
  1586.       end
  1587.       next_msg = false
  1588.       while @list[@index].code == 401 and $game_message.max_line > $game_message.texts.size
  1589.         next_msg = $game_message.next_msg
  1590.         $game_message.texts.push(@list[@index].parameters[0])
  1591.         @index += 1
  1592.       end
  1593.     end
  1594.       if @list[@index].code == 102
  1595.         setup_choices(@list[@index].parameters)
  1596.       elsif @list[@index].code == 103
  1597.         setup_num_input(@list[@index].parameters)
  1598.       end
  1599.       set_message_waiting
  1600.     end
  1601.     return false
  1602.   end
  1603.  
  1604.   def setup_choices(params)
  1605.     if $game_message.texts.size <= $game_message.max_line - params[0].size
  1606.       $game_message.choice_start = $game_message.texts.size
  1607.       $game_message.choice_max = params[0].size
  1608.       for s in params[0]
  1609.         $game_message.texts.push(s)
  1610.       end
  1611.       $game_message.choice_cancel_type = params[1]
  1612.       $game_message.choice_proc = Proc.new { |n| @branch[@indent] = n }
  1613.       @index += 1
  1614.     end
  1615.   end
  1616. end




这个是对话的脚本,求使用方法,研究了老半天都不行,谢谢
自己测试的,开始界面没问题,可是进入游戏后显示不了字体,好像有哪里不对,总之求使用方法
QQ图片20131218000859.jpg QQ图片20131218000921.jpg 就这样的  

评分

参与人数 1星屑 -20 收起 理由
怪蜀黍 -20 擅自以【更改帖子标签】的方式结帖违规.

查看全部评分

Lv2.观梦者

会吐槽的画师

梦石
0
星屑
782
在线时间
3431 小时
注册时间
2011-6-10
帖子
6535
发表于 2013-12-18 07:37:25 | 显示全部楼层
这不是六道的窗口么,干脆就从原基础上直接改得了……
长名公主玩家群:372588926 攻略娱乐应有尽有
了解更多新RM游戏,游戏制作请加入RPGmaker支援群:113622890
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
182 小时
注册时间
2009-4-22
帖子
208
 楼主| 发表于 2013-12-18 11:24:32 | 显示全部楼层
上贺茂润 发表于 2013-12-18 07:37
这不是六道的窗口么,干脆就从原基础上直接改得了……

我就是不想,想知道脚本怎么用
回复 支持 反对

使用道具 举报

Lv2.观梦者

永无止境的旅程

梦石
0
星屑
503
在线时间
1552 小时
注册时间
2012-6-19
帖子
1226

开拓者贵宾

发表于 2013-12-18 14:00:31 | 显示全部楼层
209和335的“方正圆粗体”   改成 "黑体"

评分

参与人数 1星屑 +100 收起 理由
怪蜀黍 + 100 一针见血

查看全部评分

[url=https://rpg.blue/thread-389697-1-1.html]https://rpg.blue/https://rpg.blue/data/attachment/forum/201602/26/220128cfbxxs47xth4xkz4.jpg[/url]
&lt;font size=&quot;5&quot;&gt;[color=Green][url=https://rpg.blue/forum.php?mod=viewthread&amp;tid=396208&amp;extra=page%3D1][color=DeepSkyBlue]全新配套ACT系统,每周末一大更新,尽请期待。[/color][/url][/color]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
185
在线时间
834 小时
注册时间
2012-9-16
帖子
1810
发表于 2013-12-18 17:40:10 | 显示全部楼层
这好吧好吧好吧。。。。。这只是字体的问题。。之前就当我什么都没说好了

——旧坑欢迎戳
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
182 小时
注册时间
2009-4-22
帖子
208
 楼主| 发表于 2013-12-18 21:18:58 | 显示全部楼层
丿梁丶小柒 发表于 2013-12-18 14:00
209和335的“方正圆粗体”   改成 "黑体"

谢谢,够准确
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-29 18:11

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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