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

Project1

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

有沒有VA版的【仿空轨地图人物气球】的腳本呢?

[复制链接]

Lv4.逐梦者

梦石
4
星屑
8386
在线时间
815 小时
注册时间
2017-10-28
帖子
444
跳转到指定楼层
1
发表于 2018-5-13 00:34:04 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 Kim_Shyuen 于 2021-9-8 16:17 编辑

有相同功能的MV腳本>>> 仿空轨地图人物气球YEP-ICON BALLOONS

功能-
玩家接近特定事件時,該事件會自動顯示氣泡;
相反 遠離特定事件后 氣泡就會自動消失


想詢問下各位有沒有VA版本的呢?


Steam官方网站
《逃離地獄邊緣》是一款以中世紀修道院為背景的懸疑冒險遊戲。
在遊戲中,你將與主角艾德琳一同踏入一個迷人且充滿宗教元素的中世紀世界,與你的夥伴海雷娜一同探索並逃離這座修道院。
圍繞著神與人,自由與信仰的故事,由此開啟——

Lv4.逐梦者

梦石
4
星屑
8386
在线时间
815 小时
注册时间
2017-10-28
帖子
444
2
 楼主| 发表于 2018-5-13 10:27:44 | 只看该作者
樓上有廣告雞 @fux2

点评

收到  发表于 2018-5-13 10:56

Steam官方网站
《逃離地獄邊緣》是一款以中世紀修道院為背景的懸疑冒險遊戲。
在遊戲中,你將與主角艾德琳一同踏入一個迷人且充滿宗教元素的中世紀世界,與你的夥伴海雷娜一同探索並逃離這座修道院。
圍繞著神與人,自由與信仰的故事,由此開啟——
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
1
星屑
14790
在线时间
2106 小时
注册时间
2017-9-28
帖子
662
3
发表于 2018-5-13 11:20:05 | 只看该作者
本帖最后由 Nil2018 于 2018-5-13 11:24 编辑

我试了一下,用mog的事件感应范围脚本和yami对话框+quack插件可以做到。
至于效果....还行吧,传了一个工程你可以看看。


汉化Yami 气泡对话框 Quack插件.rar (1.45 MB, 下载次数: 109)


