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

Project1

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

[已经解决] 怎么改VA物品上限

[复制链接]

Lv1.梦旅人

梦石
0
星屑
95
在线时间
211 小时
注册时间
2011-8-16
帖子
300
跳转到指定楼层
1
发表于 2012-3-8 20:24:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如题。记得VX可以改,但是VA我改了半天也没有{:1_10:}@
so,请各位脚本高手告诉我下!
谢谢~
RPGMaker 脚本/学习交流群:143356012

Lv1.梦旅人

梦石
0
星屑
95
在线时间
211 小时
注册时间
2011-8-16
帖子
300
2
 楼主| 发表于 2012-3-8 20:34:06 | 只看该作者
饿~我说的是持有物品,数据库里有吗?
RPGMaker 脚本/学习交流群:143356012
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
149
在线时间
664 小时
注册时间
2011-9-25
帖子
241
3
发表于 2012-3-8 20:39:08 | 只看该作者
本帖最后由 xuzhengchi 于 2012-3-8 20:39 编辑

PHP 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Adjust Limits v1.00
  4. # -- Last Updated: 2011.12.03
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-AdjustLimits"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2011.12.03 - Finished Script.
  17. # 2011.12.02 - Started Script.
  18. #
  19. #==============================================================================
  20. # ▼ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # There exists some limitations in RPG Maker VX Ace that not everybody's fond
  23. # of. With this script, you can easily adjust the limits of each limitation.
  24. # Here's the list of various limits that can be changed:
  25. #
  26. # - Gold Max  - Have more than 99,999,999 gold.
  27. # - Item Max  - Have more than 99 items. Customizable per item, too.
  28. # - Level Max - Exceed 99 levels. Parameters are automatically calculated based
  29. #               on the level 99 and level 98 stats in the class parameters.
  30. # - Stat Max  - Stats can exceed 999. Does not adjust for current formulas.
  31. #
  32. #==============================================================================
  33. # ▼ Instructions
  34. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. # To install this script, open up your script editor and copy/paste this script
  36. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  37. #
  38. # -----------------------------------------------------------------------------
  39. # 角色备注栏 - These notetags go in the actors notebox in the database.
  40. # -----------------------------------------------------------------------------
  41. # <initial level: x>   设置角色的初始等级,可超过99.
  42.  
  43. # <max level: x>       设置角色的最高等级,可超过99.
  44.  
  45. # -----------------------------------------------------------------------------
  46. # 职业备注栏 - These notetags go in the class notebox in the database.
  47. # -----------------------------------------------------------------------------
  48. # <learn at level: x>  在职业的技能备注栏里设置,等级可超过99.
  49.  
  50. # -----------------------------------------------------------------------------
  51. # 物品备注栏 - These notetags go in the items notebox in the database.
  52. # -----------------------------------------------------------------------------
  53. # <max limit: x>       设置该物品的可持有上限,比如50.
  54.  
  55. # <price: x>           设置物品的价格,可打破数据库限制的999999。
  56.  
  57. # -----------------------------------------------------------------------------
  58. # 武器备注栏 - These notetags go in the weapons notebox in the database.
  59. # -----------------------------------------------------------------------------
  60. # <max limit: x>       设置该物品的可持有上限,比如50.
  61.  
  62. # <price: x>           设置物品的价格,可打破数据库限制的999999。
  63.  
  64. # <stat: +x>           设置武器的能力值变化量,例:<ATK: +500>
  65. # <stat: -x>
  66.  
  67. # -----------------------------------------------------------------------------
  68. # 防具备注栏 - These notetags go in the armours notebox in the database.
  69. # -----------------------------------------------------------------------------
  70. # <max limit: x>       同上
  71. #
  72. # <price: x>
  73.  
  74. # <stat: +x>
  75. # <stat: -x>
  76. #
  77. # -----------------------------------------------------------------------------
  78. # 敌人备注栏 - These notetags go in the enemy notebox in the database.
  79. # -----------------------------------------------------------------------------
  80. # <stat: x>            设置敌人属性值,可破限。例:<EXP: 6666666>
  81. # MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK, EXP, GOLD
  82.  
  83. # -----------------------------------------------------------------------------
  84. # 脚本呼出语句 - These commands are used with script calls.
  85. # -----------------------------------------------------------------------------
  86. # gain_gold(x)         设置增减金币,可破限。
  87. # lose_gold(x)
  88. #
  89. # gain_item(x, y)      设置增减X物品Y数目,可破限。
  90. # lose_item(x, y)
  91. # gain_weapon(x, y)
  92. # lose_weapon(x, y)
  93. # gain_armour(x, y)
  94. # lose_armour(x, y)
  95.  
  96. #==============================================================================
  97. # ▼ Compatibility
  98. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  99. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  100. # it will run with RPG Maker VX without adjusting.
  101. #
  102. #==============================================================================
  103.  
  104. module YEA
  105.   module LIMIT
  106.  
  107.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  108.     # - Gold Settings -
  109.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  110.     # Adjust gold settings here. You can change the maximum amount of gold to
  111.     # whatever you want. In addition to that, you can also adjust whether or
  112.     # not you wish for your gold display to show an icon instead, (and change
  113.     # the font size if needed). If there's too much gold that's to be displayed
  114.     # then you can change the text shown in place of that.
  115.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  116.     GOLD_MAX  = 999999999999999  # Maximum gold.
  117.     GOLD_ICON = 361              # Icon used for gold. Use 0 for text currency.
  118.     GOLD_FONT = 20               # Font size used to display gold.
  119.     TOO_MUCH_GOLD = "A lotta gold!"   # Text used when gold cannot fit.
  120.  
  121.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  122.     # - Item Settings -
  123.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  124.     # Adjust item settings here. You can change the maximum number of items
  125.     # held from 99 to whatever you want. In addition to that, change the prefix
  126.     # used for items when shown in the item display menu (and the font size if
  127.     # needed). Items can have individual maximums through usage of the
  128.     # <max limit: x> notetag.
  129.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  130.     ITEM_MAX  = 9999999  # The default maximum number of items held each.
  131.     ITEM_FONT = 20       # Font size used to display item quantity.
  132.     SHOP_FONT = 20       # Font size used for shop item costs.
  133.     ITEM_PREFIX = "×%s" # Prefix used for item quantity in item lists.
  134.  
  135.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  136.     # - Parameter Settings -
  137.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  138.     # Adjust the limits for each of the various stats (for MaxHP, MaxMP, ATK,
  139.     # DEF, MAT, and more). Adjust them as you see fit.
  140.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  141.     LEVEL_MAX = 9999 # Sets max level to x for those with 99 level limit.
  142.     MAXHP_MAX = 9999999 # Sets MaxHP to something higher than 9999.
  143.     MAXMP_MAX = 9999999 # Sets MaxMP to something higher than 9999.
  144.     PARAM_MAX = 9999999 # Sets stat max for something higher than 999.
  145.     EQUIP_FONT = 20     # Changes the default equip window font size.
  146.  
  147.   end # LIMIT
  148. end # YEA
  149.  
  150. #==============================================================================
  151. # ▼ Editting anything past this point may potentially result in causing
  152. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  153. # halitosis so edit at your own risk.
  154. #==============================================================================
  155.  
  156. module YEA
  157.   module REGEXP
  158.   module ACTOR
  159.  
  160.     MAX_LEVEL = /<(?:MAX_LEVEL|max level):[ ](\d+)>/i
  161.     INI_LEVEL = /<(?:INITIAL_LEVEL|initial level):[ ](\d+)>/i
  162.  
  163.   end # ACTOR
  164.   module CLASS
  165.  
  166.     LEARN_AT_LV = /<(?:LEARN_AT_LEVEL|learn at level):[ ](\d+)>/i
  167.  
  168.   end # CLASS
  169.   module BASEITEM
  170.  
  171.     PRICE     = /<(?:GOLD|price|COST):[ ](\d+)>/i
  172.     MAX_LIMIT = /<(?:MAX_LIMIT|max limit):[ ](\d+)>/i
  173.     STAT_SET  = /<(.*):[ ]*([\+\-]\d+)>/i
  174.  
  175.   end # BASEITEM
  176.   module ENEMY
  177.  
  178.     STAT_SET  = /<(.*):[ ]*(\d+)>/i
  179.  
  180.   end # ENEMY
  181.   end # REGEXP
  182. end # YEA
  183.  
  184. #==============================================================================
  185. # ■ Icon
  186. #==============================================================================
  187.  
  188. module Icon
  189.  
  190.   #--------------------------------------------------------------------------
  191.   # self.gold
  192.   #--------------------------------------------------------------------------
  193.   def self.gold; return YEA::LIMIT::GOLD_ICON; end
  194.  
  195. end # Icon
  196.  
  197. #==============================================================================
  198. # ■ Numeric
  199. #==============================================================================
  200.  
  201. class Numeric
  202.  
  203.   #--------------------------------------------------------------------------
  204.   # new method: group_digits
  205.   #--------------------------------------------------------------------------
  206.   unless $imported["YEA-CoreEngine"]
  207.   def group; return self.to_s; end
  208.   end # $imported["YEA-CoreEngine"]
  209.  
  210. end # Numeric
  211.  
  212. #==============================================================================
  213. # ■ DataManager
  214. #==============================================================================
  215.  
  216. module DataManager
  217.  
  218.   #--------------------------------------------------------------------------
  219.   # alias method: load_database
  220.   #--------------------------------------------------------------------------
  221.   class <<self; alias load_database_al load_database; end
  222.   def self.load_database
  223.     load_database_al
  224.     load_notetags_al
  225.   end
  226.  
  227.   #--------------------------------------------------------------------------
  228.   # new method: load_notetags_al
  229.   #--------------------------------------------------------------------------
  230.   def self.load_notetags_al
  231.     groups = [$data_actors, $data_items, $data_weapons, $data_armors,
  232.       $data_enemies, $data_classes]
  233.     for group in groups
  234.       for obj in group
  235.         next if obj.nil?
  236.         obj.load_notetags_al
  237.       end
  238.     end
  239.   end
  240.   
  241. end # DataManager
  242.  
  243. #==============================================================================
  244. # ■ RPG::Actor
  245. #==============================================================================
  246.  
  247. class RPG::Actor < RPG::BaseItem
  248.  
  249.   #--------------------------------------------------------------------------
  250.   # common cache: load_notetags_al
  251.   #--------------------------------------------------------------------------
  252.   def load_notetags_al
  253.     @max_level = YEA::LIMIT::LEVEL_MAX if @max_level == 99
  254.     #---
  255.     self.note.split(/[\r\n]+/).each { |line|
  256.       case line
  257.       #---
  258.       when YEA::REGEXP::ACTOR::MAX_LEVEL
  259.         @max_level = [[$1.to_i, 1].max, YEA::LIMIT::LEVEL_MAX].min
  260.         @ini_level = [@ini_level, @max_level].min
  261.       when YEA::REGEXP::ACTOR::INI_LEVEL
  262.         @ini_level = [[$1.to_i, 1].max, @max_level].min
  263.       #---
  264.       end
  265.     } # self.note.split
  266.     #---
  267.   end
  268.  
  269. end # RPG::Actor
  270.  
  271. #==============================================================================
  272. # ■ RPG::Class
  273. #==============================================================================
  274.  
  275. class RPG::Class < RPG::BaseItem
  276.  
  277.   #--------------------------------------------------------------------------
  278.   # new method: above_lv99_params
  279.   #--------------------------------------------------------------------------
  280.   def above_lv99_params(param_id, level)
  281.     return @params[param_id, level] if level <= 99
  282.     n = @params[param_id, 99]
  283.     multiplier = [level - 99, 1].max
  284.     change = (@params[param_id, 99] - @params[param_id, 98]) + 1
  285.     n += change * multiplier
  286.     return n
  287.   end
  288.  
  289.   #--------------------------------------------------------------------------
  290.   # new method: load_notetags_al
  291.   #--------------------------------------------------------------------------
  292.   def load_notetags_al
  293.     for item in @learnings; item.load_notetags_al; end
  294.   end
  295.   
  296. end # RPG::Class
  297.  
  298. #==============================================================================
  299. # ■ RPG::Class::Learning
  300. #==============================================================================
  301.  
  302. class RPG::Class::Learning
  303.  
  304.   #--------------------------------------------------------------------------
  305.   # common cache: load_notetags_al
  306.   #--------------------------------------------------------------------------
  307.   def load_notetags_al
  308.     #---
  309.     self.note.split(/[\r\n]+/).each { |line|
  310.       case line
  311.       #---
  312.       when YEA::REGEXP::CLASS::LEARN_AT_LV
  313.         @level = [[$1.to_i, 1].max, YEA::LIMIT::LEVEL_MAX].min
  314.       #---
  315.       end
  316.     } # self.note.split
  317.     #---
  318.   end
  319.  
  320. end # RPG::Class::Learning
  321.  
  322. #==============================================================================
  323. # ■ RPG::BaseItem
  324. #==============================================================================
  325.  
  326. class RPG::BaseItem
  327.  
  328.   #--------------------------------------------------------------------------
  329.   # public instance variables
  330.   #--------------------------------------------------------------------------
  331.   attr_accessor :max_limit
  332.  
  333.   #--------------------------------------------------------------------------
  334.   # common cache: load_notetags_al
  335.   #--------------------------------------------------------------------------
  336.   def load_notetags_al
  337.     @max_limit = YEA::LIMIT::ITEM_MAX
  338.     #---
  339.     self.note.split(/[\r\n]+/).each { |line|
  340.       case line
  341.       #---
  342.       when YEA::REGEXP::BASEITEM::PRICE
  343.         @price = [$1.to_i, YEA::LIMIT::GOLD_MAX].min
  344.       when YEA::REGEXP::BASEITEM::MAX_LIMIT
  345.         @max_limit = [$1.to_i, 1].max
  346.       when YEA::REGEXP::BASEITEM::STAT_SET
  347.         case $1.upcase
  348.         when "HP", "MAXHP", "MHP"
  349.           @params[0] = $2.to_i
  350.         when "MP", "MAXMP", "MMP", "SP", "MAXSP", "MSP"
  351.           @params[1] = $2.to_i
  352.         when "ATK"
  353.           @params[2] = $2.to_i
  354.         when "DEF"
  355.           @params[3] = $2.to_i
  356.         when "MAT", "INT", "SPI"
  357.           @params[4] = $2.to_i
  358.         when "MDF", "RES"
  359.           @params[5] = $2.to_i
  360.         when "AGI", "SPD"
  361.           @params[6] = $2.to_i
  362.         when "LUK", "LUCK"
  363.           @params[7] = $2.to_i
  364.         end
  365.       #---
  366.       end
  367.     } # self.note.split
  368.     #---
  369.   end
  370.  
  371.   #--------------------------------------------------------------------------
  372.   # new method: max_limit
  373.   #--------------------------------------------------------------------------
  374.   def max_limit; return @max_limit; end
  375.  
  376. end # RPG::BaseItem
  377.  
  378. #==============================================================================
  379. # ■ RPG::Enemy
  380. #==============================================================================
  381.  
  382. class RPG::Enemy < RPG::BaseItem
  383.  
  384.   #--------------------------------------------------------------------------
  385.   # common cache: load_notetags_al
  386.   #--------------------------------------------------------------------------
  387.   def load_notetags_al
  388.     #---
  389.     self.note.split(/[\r\n]+/).each { |line|
  390.       case line
  391.       #---
  392.       when YEA::REGEXP::ENEMY::STAT_SET
  393.         case $1.upcase
  394.         when "HP", "MAXHP", "MHP"
  395.           @params[0] = $2.to_i
  396.         when "MP", "MAXMP", "MMP", "SP", "MAXSP", "MSP"
  397.           @params[1] = $2.to_i
  398.         when "ATK"
  399.           @params[2] = $2.to_i
  400.         when "DEF"
  401.           @params[3] = $2.to_i
  402.         when "MAT", "INT", "SPI"
  403.           @params[4] = $2.to_i
  404.         when "MDF", "RES"
  405.           @params[5] = $2.to_i
  406.         when "AGI", "SPD"
  407.           @params[6] = $2.to_i
  408.         when "LUK", "LUCK"
  409.           @params[7] = $2.to_i
  410.         when "EXP", "XP"
  411.           @exp = $2.to_i
  412.         when "GOLD", "GP"
  413.           @gold = $2.to_i
  414.         end
  415.       #---
  416.       end
  417.     } # self.note.split
  418.     #---
  419.   end
  420.  
  421. end # RPG::Enemy
  422.  
  423. #==============================================================================
  424. # ■ Game_BattlerBase
  425. #==============================================================================
  426.  
  427. class Game_BattlerBase
  428.  
  429.   #--------------------------------------------------------------------------
  430.   # overwrite method: param_max
  431.   #--------------------------------------------------------------------------
  432.   def param_max(param_id)
  433.     return YEA::LIMIT::MAXHP_MAX if param_id == 0
  434.     return YEA::LIMIT::MAXMP_MAX if param_id == 1
  435.     return YEA::LIMIT::PARAM_MAX
  436.   end
  437.  
  438. end # Game_BattlerBase
  439.  
  440. #==============================================================================
  441. # ■ Game_Actor
  442. #==============================================================================
  443.  
  444. class Game_Actor < Game_Battler
  445.  
  446.   #--------------------------------------------------------------------------
  447.   # overwrite method: param_max
  448.   #--------------------------------------------------------------------------
  449.   def param_max(param_id)
  450.     return super
  451.   end
  452.  
  453.   #--------------------------------------------------------------------------
  454.   # overwrite method: param_base
  455.   #--------------------------------------------------------------------------
  456.   def param_base(param_id)
  457.     return self.class.params[param_id, @level] if @level <= 99
  458.     return self.class.above_lv99_params(param_id, @level)
  459.   end
  460.  
  461.   #--------------------------------------------------------------------------
  462.   # new method: check_levels
  463.   #--------------------------------------------------------------------------
  464.   def check_levels
  465.     last_level = @level
  466.     @level = [[@level, max_level].min, 1].max
  467.     return if @level == last_level
  468.     change_exp(exp_for_level(@level), false)
  469.   end
  470.  
  471. end # Game_Actor
  472.  
  473. #==============================================================================
  474. # ■ Game_Party
  475. #==============================================================================
  476.  
  477. class Game_Party < Game_Unit
  478.  
  479.   #--------------------------------------------------------------------------
  480.   # overwrite method: max_gold
  481.   #--------------------------------------------------------------------------
  482.   def max_gold; return YEA::LIMIT::GOLD_MAX; end
  483.  
  484.   #--------------------------------------------------------------------------
  485.   # overwrite method: max_item_number
  486.   #--------------------------------------------------------------------------
  487.   def max_item_number(item); return item.max_limit; end
  488.  
  489. end # Game_Party
  490.  
  491. #==============================================================================
  492. # ■ Game_Interpreter
  493. #==============================================================================
  494.  
  495. class Game_Interpreter
  496.  
  497.   #--------------------------------------------------------------------------
  498.   # new method: gain_gold
  499.   #--------------------------------------------------------------------------
  500.   def gain_gold(value); $game_party.gain_gold(value); end
  501.  
  502.   #--------------------------------------------------------------------------
  503.   # new method: lose_gold
  504.   #--------------------------------------------------------------------------
  505.   def lose_gold(value); $game_party.lose_gold(value); end
  506.  
  507.   #--------------------------------------------------------------------------
  508.   # new method: gain_item
  509.   #--------------------------------------------------------------------------
  510.   def gain_item(id, amount)
  511.     return if $data_items[id].nil?
  512.     $game_party.gain_item($data_items[id], amount)
  513.   end
  514.  
  515.   #--------------------------------------------------------------------------
  516.   # new method: lose_item
  517.   #--------------------------------------------------------------------------
  518.   def lose_item(id, amount)
  519.     return if $data_items[id].nil?
  520.     $game_party.lose_item($data_items[id], amount)
  521.   end
  522.  
  523.   #--------------------------------------------------------------------------
  524.   # new method: gain_weapon
  525.   #--------------------------------------------------------------------------
  526.   def gain_weapon(id, amount)
  527.     return if $data_weapons[id].nil?
  528.     $game_party.gain_item($data_weapons[id], amount)
  529.   end
  530.  
  531.   #--------------------------------------------------------------------------
  532.   # new method: lose_weapon
  533.   #--------------------------------------------------------------------------
  534.   def lose_weapon(id, amount)
  535.     return if $data_weapons[id].nil?
  536.     $game_party.lose_item($data_weapons[id], amount)
  537.   end
  538.  
  539.   #--------------------------------------------------------------------------
  540.   # new method: gain_armour
  541.   #--------------------------------------------------------------------------
  542.   def gain_armour(id, amount)
  543.     return if $data_armors[id].nil?
  544.     $game_party.gain_item($data_armors[id], amount)
  545.   end
  546.  
  547.   #--------------------------------------------------------------------------
  548.   # new method: lose_armour
  549.   #--------------------------------------------------------------------------
  550.   def lose_armour(id, amount)
  551.     return if $data_armors[id].nil?
  552.     $game_party.lose_item($data_armors[id], amount)
  553.   end
  554.  
  555.   #--------------------------------------------------------------------------
  556.   # new method: gain_armor
  557.   #--------------------------------------------------------------------------
  558.   def gain_armor(id, amount)
  559.     return if $data_armors[id].nil?
  560.     $game_party.gain_item($data_armors[id], amount)
  561.   end
  562.  
  563.   #--------------------------------------------------------------------------
  564.   # new method: lose_armor
  565.   #--------------------------------------------------------------------------
  566.   def lose_armor(id, amount)
  567.     return if $data_armors[id].nil?
  568.     $game_party.lose_item($data_armors[id], amount)
  569.   end
  570.  
  571. end # Game_Interpreter
  572.  
  573. #==============================================================================
  574. # ■ Window_Base
  575. #==============================================================================
  576.  
  577. class Window_Base < Window
  578.  
  579.   #--------------------------------------------------------------------------
  580.   # overwrite method: draw_actor_level
  581.   #--------------------------------------------------------------------------
  582.   def draw_actor_level(actor, dx, dy)
  583.     dw = text_size(Vocab::level_a + YEA::LIMIT::LEVEL_MAX.to_s).width
  584.     change_color(system_color)
  585.     draw_text(dx, dy, dw, line_height, Vocab::level_a)
  586.     change_color(normal_color)
  587.     cx = text_size(Vocab::level_a).width
  588.     draw_text(dx + cx, dy, dw, line_height, actor.level.group, 2)
  589.   end
  590.  
  591.   #--------------------------------------------------------------------------
  592.   # overwrite method: draw_actor_param
  593.   #--------------------------------------------------------------------------
  594.   def draw_actor_param(actor, dx, dy, param_id)
  595.     change_color(system_color)
  596.     draw_text(dx, dy, 120, line_height, Vocab::param(param_id))
  597.     change_color(normal_color)
  598.     draw_text(dx, dy, 156, line_height, actor.param(param_id).group, 2)
  599.   end
  600.  
  601.   #--------------------------------------------------------------------------
  602.   # draw_currency_value
  603.   #--------------------------------------------------------------------------
  604.   def draw_currency_value(value, unit, dx, dy, dw)
  605.     contents.font.size = YEA::LIMIT::GOLD_FONT
  606.     cx = gold_icon?(unit) ? 24 : text_size(unit).width
  607.     change_color(normal_color)
  608.     text = value.group
  609.     text = YEA::LIMIT::TOO_MUCH_GOLD if contents.text_size(text).width > dw-cx
  610.     draw_text(dx, dy, dw - cx - 2, line_height, text, 2)
  611.     change_color(system_color)
  612.     draw_icon(Icon.gold, dx+dw-24, dy) if gold_icon?(unit)
  613.     draw_text(dx, dy, dw, line_height, unit, 2) unless gold_icon?(unit)
  614.     reset_font_settings
  615.   end
  616.  
  617.   #--------------------------------------------------------------------------
  618.   # new method: gold_icon?
  619.   #--------------------------------------------------------------------------
  620.   def gold_icon?(unit)
  621.     return false if unit != Vocab.currency_unit
  622.     return YEA::LIMIT::GOLD_ICON > 0
  623.   end
  624.  
  625. end # Window_Base
  626.  
  627. #==============================================================================
  628. # ■ Window_ItemList
  629. #==============================================================================
  630.  
  631. class Window_ItemList < Window_Selectable
  632.  
  633.   #--------------------------------------------------------------------------
  634.   # overwrite method: draw_item_number
  635.   #--------------------------------------------------------------------------
  636.   def draw_item_number(rect, item)
  637.     contents.font.size = YEA::LIMIT::ITEM_FONT
  638.     quantity = $game_party.item_number(item).group
  639.     text = sprintf(YEA::LIMIT::ITEM_PREFIX, quantity)
  640.     draw_text(rect, text, 2)
  641.     reset_font_settings
  642.   end
  643.  
  644. end # Window_ItemList
  645.  
  646. #==============================================================================
  647. # ■ Window_EquipStatus
  648. #==============================================================================
  649.  
  650. class Window_EquipStatus < Window_Base
  651.  
  652.   #--------------------------------------------------------------------------
  653.   # overwrite method: draw_item
  654.   #--------------------------------------------------------------------------
  655.   def draw_item(dx, dy, param_id)
  656.     draw_param_name(dx + 4, dy, param_id)
  657.     draw_current_param(dx + 64, dy, param_id) if @actor
  658.     draw_right_arrow(dx + 110, dy)
  659.     draw_new_param(dx + 132, dy, param_id) if @temp_actor
  660.     reset_font_settings
  661.   end
  662.  
  663.   #--------------------------------------------------------------------------
  664.   # overwrite method: draw_param_name
  665.   #--------------------------------------------------------------------------
  666.   def draw_param_name(dx, dy, param_id)
  667.     contents.font.size = YEA::LIMIT::EQUIP_FONT
  668.     change_color(system_color)
  669.     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  670.   end
  671.  
  672.   #--------------------------------------------------------------------------
  673.   # overwrite method: draw_current_param
  674.   #--------------------------------------------------------------------------
  675.   def draw_current_param(dx, dy, param_id)
  676.     change_color(normal_color)
  677.     draw_text(0, dy, dx+48, line_height, @actor.param(param_id).group, 2)
  678.     reset_font_settings
  679.   end
  680.  
  681.   #--------------------------------------------------------------------------
  682.   # overwrite method: draw_new_param
  683.   #--------------------------------------------------------------------------
  684.   def draw_new_param(dx, dy, param_id)
  685.     contents.font.size = YEA::LIMIT::EQUIP_FONT
  686.     new_value = @temp_actor.param(param_id)
  687.     change_color(param_change_color(new_value - @actor.param(param_id)))
  688.     draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
  689.     reset_font_settings
  690.   end
  691.  
  692. end # Window_EquipStatus
  693.  
  694. #==============================================================================
  695. # ■ Window_ShopBuy
  696. #==============================================================================
  697.  
  698. class Window_ShopBuy < Window_Selectable
  699.  
  700.   #--------------------------------------------------------------------------
  701.   # overwrite method: draw_item
  702.   #--------------------------------------------------------------------------
  703.   def draw_item(index)
  704.     item = @data[index]
  705.     rect = item_rect(index)
  706.     draw_item_name(item, rect.x, rect.y, enable?(item))
  707.     rect.width -= 4
  708.     contents.font.size = YEA::LIMIT::SHOP_FONT
  709.     draw_text(rect, price(item).group, 2)
  710.     reset_font_settings
  711.   end
  712.  
  713. end # Window_ShopBuy
  714.  
  715. #==============================================================================
  716. # ■ Scene_Load
  717. #==============================================================================
  718.  
  719. class Scene_Load < Scene_File
  720.  
  721.   #--------------------------------------------------------------------------
  722.   # alias method: on_load_success
  723.   #--------------------------------------------------------------------------
  724.   alias on_load_success_al on_load_success
  725.   def on_load_success
  726.     on_load_success_al
  727.     perform_level_check
  728.   end
  729.  
  730.   #--------------------------------------------------------------------------
  731.   # new method: perform_level_check
  732.   #--------------------------------------------------------------------------
  733.   def perform_level_check
  734.     for i in 1..$data_actors.size
  735.       next if $game_actors[i].nil?
  736.       $game_actors[i].check_levels
  737.     end
  738.   end
  739.   
  740. end # Scene_Load
  741.  
  742. #==============================================================================
  743. #
  744. # ▼ End of File
  745. #
  746. #==============================================================================

