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

Project1

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

[已经过期] 请求帮忙修改耐久度脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
145
在线时间
81 小时
注册时间
2010-12-28
帖子
11
跳转到指定楼层
1
发表于 2014-6-19 18:45:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 taroxd 于 2014-6-19 18:51 编辑

大家好,我又厚颜无耻的来求教了。
由于不会脚本编程,所以希望有好心的大大可以帮忙修改一下?

这是XaiL大的耐久度脚本,
里头强制性的在商店里添加了修复功能。
我想把修复菜单独立出来,
需要用到的时候再呼叫。

请问是否可以把它从商店页去除呢?
谢谢
RUBY 代码复制
  1. #==============================================================================
  2. #   XaiL System - Item Durability
  3. #   Author: Nicke
  4. #   Created: 23/07/2012
  5. #   Edited: 28/08/2012
  6. #   Version: 1.0b
  7. #==============================================================================
  8. # Instructions
  9. # -----------------------------------------------------------------------------
  10. # To install this script, open up your script editor and copy/paste this script
  11. # to an open slot below ? Materials but above ? Main. Remember to save.
  12. #
  13. # This script is pretty extensive which means you need to configure it to
  14. # get it as you want it.
  15. #
  16. # To setup a durability/max durability value for an item do the following in the
  17. # notetag:
  18. # <durability: n>
  19. # <max_durability: n>
  20. # Where n is a floated value (2.3, 2.5 for example).
  21. #
  22. # You can also enable/disable repairing for an item:
  23. # <repairable: bool>
  24. # Where bool is true or false.
  25. # This option will be true as default if you don't specify it.
  26. #
  27. # To check an item's current durability value, do the following in a script call:
  28. # $game_party.durability?(item_id, item_type)
  29. # $game_party.durability?(1, :weapon)
  30. # $game_party.durability?(2, :armor)
  31. # $game_party.durability?(3, :item)
  32. #
  33. # All of those calls above will return the current durability value for each item.
  34. # You can also check the max durability value as well:
  35. # $game_party.max_durability?(item_id, item_type)
  36. # $game_party.max_durability?(3, :item)
  37. #
  38. # Althought the shop is intended for repairing you can force repair an item
  39. # without it costing any gold by the following script call:
  40. # $game_party.change_durability(nil, :repair, 2, :weapon)
  41. # This will repair item_id 2 for weapons without it costing any gold.
  42. #
  43. # Using the same method but with a different option you can damage your item
  44. # by doing the following instead:
  45. # $game_party.change_durability(value, type, item, item_type)
  46. # $game_party.change_durability(0.5, :damage, 2, :weapon)
  47. # This will damage item_id 2 for weapons by a value of 0.5.
  48. #
  49. # You can also restore durability value for an item:
  50. # $game_party.change_durability(2.0, :restore, 2, :weapon)
  51. # This will restore 2.0 durability value to the current value.
  52. #
  53. # You can check if an item can be repaired:
  54. # $game_party.repairable?(1, :item)
  55. #
  56. # You can alter the repair/damage formula in the settings.
  57. # Default for repairing is half the item's price.
  58. # Default for damaging an item is a randomized value by 0.1-0.5 with a
  59. # probability chance at 1/5.
  60. #
  61. # Current durability status for items will be displayed at the end of battle.
  62. # This will only work for the default battle system at the moment.
  63. # A few settings is located below to setup up this.
  64. #
  65. # *** Only for RPG Maker VX Ace. ***
  66. #==============================================================================
  67. ($imported ||= {})["XAIL-ITEM-DURABILITY"] = true
  68.  
  69. module XAIL
  70.   module ITEM_DURABILITY
  71.   #--------------------------------------------------------------------------#
  72.   # * Settings
  73.   #--------------------------------------------------------------------------#
  74.     # FONT = [name, size, color, bold, shadow]
  75.     FONT = [["Anklada™", "Verdana"], 16, Color.new(255,225,255), true, true]
  76.  
  77.     # Show/hide option for the ahop scene.
  78.     # DISPLAY = [show_help_icon, show_name, show_description,
  79.     # show_type, show_amount]
  80.     DISPLAY = [true, true, true, true, true]
  81.  
  82.     # Set the name of repair in the shop scene.
  83.     # REPAIR_COMMAND = string
  84.     REPAIR_COMMAND = "Repair"
  85.  
  86.     # Set the repair cost forumla.
  87.     def self.repair_price(item)
  88.       return item.price / 2
  89.     end
  90.  
  91.     # Set the damage formula.
  92.     def self.durability_damage
  93.       return rand(5) == 0 ? rand(5).to_f/10 + 0.1 : 0
  94.     end
  95.  
  96.     # USE_BROKEN = true/false
  97.     # Should you be able to equip broken items.
  98.     USE_BROKEN = false
  99.  
  100.     # TEXT_BROKEN = string
  101.     # Set the text for a broken item. (Used in battle)
  102.     TEXT_BROKEN = "Broken:"
  103.  
  104.     # DURABILITY_LOG = true/false
  105.     # Display durability status at scene battle. (Default battle system)
  106.     DURABILITY_LOG = true
  107.  
  108.     # LOG_WAIT = number
  109.     # How many times should the durability log wait.
  110.     LOG_WAIT = 3
  111.  
  112.   end
  113. end
  114. # *** Don't edit below unless you know what you are doing. ***
  115. #==============================================================================#
  116. # ** RPG::BaseItem
  117. #==============================================================================#
  118. class RPG::BaseItem
  119.  
  120.   attr_accessor :durability
  121.  
  122.   alias xail_item_durability_baseitem_init initialize
  123.   def initialize(*args, &block)
  124.     # // Method to initialize.
  125.     xail_item_durability_baseitem_init(*args, &block)
  126.     @durability = 0
  127.   end
  128.  
  129.   def durability
  130.     # // Method to check the item durability.
  131.     @note.scan(/<(?:DURABILITY|durability):\s(\d+.\d+)>/i)
  132.     return @durability unless @durability.nil?
  133.     return ($1.to_f > 0.0 ? $1.to_f : 0.0)
  134.   end
  135.  
  136.   def max_durability
  137.     # // Method to check the item max durability.
  138.     @note.scan(/<(?:MAX_DURABILITY|max_durability):\s(\d+.\d+)>/i)
  139.     return ($1.to_f > 0.0 ? $1.to_f : 0.0)
  140.   end
  141.  
  142.   def repairable
  143.     # // Method to check if item is repairable.
  144.     @note.scan(/<(?:REPAIRABLE|repairable):\s+(true|false)>/i)
  145.     return false if durability == max_durability
  146.     return true if $1.nil?
  147.     return eval($1)
  148.   end
  149.  
  150. end
  151. #==============================================================================#
  152. # ** Game_Party
  153. #==============================================================================#
  154. class Game_Party < Game_Unit
  155.  
  156.   def check_type(item_type)
  157.     # // Method to check the item type.
  158.     case item_type
  159.     when :item   ; item_type = $data_items
  160.     when :weapon ; item_type = $data_weapons
  161.     when :armor  ; item_type = $data_armors
  162.     end
  163.     item_type
  164.   end
  165.  
  166.   def durability?(item_id, item_type)
  167.     # // Method to check the current durability of a specified id.
  168.     item_type = check_type(item_type)
  169.     item_type[item_id].durability unless item_type[item_id].nil?
  170.   end
  171.  
  172.   def max_durability?(item_id, item_type)
  173.     # // Method to check the maximum durability of a specified id.
  174.     item_type = check_type(item_type)
  175.     item_type[item_id].max_durability unless item_type[item_id].nil?
  176.   end
  177.  
  178.   def change_durability(value, type, item_id, item_type)
  179.     # // Method to change the durability value for an item.
  180.     item_type = check_type(item_type)
  181.     item = item_type[item_id]
  182.     case type
  183.     when :restore
  184.       item.durability = (item.durability + value).clamp(0, item.max_durability)
  185.     when :damage
  186.       item.durability = (item.durability - value).clamp(0, item.max_durability)
  187.     when :repair
  188.       item.durability = item.max_durability
  189.     end unless item.nil?
  190.   end
  191.  
  192.   def repairable?(item_id, item_type)
  193.     # // Method to check if an item can be repaired.
  194.     item_type = check_type(item_type)
  195.     item_type[item_id].repairable
  196.   end
  197.  
  198. end
  199. #==============================================================================#
  200. # ** Game_Battler
  201. #==============================================================================#
  202. class Game_Battler < Game_BattlerBase
  203.  
  204.   alias xail_item_durability_gm_battler_execute_damage execute_damage
  205.   def execute_damage(user)
  206.     # // Method to execute damage.
  207.     if user.is_a?(Game_Actor)
  208.       r = Random.new
  209.       r = r.rand(0..4)
  210.       item = user.actor.equips[r]
  211.       item_type = :armor ; item_type = :weapon if r == 0
  212.       $game_party.change_durability(XAIL::ITEM_DURABILITY.durability_damage, :damage, item, item_type)
  213.       if $game_party.durability?(item, item_type) == 0
  214.         $game_actors[user.actor.id].change_equip(r, nil)
  215.       end
  216.     end
  217.     xail_item_durability_gm_battler_execute_damage(user)
  218.   end
  219.  
  220. end
  221. #==============================================================================#
  222. # ** Game_Actor
  223. #==============================================================================#
  224. class Game_Actor < Game_Battler
  225.  
  226.   def optimize_equipments
  227.     # // Method override optimize equipments.
  228.     clear_equipments
  229.     equip_slots.size.times do |i|
  230.       next if !equip_change_ok?(i)
  231.       items = $game_party.equip_items.select do |item|
  232.         item.etype_id == equip_slots[i] &&
  233.         equippable?(item) && item.performance >= 0 && item.durability != 0.0
  234.       end
  235.       change_equip(i, items.max_by {|item| item.performance })
  236.     end
  237.   end
  238.  
  239. end
  240. #==============================================================================#
  241. # ** Window_Help
  242. #==============================================================================#
  243. class Window_Help < Window_Base
  244.  
  245.   def set_durability_help(item)
  246.     # // Method to set the item for window help.
  247.     contents.font.name = XAIL::ITEM_DURABILITY::FONT[0]
  248.     contents.font.bold = XAIL::ITEM_DURABILITY::FONT[3]
  249.     contents.font.shadow = XAIL::ITEM_DURABILITY::FONT[4]
  250.     contents.font.out_color = Color.new(0,0,0,255)
  251.     if item
  252.       icon = XAIL::ITEM_DURABILITY::DISPLAY[0] ? '\i[' + item.icon_index.to_s + ']' : ""
  253.       name = XAIL::ITEM_DURABILITY::DISPLAY[1] ? '\c[2] »» ' + item.name + '\c[0]' : ""
  254.       desc = XAIL::ITEM_DURABILITY::DISPLAY[2] ? item.description : ""
  255.       weight = $imported["XAIL-INVENTORY-WEIGHT"] ? weight = " - Weight: #{item.weight}." : ""
  256.       durability = " - Durability: #{item.durability} / #{item.max_durability}."
  257.       if XAIL::ITEM_DURABILITY::DISPLAY[3]
  258.         if item.is_a?(RPG::Weapon) ; item_type = " (" + $data_system.weapon_types[item.wtype_id] + ")" end
  259.         if item.is_a?(RPG::Armor) ; item_type = " (" + $data_system.armor_types[item.etype_id] + ")" end
  260.       else
  261.         item_type = ""
  262.       end
  263.       new_line = "\n"
  264.       item_text = icon + name + item_type.to_s + weight + durability + new_line + desc
  265.     else
  266.       item_text = ""
  267.     end
  268.     set_text(item_text)
  269.   end
  270.  
  271. end
  272. #==============================================================================
  273. # ** Window_ShopCommand
  274. #==============================================================================
  275. class Window_ShopCommand < Window_HorzCommand
  276.  
  277.   def col_max
  278.     # // Method to set col max.
  279.     return 4
  280.   end
  281.  
  282.   alias xail_item_durability_winshop_make_cmd_list make_command_list
  283.   def make_command_list(*args, &block)
  284.     # // Method to make command list.
  285.     xail_item_durability_winshop_make_cmd_list(*args, &block)
  286.     add_command(XAIL::ITEM_DURABILITY::REPAIR_COMMAND, :repair)
  287.   end
  288.  
  289. end
  290. #==============================================================================
  291. # ** Window_ShopRepair
  292. #==============================================================================
  293. class Window_ShopRepair < Window_ItemList
  294.  
  295.   def initialize(x, y, width, height)
  296.     # // Method to initialize.
  297.     super(x, y, width, height)
  298.   end
  299.  
  300.   def enable?(item)
  301.     # // Method to check if a item is valid to be repair.
  302.     item && XAIL::ITEM_DURABILITY.repair_price(item) <= $game_party.gold &&
  303.     !$game_party.item_max?(item) && item.max_durability != item.durability
  304.   end
  305.  
  306.   alias xail_item_durability_shop_update_help update_help
  307.   def update_help(*args, &block)
  308.     # // Method to check if a item is valid to be repair.
  309.     xail_item_durability_shop_update_help(*args, &block)
  310.     @help_window.set_durability_help(item) if @help_window
  311.   end
  312.  
  313. end
  314. #==============================================================================#
  315. # ** Window_BattleLog
  316. #==============================================================================#
  317. class Window_BattleLog < Window_Selectable
  318.  
  319.   def display_durability(battler)
  320.     # // Method to display durability status in battle.
  321.     # i.e if a item has been broken.
  322.     if battler.is_a?(Game_Actor)
  323.       for i in 0..4
  324.         item = battler.actor.equips[i]
  325.         item_type = :armor ; item_type = :weapon if i == 0
  326.         if $game_party.durability?(item, item_type) == 0
  327.           item_type = $game_party.check_type(item_type)
  328.           item = item_type[item]
  329.           item = XAIL::ITEM_DURABILITY::TEXT_BROKEN + " " + item.name
  330.           add_text(sprintf(item))
  331.           XAIL::ITEM_DURABILITY::LOG_WAIT.times do
  332.             wait
  333.           end
  334.         end
  335.       end
  336.     end
  337.   end
  338.  
  339. end
  340. #==============================================================================#
  341. # ** Window_EquipItem
  342. #==============================================================================#
  343. class Window_EquipItem < Window_ItemList
  344.  
  345.   alias xail_item_durability_win_equip_enable? enable?
  346.   def enable?(item)
  347.     # // Method to check if a item is enabled/disabled.
  348.     return false if item.durability == 0 && !XAIL::ITEM_DURABILITY::USE_BROKEN unless item.nil?
  349.     xail_item_durability_win_equip_enable?(item)
  350.   end
  351.  
  352. end
  353. #==============================================================================#
  354. # ** Scene_Shop
  355. #==============================================================================#
  356. class Scene_Shop < Scene_MenuBase
  357.  
  358.   alias xail_item_durability_shop_start start
  359.   def start(*args, &block)
  360.     # // Method to start the scene.
  361.     xail_item_durability_shop_start(*args, &block)
  362.     create_repair_window
  363.   end
  364.  
  365.   alias xail_item_durability_shop_create_cmd_win create_command_window
  366.   def create_command_window(*args, &block)
  367.     # // Method to create command window.
  368.     xail_item_durability_shop_create_cmd_win(*args, &block)
  369.     @command_window.set_handler(:repair, method(:command_repair))
  370.   end
  371.  
  372.   def create_repair_window
  373.     # // Method to create repair window.
  374.     wy = @category_window.y + @category_window.height
  375.     wh = Graphics.height - wy
  376.     @repair_window = Window_ShopRepair.new(0, wy, Graphics.width, wh)
  377.     @repair_window.viewport = @viewport
  378.     @repair_window.help_window = @help_window
  379.     @repair_window.hide
  380.     @repair_window.set_handler(:ok,     method(:on_repair_ok))
  381.     @repair_window.set_handler(:cancel, method(:on_repair_cancel))
  382.     @category_window.item_window = @repair_window
  383.   end
  384.  
  385.   def command_repair
  386.     # // Method for command repair.
  387.     @dummy_window.hide
  388.     @category_window.show.activate
  389.     @repair_window.show
  390.     @repair_window.unselect
  391.     @repair_window.refresh
  392.   end
  393.  
  394.   def activate_repair
  395.     # // Method to active command options.
  396.     @repair_window.select(0)
  397.     @category_window.show
  398.     @repair_window.refresh
  399.     @repair_window.show.activate
  400.     @status_window.hide
  401.   end
  402.  
  403.   alias xail_item_durability_shop_on_cat_ok on_category_ok
  404.   def on_category_ok(*args, &block)
  405.     # // Method for category ok.
  406.     case @command_window.current_symbol
  407.     when :repair
  408.       activate_repair
  409.     when :sell
  410.       xail_item_durability_shop_on_cat_ok(*args, &block)
  411.     end
  412.   end
  413.  
  414.   alias xail_item_durability_shop_on_cat_cancel on_category_cancel
  415.   def on_category_cancel(*args, &block)
  416.     # // Method for category cancel.
  417.     xail_item_durability_shop_on_cat_cancel(*args, &block)
  418.     @repair_window.hide
  419.   end
  420.  
  421.   def on_repair_ok
  422.     # // Method to repair item.
  423.     @item = @repair_window.item
  424.     @status_window.item = @item
  425.     @category_window.hide
  426.     @repair_window.hide
  427.     @number_window.set(@item, max_item, repair_price, currency_unit)
  428.     @number_window.show.activate
  429.     @status_window.show
  430.   end
  431.  
  432.   def on_repair_cancel
  433.     # // Method to cancel repair.
  434.     @repair_window.unselect
  435.     @category_window.activate
  436.     @status_window.item = nil
  437.     @help_window.clear
  438.   end
  439.  
  440.   alias xail_item_durability_shop_on_number_ok on_number_ok
  441.   def on_number_ok(*args, &block)
  442.     # // Method on number ok.
  443.     if @command_window.current_symbol == :repair
  444.       do_repair(@number_window.number)
  445.     end
  446.     xail_item_durability_shop_on_number_ok(*args, &block)
  447.   end
  448.  
  449.   alias xail_item_durability_shop_end_number_input end_number_input
  450.   def end_number_input(*args, &block)
  451.     # // Method to check input number.
  452.     if @command_window.current_symbol == :repair
  453.       activate_repair
  454.     end
  455.     xail_item_durability_shop_end_number_input(*args, &block)
  456.   end
  457.  
  458.   def do_repair(number)
  459.     # // Method to do repair.
  460.     if @item.is_a?(RPG::Item)   ; item_type = :item     end
  461.     if @item.is_a?(RPG::Weapon) ; item_type = :weapon   end
  462.     if @item.is_a?(RPG::Armor)  ; item_type = :armor    end
  463.     $game_party.lose_gold(number * repair_price)
  464.     $game_party.change_durability(nil, :repair, @item.id, item_type)
  465.     @repair_window.refresh
  466.     @gold_window.refresh
  467.     @status_window.refresh
  468.     @help_window.refresh
  469.   end
  470.  
  471.   def max_item
  472.     # // Method to determine max item.
  473.     $game_party.item_number(@item)
  474.   end
  475.  
  476.   def repair_price
  477.     # // Method to set the repair price for the item.
  478.     XAIL::ITEM_DURABILITY.repair_price(@item)
  479.   end
  480.  
  481. end
  482. #==============================================================================#
  483. # ** Scene_Battle
  484. #==============================================================================#
  485. class Scene_Battle < Scene_Base
  486.  
  487.   alias xail_item_durability_scene_battle_process_action_end process_action_end
  488.   def process_action_end(*args, &block)
  489.     # // Method when process end at scene battle.
  490.     if XAIL::ITEM_DURABILITY::DURABILITY_LOG
  491.       @log_window.display_durability(@subject)
  492.       @log_window.wait_and_clear
  493.     end
  494.     xail_item_durability_scene_battle_process_action_end(*args, &block)
  495.   end
  496.  
  497. end # END OF FILE
  498.  
  499. #=*==========================================================================*=#
  500. # ** END OF FILE
  501. #=*==========================================================================*=#