提示内容是文字的话,可以用 theoallen 的  悬停通知+悬停通知范围(https://rpg.blue/thread-405900-1-1.html

提示内容是图标或文字的话,可以用modern algebra的 hover alert


RUBY 代码复制
  1. #==============================================================================
  2. #    悬停提示
  3. #    Version: 1.0.3
  4. #    Author: modern algebra (rmrk.net)
  5. #    Date: 4 November 2012
  6. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7. #  Description:
  8. #   
  9. #    This script lets you display a graphic which hovers above any given event,
  10. #   player or follower. The primary virtue of the script is that it allows for
  11. #   a feature like in Diablo(暗黑破坏神), where characters that have something important to
  12. #   say have an exclamation(感叹) point or something above their heads. However, it
  13. #   is not limited to that: this script can show any picture, icon, text, or
  14. #   combination of icon & text above any character. (本脚本可以显示图片、图标
  15. #   文字或者图标与文字混合)
  16. #
  17. #    A secondary (and completely optional) feature is that you can set it up so
  18. #   that whenever gold, items, weapons, or armours are received through their
  19. #   respective event commands, a hover alert will float above the player's head
  20. #   with the icon, name, and amount of the item received before fading out.
  21. #   (可以在角色获得物品时于角色头顶显示 图标、物品名和数量)
  22. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  23. #  Instructions:
  24. #   
  25. #    Paste this script into its own slot in the Script Editor, above Main but
  26. #   below Materials.(将此脚本放到main上、素材下)
  27. #
  28. #    I decided to try something new with this script, so this script operates
  29. #   through event comment commands. When the comment is the very first comment
  30. #   on an event's page, then the hover graphic set through that comment will
  31. #   automatically be generated as soon as that event page's conditions are met.
  32. #   If it is not, then it will only be run when that event is active and the
  33. #   Interpreter reaches it.
  34. #
  35. #    The basic format for setting a hover graphic above the event in which the
  36. #   comment occurs is as follows, with any of the options between the curly
  37. #   brackets omitted if you are satisfied with the default setting:
  38. #    使用注释:  (下面是默认的格式)
  39. #      \hover_alert { name = ""; icon = 0; icon_hue = 0; time = -1;
  40. #        fontname = "Default"; fontsize = 20; colour = 0; bold = false;
  41. #        italic = false; effect = :none; effect_param = nil; se = nil;
  42. #        proximity = 0 }
  43. #
  44. #   When setting any of the options, make sure it is concluded with either a
  45. #   semicolon or simply a new line. Each of the options is explained below, but
  46. #   I reiterate that you can exclude almost any of them if you are satisfied
  47. #   with the default value listed above:
  48. #
  49. #      name - 设定显示的图片或文字, 如果在picture文件夹里有“name”文件,
  50. #          图片会被显示. 否则将会显示“name”的文字。(你也可以空着,啥也不写)
  51. #
  52. #      icon - 设定显示图标的index ID,将会显示在任何文字的左边
  53. #              在“name”有同名图片文件时,图标不会显示
  54. #              在“name”仅为文字或者是空白时,图标会显示
  55. #
  56. #      icon_hue - 用来设定图标的色调,当然是在“icon”不为0的情况下。
  57. #
  58. #      time - 设定悬停提示显示的时间(单位为帧,1秒=60帧)
  59. #
  60. #      fontname - 设定显示文字的字体.
  61. #
  62. #      fontsize - 设定显示文字的大小.
  63. #
  64. #      colour - 设定显示文字的颜色. 它可以是“window”文件右下角调色盘的整数ID
  65. #               或者是  an array of integers corresponding to [red, green, blue, alpha]  (?)
  66. #              
  67. #      bold - 设定显示文字是否加粗。(加粗设为 “true”,不加粗设为“false”)
  68. #         
  69. #
  70. #      italic - 设定显示文字是否为斜体。(斜体设为 “true”,不是斜体设为“false”)
  71. #
  72. #      effect - 这是效果设定的标志
  73. #            有三种显示提示的效果:
  74. #            :bounce - 悬停提示会弹跳一下;
  75. #            :fade_bounce - 悬停提示会淡入淡出
  76. #            :flash - 悬停提示会闪烁.
  77. #
  78. #            还有四种关闭提示的效果:
  79. #            :fade - 悬停提示会显示大概半秒,然后淡出;
  80. #            :rise_and_fade - 和“fade”差不多, 只是在消失前会微小上升;
  81. #            :disintegrate - 悬停提示会显示大概半秒,然后像素随机消除半秒;
  82. #            :rise_and_disintegrate - 和“disintegrate”差不多, 只是在消失前会微小上升;This will do the same as :disintegrate,
  83. #                     
  84. #      effect_param - 设定闪烁的色调,只有你设定flash效果才有用(76行) ,可以设定为“window”
  85. #                    文件右下角调色盘的 ID 或者一个[r,g,b,a] 来更改闪烁的色调
  86. #
  87. #      se - 设定悬停标志出现时播放的音效SE,(不设置也行).
  88. #           必须为 ["文件名", 音量, 音调] 的格式
  89. #
  90. #      proximity - 设定感应距离。角色在事件某一范围内才会显示悬停提示。Set this to any integer, and the hover graphic will only
  91. #          be visible if the player is within that many squares of the
  92. #          character over which the hover graphic is intended to appear.
  93. #
  94. #   For any given hover alert, you only need to have either name or icon set
  95. #   directly. If you don't set those, then it will simply remove any existing
  96. #   hover graphic. If you exclude any other value, then I reiterate that it
  97. #   will just be set to the default value identified in the sample itself.
  98. #   You can set the default values for fontname, fontsize, colour, bold, italic
  99. #   and effect in the editable region starting at line 158.
  100. #
  101. #    Now, the above code will only set a hover graphic on the event in which
  102. #   the comment appears. For auto-hover alerts in comments at the top of the
  103. #   page, you can only set it to that event, but for the interpreted comments
  104. #   that appear anywhere else you can set the hover graphic above a different
  105. #   event by adding the ID of the event in square brackets after \hover_alert,
  106. #   like so:
  107. #
  108. #      \hover_alert[0] { ... }
  109. #
  110. #   Now, if you set it to -1, then it will show above the player. If you set it
  111. #   to 0, it will show above the event in which the comment is. If you set it
  112. #   to any integer > 0, it will show above the event with that ID. If you want
  113. #   to set it above a follower, then you need to put an f before the ID, like
  114. #   so:
  115. #
  116. #      \hover_alert[f1] { ... }
  117. #
  118. #   where 1 is the first follower after the player, 2 is the second, etc. You
  119. #   can also set a hover alert above a vehicle by placing a v instead of an f:
  120. #
  121. #      \hover_alert[v0] { ... }
  122. #
  123. #   0 is the boat, 1 is the ship, and 2 is the airship.
  124. #
  125. #    Finally, I mention again that you can remove a hover alert graphic simply
  126. #   by not setting the name or icon within the {}. In other words, the
  127. #   following code would delete any hover graphic over Event 4:
  128. #
  129. #      \hover_alert[4] { }
  130. #``````````````````````````````````````````````````````````````````````````````
  131. #  Autogain Hover Alerts
  132. #
  133. #    The autogain feature allows you to make it so that when gold and items are
  134. #   gained, a hover alert is created above the player showing what is received.
  135. #
  136. #    If you want to use this feature, the value of AUTOGAIN_HOVERALERTS_SWITCH
  137. #   at line 182 must be set to a value greater than 0, and then the autogain
  138. #   alerts will only occur when the in-game switch with that ID is ON. You can
  139. #   also set a number of other autogain features starting at line 185. I
  140. #   direct you there for instructions about what each does.
  141. #==============================================================================
  142.  
  143. $imported = {} unless $imported
  144. $imported[:MA_HoverAlerts] = true
  145.  
  146. #==============================================================================
  147. # *** MA_HoverAlert
  148. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  149. #  This module holds configuration and data for the Hover Alerts script
  150. #==============================================================================
  151.  
  152. module MA_HoverAlert
  153.   #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  154.   # * BEGIN  Editable Region
  155.   #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  156.   #  Text Option Defaults
  157.   #``````````````````````````````````````````````````````````````````````````
  158.   #    These options mostly just change the way text is drawn by default, and
  159.   #   are all subject to be overridden in any hover alert.
  160.   FONTNAME = Font.default_name #  The font used when drawing text
  161.   FONTSIZE = Font.default_size #  The size of text when drawing text
  162.   COLOUR = [255, 255, 255]     #  The default colour of text when drawing text.
  163.                                # It can be either an [r, g, b, a] array or it
  164.                                # can be an integer for the windowskin palette.
  165.   BOLD = Font.default_bold     #  Whether text is bolded. It can be set to
  166.                                # either true or false
  167.   ITALIC = Font.default_italic #  Whether text is italicized. It can be set to
  168.                                # either true or false
  169.   EFFECT = :none               #  Default effect for regular hover alerts. It
  170.                                # can be set to either :none, :bounce, :flash,
  171.                                # :fade_bounce, or :rise_and_fade.
  172.   ANIMATE_FRAMES = 24          #  If using an animated picture named with a
  173.                                # %[x], then the number of frames to wait on
  174.                                # each frame. There are 60 frames in 1 second.
  175.   #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  176.   #  Autogain Options
  177.   #``````````````````````````````````````````````````````````````````````````
  178.   #    These options affect the autogain feature, and none affect any other
  179.   #   hover alert except those created when gaining items.
  180.   AUTOGAIN_HOVERALERTS_SWITCH = 19 #  The ID of the switch used to turn the
  181.                                   # autogain feature on and off. If you never
  182.                                   # want to use it, set this to 0.
  183.   AUTOGAIN_GOLD_ICON = 262        #  The icon for gold when autogaining
  184.   AUTOGAIN_NAME_FORMAT = "%s"     #  The format for the name of the item. The
  185.                                   # %s will be replaced with the item's name
  186.                                   # when autogaining.
  187.   AUTOGAIN_NUM_FORMAT = " %+d"    #  The format for the amount gained. The %+d
  188.                                   # is replaced by the number of items or gold
  189.                                   # gained.
  190.   AUTOGAIN_GAIN_SE = ["Chime2"]   #  The SE played when gaining items.
  191.   AUTOGAIN_LOSE_SE = ["Chime1"]   #  The SE played when losing items.
  192.   AUTOGAIN_EFFECT = :rise_and_fade# Effect when autogaining. It can be
  193.                                   # either :fade, :rise_and_fade, :disintegrate,
  194.                                   # or :rise_and_disintegrate.
  195.   #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  196.   # * END    Editable Region
  197.   #//////////////////////////////////////////////////////////////////////////
  198.   AUTOGAIN_GAIN_SE = RPG::SE.new(*AUTOGAIN_GAIN_SE) if AUTOGAIN_GAIN_SE.is_a?(Array)
  199.   AUTOGAIN_LOSE_SE = RPG::SE.new(*AUTOGAIN_LOSE_SE) if AUTOGAIN_LOSE_SE.is_a?(Array)
  200.  
  201.   #==========================================================================
  202.   # ** HoverAlert
  203.   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  204.   #  This class holds hoveralert data
  205.   #==========================================================================
  206.  
  207.   class HoverAlert < Struct.new(:name, :icon_index, :icon_hue, :effect,
  208.     :effect_param, :se, :proximity, :fontname, :fontsize, :colour, :bold,
  209.     :italic, :time)
  210.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  211.     # * Object Initialization
  212.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  213.     def initialize(*args)
  214.       defaults = MA_HoverAlert.maha_default_values
  215.       defaults[0, args.size] = args unless args.empty?
  216.       super(*defaults)
  217.     end
  218.   end
  219.  
  220.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  221.   # * Default Values
  222.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  223.   def self.maha_default_values
  224.     ["", 0, 0, MA_HoverAlert::EFFECT, 0, nil, 0, MA_HoverAlert::FONTNAME,
  225.       MA_HoverAlert::FONTSIZE, MA_HoverAlert::COLOUR, MA_HoverAlert::BOLD,
  226.       MA_HoverAlert::ITALIC, -1]
  227.   end
  228. end
  229.  
  230. #==============================================================================
  231. # ** Game_CharacterBase
  232. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  233. #  Summary of Changes:
  234. #    aliased methods
  235. #    new method - show_hover_alert  
  236. #==============================================================================
  237.  
  238. class Game_CharacterBase
  239.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  240.   # * Public Instance Variables
  241.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  242.   attr_reader   :hover_alert
  243.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  244.   # * Initialize Private Members
  245.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  246.   alias maha_initprivmem_1cr0 init_private_members
  247.   def init_private_members(*args)
  248.     maha_initprivmem_1cr0(*args) # Call original method
  249.     clear_hover_alert
  250.   end
  251.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252.   # * Clear Hover Alert
  253.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  254.   def clear_hover_alert
  255.     @hover_alert_queue = []
  256.     @hover_alert = nil
  257.   end
  258.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  259.   # * Show Hover Alert
  260.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  261.   def show_hover_alert(name = "", icon = 0, *args)
  262.     if (name.nil? || name.empty?) && (icon.nil? || icon == 0)
  263.       @hover_alert = @hover_alert_queue.empty? ? nil : @hover_alert_queue.shift
  264.     else
  265.       alert = MA_HoverAlert::HoverAlert.new(name, icon, *args)
  266.       @hover_alert ? @hover_alert_queue.push(alert) : @hover_alert = alert
  267.     end
  268.   end
  269.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  270.   # * Replace Hover Alert
  271.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  272.   def replace_hover_alert(*args)
  273.     clear_hover_alert
  274.     show_hover_alert(*args)
  275.   end
  276.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  277.   # * Setup Hover Alert by Comment
  278.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  279.   def interpret_hover_alert_comment(text)
  280.     if text[/\\HOVER_ALERT\[?.*?\]?\s*\{(.*?)\}/im]
  281.       name, icon, icon_hue, effect, effect_param, se, proximity, fontname,   
  282.         fontsize, colour, bold, italic, time = *MA_HoverAlert.maha_default_values
  283.       color = nil # Initialize alternate spelling of color
  284.       eval($1)
  285.       colour = color if color
  286.       se = RPG::SE.new(*se) if se.is_a?(Array)
  287.       replace_hover_alert(name, icon, icon_hue, effect, effect_param, se,
  288.         proximity, fontname, fontsize, colour, bold, italic, time)
  289.     end
  290.   end
  291. end
  292.  
  293. #==============================================================================
  294. # ** Game_Event
  295. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  296. #  Summary of Changes:
  297. #    aliased methods - setup_page_settings; clear_page_settings
  298. #    new method - ma_collect_first_comment  
  299. #==============================================================================
  300.  
  301. class Game_Event
  302.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  303.   # * Setup Page Settings
  304.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  305.   alias ma_stuppgsets_7sj5 setup_page_settings
  306.   def setup_page_settings(*args)
  307.     ma_stuppgsets_7sj5(*args) # Call original method
  308.     clear_hover_alert
  309.     interpret_hover_alert_comment(ma_collect_init_comment)
  310.   end
  311.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  312.   # * Clear Page Settings
  313.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  314.   alias ma_clrpgsettings_5na5 clear_page_settings
  315.   def clear_page_settings(*args)
  316.     ma_clrpgsettings_5na5(*args) # Call original method
  317.     clear_hover_alert
  318.   end
  319.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  320.   # * Collect First Comment
  321.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  322.   def ma_collect_init_comment
  323.     comment, i = "", 0
  324.     while !@list[i].nil? && (@list[i].code == 108 || @list[i].code == 408)
  325.       comment += @list[i].parameters[0] + "\n"
  326.       i += 1
  327.     end
  328.     comment
  329.   end unless self.method_defined?(:ma_collect_init_comment)
  330. end
  331.  
  332. #==============================================================================
  333. # ** Game_Party
  334. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  335. #  Summary of Changes:
  336. #    new method - maha_item_number_plus_equips
  337. #==============================================================================
  338.  
  339. class Game_Party
  340.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  341.   # * Item Number and Equips
  342.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  343.   def maha_item_number_plus_equips(item)
  344.     equip_num = 0
  345.     members.each { |actor| equip_num += actor.equips.count(item) }
  346.     item_number(item) + equip_num
  347.   end
  348. end
  349.  
  350. #==============================================================================
  351. # ** Game_Interpreter
  352. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  353. #  Summary of Changes:
  354. #    aliased method - command_108
  355. #==============================================================================
  356.  
  357. class Game_Interpreter
  358.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  359.   # * Command 108
  360.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  361.   alias maha_cmmndcomment_6cz9 command_108
  362.   def command_108(*args)
  363.     initial = (@index == 0)
  364.     maha_cmmndcomment_6cz9(*args) # Call original method
  365.     maha_interpret_hover_comment(@comments.join("\n")) unless initial
  366.   end
  367.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  368.   # * Setup Hover Alert Comment
  369.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  370.   def maha_interpret_hover_comment(text)
  371.     text2 = text.dup
  372.     loop do # Get evert hover alert code in the comment
  373.       match = text2.slice!(/\\HOVER[ _]ALERT\[?\s*([VF]?)(-?\d*)\s*\]?\s*\{.*?\}/im)
  374.       break if match.nil?
  375.       case $1.upcase
  376.       when ''  # Empty
  377.         character = get_character($2.to_i)
  378.       when 'F' # Follower
  379.         character = $2.to_i == 0 ? $game_player : $game_player.followers[$2.to_i - 1]
  380.         return if !character || !character.visible?
  381.       when 'V' # Vehicle
  382.         character = $game_map.vehicles[$2.to_i]
  383.         return if !character || !character.transparent
  384.       end
  385.       character.interpret_hover_alert_comment(match) if character.is_a?(Game_CharacterBase)
  386.     end
  387.   end
  388.   if MA_HoverAlert::AUTOGAIN_HOVERALERTS_SWITCH >= 0
  389.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  390.     # * Gain Gold
  391.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  392.     alias maha_command125_5fx9 command_125
  393.     def command_125(*args, &block)
  394.       old_value = $game_party.gold
  395.       maha_command125_5fx9(*args, &block) # Call Original Method
  396.       # Add to receipt if the possessed amount of gold has changed
  397.       if $game_party.gold != old_value && (MA_HoverAlert::AUTOGAIN_HOVERALERTS_SWITCH == 0 ||
  398.         $game_switches[MA_HoverAlert::AUTOGAIN_HOVERALERTS_SWITCH])
  399.         text = sprintf(MA_HoverAlert::AUTOGAIN_NUM_FORMAT, $game_party.gold - old_value)
  400.         se = $game_party.gold > old_value ? MA_HoverAlert::AUTOGAIN_GAIN_SE : MA_HoverAlert::AUTOGAIN_LOSE_SE
  401.         $game_player.show_hover_alert(text, MA_HoverAlert::AUTOGAIN_GOLD_ICON,
  402.           0, MA_HoverAlert::AUTOGAIN_EFFECT, 0, se)
  403.       end
  404.     end
  405.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  406.     # * Gain Item
  407.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  408.     alias maha_comnd126_2vv9 command_126
  409.     def command_126(*args)
  410.       item = $data_items[@params[0]]
  411.       old_val = $game_party.maha_item_number_plus_equips(item)
  412.       maha_comnd126_2vv9(*args) # Call original method
  413.       autogain_item_hover_alert(item, $game_party.maha_item_number_plus_equips(item) - old_val)
  414.     end
  415.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  416.     # * Gain Weapon
  417.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  418.     alias maha_commn127_3ar4 command_127
  419.     def command_127(*args)
  420.       item = $data_weapons[@params[0]]
  421.       old_val = $game_party.maha_item_number_plus_equips(item)
  422.       maha_commn127_3ar4(*args) # Call original method
  423.       autogain_item_hover_alert(item, $game_party.maha_item_number_plus_equips(item) - old_val)
  424.     end
  425.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  426.     # * Gain Armor
  427.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  428.     alias maha_cnd128_1sp6 command_128
  429.     def command_128(*args)
  430.       item = $data_armors[@params[0]]
  431.       old_val = $game_party.maha_item_number_plus_equips(item)
  432.       maha_cnd128_1sp6(*args) # Call original method
  433.       autogain_item_hover_alert(item, $game_party.maha_item_number_plus_equips(item) - old_val)
  434.     end
  435.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  436.     # * Autogain Hover Alert
  437.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  438.     def autogain_item_hover_alert(item, n)
  439.       return if n == 0 || !(MA_HoverAlert::AUTOGAIN_HOVERALERTS_SWITCH == 0 ||
  440.         $game_switches[MA_HoverAlert::AUTOGAIN_HOVERALERTS_SWITCH])
  441.       text = sprintf(MA_HoverAlert::AUTOGAIN_NAME_FORMAT, item.name) +
  442.         sprintf(MA_HoverAlert::AUTOGAIN_NUM_FORMAT, n)
  443.       se = n > 0 ? MA_HoverAlert::AUTOGAIN_GAIN_SE : MA_HoverAlert::AUTOGAIN_LOSE_SE
  444.       icon_hue = $imported[:MAIcon_Hue] ? item.icon_hue : 0
  445.       $game_player.show_hover_alert(text, item.icon_index, icon_hue,
  446.         MA_HoverAlert::AUTOGAIN_EFFECT, 0, se)
  447.     end
  448.   end
  449. end
  450.  
  451. #==============================================================================
  452. # ** Sprite_HoverAlert
  453. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  454. #  This class handles showing the hover sprite.
  455. #==============================================================================
  456.  
  457. class Sprite_HoverAlert < Sprite_Base
  458.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  459.   # * Object Initialization
  460.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  461.   def initialize(viewport, character)
  462.     # Initialize variables
  463.     @char_x, @char_y = 0, 0
  464.     @effect_x, @effect_y = 0, 0
  465.     @effect, @effect_param, @effect_time = :none, 0, -1
  466.     @ap_time, @ap_max_time, @ap_width, @ap_frame_index, @ap_frame_num = -1, 0, 0, 0, 0
  467.     @time = 0
  468.     @disintegrate_array = []
  469.     super(viewport)
  470.     self.z = 200
  471.     @character = character
  472.     refresh
  473.   end
  474.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  475.   # * Free
  476.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  477.   def dispose(*args)
  478.     bitmap.dispose if bitmap && !bitmap.disposed?
  479.     super(*args)
  480.   end
  481.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  482.   # * Update
  483.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  484.   def update
  485.     super
  486.     refresh if @hover_alert != @character.hover_alert # if hover alert changed
  487.     if bitmap
  488.       if @hover_alert.proximity > 0
  489.         x = @character.distance_x_from($game_player.x).abs
  490.         y = @character.distance_y_from($game_player.y).abs
  491.         self.visible = Math.hypot(x, y) <= @hover_alert.proximity
  492.       end
  493.       if self.visible
  494.         maha_update_se              # Update Sound Effect
  495.         maha_update_frame_animation # Update animation
  496.         maha_update_effect          # Update the effect being played
  497.         # Adust position
  498.         self.x = @char_x + @effect_x
  499.         self.y = @char_y + @effect_y
  500.       end
  501.       if @hover_alert && @hover_alert.time > 0
  502.         if @time == @hover_alert.time
  503.           @character.show_hover_alert("", 0) # End Hover Alert
  504.           refresh
  505.         end
  506.         @time += 1
  507.       end
  508.     end
  509.   end
  510.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  511.   # * Update SE
  512.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  513.   def maha_update_se
  514.     if @hover_alert.se && !@se_played
  515.       @hover_alert.se.play
  516.       @se_played = true
  517.     end
  518.   end
  519.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  520.   # * Update Frame Animation
  521.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  522.   def maha_update_frame_animation
  523.     if @ap_time == 0 # If timer finished
  524.       # Switch frames
  525.       @ap_frame_index = (@ap_frame_index + 1) % @ap_frame_num
  526.       @ap_time = @ap_max_time
  527.       self.src_rect.x = @ap_frame_index*@ap_width
  528.     end
  529.     @ap_time -= 1 if @ap_time > 0 # Decrease timer until finished
  530.   end
  531.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  532.   # * Adjust Character Position
  533.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  534.   def adjust_character_position(x, y); @char_x, @char_y = x, y; end
  535.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  536.   # * Refresh
  537.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  538.   def refresh
  539.     @se_played = false
  540.     @hover_alert = @character.hover_alert
  541.     bitmap.dispose if bitmap && !bitmap.disposed?
  542.     return unless @hover_alert
  543.     (!@hover_alert.name.empty? ? maha_draw_picture : maha_draw_text) rescue maha_draw_text
  544.     self.ox = @ap_width / 2
  545.     self.oy = bitmap.height
  546.     self.visible = true
  547.     maha_start_effect
  548.   end
  549.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  550.   # * Reset Font Settings
  551.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  552.   def maha_reset_font_settings
  553.     bitmap.font = Font.new(@hover_alert.fontname, @hover_alert.fontsize)
  554.     bitmap.font.bold = @hover_alert.bold
  555.     bitmap.font.italic = @hover_alert.italic
  556.   end
  557.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  558.   # * Text Colour
  559.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  560.   def text_color(n)
  561.     colour = case n
  562.     when Integer
  563.       # Extended Colour Palette compatibility
  564.       if $imported[:MA_ExtendedColourPalette] && n >= 32
  565.         n -= 32
  566.         Cache.system("Palette").get_pixel((n % 8) * 8, (n / 8) * 8)
  567.       else
  568.         Cache.system("Window").get_pixel(64 + (n % 8) * 8, 96 + (n / 8) * 8)
  569.       end
  570.     when Array then Color.new(*n)
  571.     else Color.new(255, 255, 255)
  572.     end
  573.   end
  574.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  575.   # * Draw Picture
  576.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  577.   def maha_draw_picture
  578.     # Use picture if it exists
  579.     self.bitmap = Cache.picture(@hover_alert.name).dup
  580.     @ap_width = bitmap.width
  581.     if @hover_alert.name[/%\[(\d+)[\s,;]*(\d*?)\]/] # If animated graphic
  582.       # Setup animated picture variables
  583.       @ap_frame_num = $1.to_i
  584.       @ap_width /= @ap_frame_num
  585.       @ap_max_time = $2.empty? ? MA_HoverAlert::ANIMATE_FRAMES : $2.to_i
  586.       @ap_frame_index = 0
  587.       @ap_time = @ap_max_time
  588.       self.src_rect = Rect.new(0, 0, @ap_width, bitmap.height)
  589.     else
  590.       @ap_time = -1
  591.     end
  592.   end
  593.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  594.   # * Draw Text
  595.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  596.   def maha_draw_text
  597.     # Else draw the word
  598.     x = 0
  599.     self.bitmap = Bitmap.new(24, 24)
  600.     if @hover_alert.name && !@hover_alert.name.empty?
  601.       maha_reset_font_settings
  602.       # Retrieve actual string
  603.       ts = bitmap.text_size(@hover_alert.name)
  604.       if @hover_alert.icon_index > 0
  605.         x = 28
  606.         ts.width += 28
  607.         ts.height = 24 if ts.height < 24
  608.       end
  609.       # Resize
  610.       bitmap.dispose
  611.       self.bitmap = Bitmap.new(ts.width + 4, ts.height + 4)
  612.       maha_reset_font_settings
  613.       bitmap.font.color = text_color(@hover_alert.colour)
  614.       # Draw text
  615.       bitmap.draw_text(x, 0, bitmap.width - x, bitmap.height, @hover_alert.name, 1)
  616.     end
  617.     # Draw Icon
  618.     @hover_alert.icon_hue == 0 ? maha_draw_icon(@hover_alert.icon_index, 0, (height - 24) / 2) :
  619.       maha_draw_icon_with_hue(@hover_alert.icon_index, @hover_alert.icon_hue, 0, (height - 24) / 2)
  620.     @ap_time = -1
  621.     @ap_width = bitmap.width
  622.   end
  623.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  624.   # * Draw Icon
  625.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  626.   def maha_draw_icon(icon_index, x, y)
  627.     bmp = Cache.system("Iconset")
  628.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  629.     bitmap.blt(x, y, bmp, rect, 255)
  630.   end
  631.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  632.   # * Draw Icon With Hue
  633.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  634.   def maha_draw_icon_with_hue(icon_index, icon_hue, x, y)
  635.     bmp = Cache.system("Iconset")
  636.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  637.     # Draw Icon onto small and independent bitmap
  638.     icon_bmp = Bitmap.new(24, 24)
  639.     icon_bmp.blt(0, 0, bmp, rect)
  640.     icon_bmp.hue_change(icon_hue) # Change hue of icon
  641.     rect.x, rect.y = 0, 0
  642.     bitmap.blt(x, y, icon_bmp, rect, 255)
  643.     icon_bmp.dispose # Dispose Icon Bitmap
  644.   end
  645.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646.   # * Start HoverAlert Effect
  647.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  648.   def maha_start_effect
  649.     @effect = @hover_alert.effect
  650.     @effect_param = @hover_alert.effect_param
  651.     @effect_x, @effect_y = 0, 0
  652.     @disintegrate_array.clear
  653.     self.opacity = 255
  654.     case @effect
  655.     when :bounce, :fade_bounce then @effect_time = 32
  656.     when :flash
  657.       @effect_time = 32
  658.       flash(text_color(@effect_param), @effect_time)
  659.     when :rise_and_fade
  660.       @effect_time = 48
  661.       @effect_y = 18
  662.     when :fade then @effect_time = 48
  663.     when :disintegrate, :rise_and_disintegrate
  664.       @effect_y = 24 if @effect == :rise_and_disintegrate
  665.       @effect_time = 64
  666.       for i in 0...bitmap.width
  667.         for j in 0...bitmap.height
  668.           @disintegrate_array.push(i, j)
  669.         end
  670.       end
  671.     else
  672.       @effect_time = -1
  673.     end
  674.   end
  675.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  676.   # * Update HoverAlert Effect
  677.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  678.   def maha_update_effect
  679.     if @effect_time == 0
  680.       case @effect
  681.       when :bounce, :flash, :fade_bounce then maha_start_effect # Repeat
  682.       else maha_finish_effect # Close
  683.       end
  684.     elsif @effect_time > 0
  685.       case @effect
  686.       when :bounce then @effect_y += (@effect_time > 16 ? -0.5 : 0.5)
  687.       when :fade_bounce then self.opacity += (@effect_time > 16 ? -8 : 8)
  688.       # Temporary Effects
  689.       when :fade then self.opacity = 16*@effect_time if @effect_time < 16
  690.       when :rise_and_fade
  691.         @effect_y -= 0.5
  692.         self.opacity = 16*@effect_time if @effect_time < 16
  693.       when :disintegrate then maha_update_disintegrate_effect if @effect_time < 32
  694.       when :rise_and_disintegrate
  695.         @effect_y -= 0.5 if @effect_time > 32
  696.         maha_update_disintegrate_effect if @effect_time < 32
  697.       end
  698.       @effect_time -= 1
  699.     end
  700.   end
  701.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  702.   # * Update Disintegrate Effect
  703.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  704.   def maha_update_disintegrate_effect
  705.     col = Color.new(0, 0, 0, 0)
  706.     (bitmap.width*bitmap.height / 32).times do
  707.       i = (rand(@disintegrate_array.size / 2)*2)
  708.       x, y = *@disintegrate_array[i, 2]
  709.       bitmap.set_pixel(x, y, col)
  710.       @disintegrate_array.delete_at(i)
  711.       @disintegrate_array.delete_at(i + 1)
  712.     end
  713.   end
  714.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  715.   # * Finish HoverAlert Effect
  716.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  717.   def maha_finish_effect
  718.     @effect_x, @effect_y = 0, 0
  719.     @effect_time = -1
  720.     self.opacity = 255
  721.     @disintegrate_array.clear
  722.     # Set to next hover alert, if any
  723.     @character.show_hover_alert("", 0)
  724.     refresh
  725.   end
  726. end
  727.  
  728. #==============================================================================
  729. # ** Sprite_Character
  730. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  731. #  Summary of Changes:
  732. #    aliased methods - update; dispose
  733. #    new methods - update_maha_sprite; dispose_maha_sprite
  734. #==============================================================================
  735.  
  736. class Sprite_Character
  737.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  738.   # * Frame Update
  739.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  740.   alias maha_update_2hz0 update
  741.   def update(*args)
  742.     maha_update_2hz0(*args) # Call original method
  743.     update_maha_sprite
  744.   end
  745.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  746.   # * Update Hover Alert
  747.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  748.   def update_maha_sprite
  749.     if !@maha_sprite && @character.hover_alert # Create the HoverAlert sprite
  750.       @maha_sprite = Sprite_HoverAlert.new(viewport, @character)
  751.     end
  752.     if @maha_sprite
  753.       if @character.hover_alert.nil?
  754.         dispose_maha_sprite
  755.       else
  756.         # Pass position of sprite to the hover alert's sprite
  757.         @maha_sprite.adjust_character_position(self.x, self.y - self.oy)
  758.         @maha_sprite.update
  759.       end
  760.     end
  761.   end
  762.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  763.   # * Dispose
  764.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  765.   alias maha_dispose_4cm6 dispose
  766.   def dispose(*args)
  767.     dispose_maha_sprite
  768.     maha_dispose_4cm6(*args) # Call original method
  769.   end
  770.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  771.   # * Dispose Hover Alert Sprite
  772.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  773.   def dispose_maha_sprite
  774.     @maha_sprite.dispose if @maha_sprite && !@maha_sprite.disposed?
  775.     @maha_sprite = nil
  776.   end
  777. end

点评

噢噢,我這就試試看,謝謝你!  发表于 2018-5-13 12:04

评分

参与人数 3星屑 +50 +2 收起 理由
RaidenInfinity + 50 认可答案
FacLos + 1 很实用
Kim_Shyuen + 1 感謝

查看全部评分

VA外站脚本汉化群:226308173   |    部分远古文件备份:https://wwzv.lanzoue.com/b02rac5pc  密码:acgm
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-17 06:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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