这个破限脚本应该很全面了吧~

点评

我正要搬答案,没想到你已经早一步搬过来了  发表于 2012-3-9 11:32
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
95
在线时间
211 小时
注册时间
2011-8-16
帖子
300
4
 楼主| 发表于 2012-3-8 20:43:26 | 只看该作者
xuzhengchi 发表于 2012-3-8 20:39
#==============================================================================
#
# ▼ Yanfly Engin ...

谢谢!谢谢!谢谢!谢谢!谢谢!谢谢!(十个字符- -!哈哈 好高兴!!)
RPGMaker 脚本/学习交流群:143356012
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
723
在线时间
530 小时
注册时间
2010-6-9
帖子
840
5
发表于 2012-3-9 11:17:27 | 只看该作者
这些脚本为什么我复制出来都是作1行而已...就是全部代码写在一行里了,都变成注释了。

点评

原来是这样复制啊...我的错,麻烦你了  发表于 2012-3-13 02:33
也许是因为你是直接复制,而不是用代码框自带的复制功能吧?  发表于 2012-3-9 12:07
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
212 小时
注册时间
2012-3-5
帖子
228
6
发表于 2012-3-9 22:16:46 | 只看该作者
奇怪~我复制的每个脚本代码用到RMVA里都是跳出哪行哪行错误!残念啊~

点评

安慰一下,话说你确定不是直接用鼠标选定复制的?  发表于 2012-3-9 22:20
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
141 小时
注册时间
2011-8-29
帖子
47
7
发表于 2012-12-17 17:40:57 | 只看该作者
好贴啊! 为什么人这么少?
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-4 12:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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