点评

下次发代码请用代码框。这次帮你编辑好了  发表于 2014-6-19 18:52

Lv2.观梦者

会吐槽的画师

梦石
0
星屑
782
在线时间
3431 小时
注册时间
2011-6-10
帖子
6535
2
发表于 2014-6-19 18:46:55 | 只看该作者
把这段去掉:
  1. #==============================================================================#
  2. # ** Scene_Shop
  3. #==============================================================================#
  4. class Scene_Shop < Scene_MenuBase
  5.   
  6.   alias xail_item_durability_shop_start start
  7.   def start(*args, &block)
  8.     # // Method to start the scene.
  9.     xail_item_durability_shop_start(*args, &block)
  10.     create_repair_window
  11.   end
  12.   
  13.   alias xail_item_durability_shop_create_cmd_win create_command_window
  14.   def create_command_window(*args, &block)
  15.     # // Method to create command window.
  16.     xail_item_durability_shop_create_cmd_win(*args, &block)
  17.     @command_window.set_handler(:repair, method(:command_repair))
  18.   end
  19.   
  20.   def create_repair_window
  21.     # // Method to create repair window.
  22.     wy = @category_window.y + @category_window.height
  23.     wh = Graphics.height - wy
  24.     @repair_window = Window_ShopRepair.new(0, wy, Graphics.width, wh)
  25.     @repair_window.viewport = @viewport
  26.     @repair_window.help_window = @help_window
  27.     @repair_window.hide
  28.     @repair_window.set_handler(:ok,     method(:on_repair_ok))
  29.     @repair_window.set_handler(:cancel, method(:on_repair_cancel))
  30.     @category_window.item_window = @repair_window
  31.   end
  32.   
  33.   def command_repair
  34.     # // Method for command repair.
  35.     @dummy_window.hide
  36.     @category_window.show.activate
  37.     @repair_window.show
  38.     @repair_window.unselect
  39.     @repair_window.refresh
  40.   end
  41.   
  42.   def activate_repair
  43.     # // Method to active command options.
  44.     @repair_window.select(0)
  45.     @category_window.show
  46.     @repair_window.refresh
  47.     @repair_window.show.activate
  48.     @status_window.hide
  49.   end
  50.   
  51.   alias xail_item_durability_shop_on_cat_ok on_category_ok
  52.   def on_category_ok(*args, &block)
  53.     # // Method for category ok.
  54.     case @command_window.current_symbol
  55.     when :repair
  56.       activate_repair
  57.     when :sell
  58.       xail_item_durability_shop_on_cat_ok(*args, &block)
  59.     end
  60.   end
  61.   
  62.   alias xail_item_durability_shop_on_cat_cancel on_category_cancel
  63.   def on_category_cancel(*args, &block)
  64.     # // Method for category cancel.
  65.     xail_item_durability_shop_on_cat_cancel(*args, &block)
  66.     @repair_window.hide
  67.   end
  68.   
  69.   def on_repair_ok
  70.     # // Method to repair item.
  71.     @item = @repair_window.item
  72.     @status_window.item = @item
  73.     @category_window.hide
  74.     @repair_window.hide
  75.     @number_window.set(@item, max_item, repair_price, currency_unit)
  76.     @number_window.show.activate
  77.     @status_window.show
  78.   end
  79.   
  80.   def on_repair_cancel
  81.     # // Method to cancel repair.
  82.     @repair_window.unselect
  83.     @category_window.activate
  84.     @status_window.item = nil
  85.     @help_window.clear
  86.   end
  87.   
  88.   alias xail_item_durability_shop_on_number_ok on_number_ok
  89.   def on_number_ok(*args, &block)
  90.     # // Method on number ok.
  91.     if @command_window.current_symbol == :repair
  92.       do_repair(@number_window.number)
  93.     end
  94.     xail_item_durability_shop_on_number_ok(*args, &block)
  95.   end
  96.   
  97.   alias xail_item_durability_shop_end_number_input end_number_input
  98.   def end_number_input(*args, &block)
  99.     # // Method to check input number.
  100.     if @command_window.current_symbol == :repair
  101.       activate_repair
  102.     end
  103.     xail_item_durability_shop_end_number_input(*args, &block)
  104.   end
  105.   
  106.   def do_repair(number)
  107.     # // Method to do repair.
  108.     if @item.is_a?(RPG::Item)   ; item_type = :item     end
  109.     if @item.is_a?(RPG::Weapon) ; item_type = :weapon   end
  110.     if @item.is_a?(RPG::Armor)  ; item_type = :armor    end
  111.     $game_party.lose_gold(number * repair_price)
  112.     $game_party.change_durability(nil, :repair, @item.id, item_type)
  113.     @repair_window.refresh
  114.     @gold_window.refresh
  115.     @status_window.refresh
  116.     @help_window.refresh
  117.   end
  118.   
  119.   def max_item
  120.     # // Method to determine max item.
  121.     $game_party.item_number(@item)
  122.   end
  123.   
  124.   def repair_price
  125.     # // Method to set the repair price for the item.
  126.     XAIL::ITEM_DURABILITY.repair_price(@item)
  127.   end
  128.   
  129. end
复制代码

点评

这段就是重新定义商店的 其实我也是路过打酱油的   发表于 2014-6-19 19:47
密密麻麻的看不懂的说 其实我是路过打酱油的  发表于 2014-6-19 18:51
长名公主玩家群:372588926 攻略娱乐应有尽有
了解更多新RM游戏,游戏制作请加入RPGmaker支援群:113622890
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
145
在线时间
81 小时
注册时间
2010-12-28
帖子
11
3
 楼主| 发表于 2014-6-19 20:22:43 | 只看该作者
万分感谢~
请问如果仍然想保留维修的视窗,
只是想把它从商店去除,
是否只要修改 class Scene_Shop < Scene_MenuBase
或需要另写一个全新的视窗呢?

另外谢谢版主帮忙编辑,
因为第一次问关于脚本的问题,
所以不知道原来脚本也有格式,
造成不便,实在抱歉。
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

4
发表于 2014-6-19 20:49:09 手机端发表。 | 只看该作者
本帖最后由 taroxd 于 2014-6-19 20:59 编辑
quess6506 发表于 2014-6-19 20:22
万分感谢~
请问如果仍然想保留维修的视窗,
只是想把它从商店去除,


原来的修理界面是内置在商店的。
所以,如果要脱离商店的话,必须重写一个独立的场景来实现(或内置于其他现有场景),脚本改动量应该不小。

作者强制在商店提供修理界面,正是因为只有这一个方式调出修理界面。

没有能实质性地帮上忙十分抱歉,期待有好心人吧。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-14 08:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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