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

Project1

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

[已经过期] 大佬们 使用负重脚本之后 获得一个道具游戏变卡了

[复制链接]

Lv1.梦旅人

梦石
0
星屑
40
在线时间
20 小时
注册时间
2019-6-26
帖子
19
跳转到指定楼层
1
发表于 2020-4-9 10:36:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 VIPArcher 于 2022-6-15 09:09 编辑

RUBY 代码复制
  1. #==============================================================================
  2. # +++ VX移植 - VA负重系统改进版 +++
  3. #==============================================================================
  4. # VX版 原作者 By 雪流星
  5. # 蓝本 杂兵天下的VA移植版
  6. # 改进 By:VIPArcher
  7. #  -- 本脚本来自 [url]https://rpg.blue[/url] 使用或转载请保留以上信息。
  8. # 二次小改 By:小茶司令(爱呗茶)2020.4.3
  9. #==============================================================================
  10. # 就是在物品画面的右上角放了一个显示负重的窗口
  11. # 更新了代码,取消的原来的计算每个队员的负重然后累加的模式 2014-12-10
  12. # 增加了商店界面的负重显示     2014-9-3
  13. #==============================================================================
  14. #
  15. # 物品备注<load N> 则该物品占用 N 点负重
  16. # load也可以写成「负重」或「負重」#注:没有“「」”不写的话默认为 Default_Load
  17. # 更改当前负重 current_load(x[,assign])
  18. # 其中 x 为数值可以为负数,assign 为 true 时当前负重直接赋值为x(可省略)
  19. # 例如:current_load(10,true) 当前负重直接赋值为10
  20. # 默认给物品增加一行说明.说明内容是物品的重量.
  21. # 但默认帮助窗口一共只能显示2行内容.
  22. # 因此你在数据库设置武器、护甲说明的时候.
  23. # 如果设置了2行内容.那么这新增加的第3行将无法显示出来.
  24. # 特别地,如果你使用了我的【技能物品说明增强】脚本,请将其置于该脚本以上的位置
  25. # 2020.4.3 增加内容:
  26. # 1.每名角色的独立装备负重
  27. # 2.队伍中若有一名以上角色装备负重超过上限则进行超重处理
  28. # 3.装备超重提示
  29. # 4.添加若干常量设置
  30. #==============================================================================
  31. $VIPArcherScript ||= {};$VIPArcherScript[:load] = 20140919
  32. #==============================================================================
  33. # ★ 设定部分 ★
  34. #==============================================================================
  35. module  VIPArcher end
  36. module  VIPArcher::Load
  37.   Default_Load = 1    #物品的默认负重
  38.   Default_Equip = 40  #每名角色默认装备重量上限 ###########################
  39. #若不想使用默认负重则需数据库角色备注里添加文本 例: <负重 50>
  40.  
  41.   Width = 150         #负重信息窗口宽度
  42.  
  43.   Load_Name = "负重:" #负重前显示的文字
  44.  
  45.   Load_Var = 0        #作为队伍负重上限的变量ID,为0禁用变量作为负重上限,变成
  46.                       #累计每个角色的负重能力来计算负重上限
  47.  
  48.   EQUIPSWLOAD  = true     #true 使用 / false 不使用
  49.   # 用于是否显示装备栏的负重信息#####################
  50.  
  51.   $equip_map = true   #装备负重提示开关
  52.  
  53.   Load_Eval = "((mhp + mmp) * @level / agi) * [hp_rate,0.5].max"
  54.   # 每个角色的负重计算公式(eval)
  55.  
  56.   Stop_SW = false       #true 使用 / false 不使用
  57.   # 事件中调用增减道具/武器/防具时,如果会导致超过负重上限,是否执行中断事件处理
  58.   # 推荐不使用,因为新加的功能就有一个是当超过负重时限制角色移动,开启这个
  59.   # 的话这个限制移动就无效了的说·3·
  60.  
  61.   Movable =  false       #true 使用 / false 不使用
  62.   # 满负重时降低移动速度(不使用时禁止移动连事件都无法启动,只能丢弃/使用物品)
  63.  
  64.  
  65.   Move_Speed = 2 # 满负重时的移动速度
  66.  
  67.   # 负重超过上限时的提示内容
  68.   Message = "\\i[4]负重超过可承受的范围,\n移动将变得\\c[10]十分艰难!\\c[0]
  69. 丢些没用的东西掉吧。"
  70.  
  71.   # 装备负重超过上限时的提示内容
  72.   Message2 = "\\i[4]检测到队伍中至少有一名角色装备负重\n\\c[10]超过可承受范围\\c[0],队伍行动将变得\\c[10]十分艰难!\\c[0]
  73. 必要时请及时更换更轻便的装备哦。"
  74.  
  75.   # 装备负重信息默认显示位置
  76.   Messset = 1  #0 上 / 1 中 / 2 下
  77.  
  78.   # 按X键(A键)是否可以丢弃道具
  79.   # 如果你另外使用了丢弃道具的脚本请关闭
  80.   Lose_SW = false       #true 使用 / false 不使用
  81.  
  82.   # 是否在帮助窗口内自动添加负重信息
  83.   Help_SW = false       #true 使用 / false 不使用
  84.  
  85.   # 装备在身上的装备是否算入负重
  86.   Equip_SW = true      #true 计算 / false 不计算
  87.   #         "★★★★★★ 注意 ★★★★★★"
  88.   # 如果你的角色初始装备有占负重并且开启上面的功能,那么你必须
  89.   # 在游戏一开始时为当前负重赋值(自己算到底有多少负重·3·)
  90.   # 当有新队员加入队伍并且也带有负重的装备那么你也需要为当前负重加上对应的重量,
  91.   # 例如:事件脚本运行 current_load(10) 就是加上10的当前负重
  92. end
  93. #==============================================================================
  94. # ☆ 装备负重 ☆#######################
  95. #==============================================================================
  96. class Game_Actor
  97.   include VIPArcher::Load
  98.   attr_accessor :equip_weight      #已装备物品重量
  99.   attr_accessor :equip_weightmax   #最大负重
  100.   alias setup_plus setup
  101.   alias refresh_plus refresh
  102.   alias change_equip_plus change_equip
  103.   #--------------------------------------------------------------------------
  104.   # ● 设置
  105.   #--------------------------------------------------------------------------
  106.   def setup(actor_id)
  107.     setup_plus(actor_id)
  108.     @equip_weight = equips.compact.inject(0) {|r, item| r += item.load }
  109.     @equip_weightmax = loadmax
  110.   end  
  111.   #--------------------------------------------------------------------------
  112.   # ● 获取队伍角色最大负重
  113.   #--------------------------------------------------------------------------
  114.    def loadmax
  115.     return $1.to_i if $data_actors[id].note =~ /<(?:load|负重|負重)\s*(\d+)>/i
  116.     return Default_Equip
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 更换装备
  120.   #     slot_id : 装备栏 ID
  121.   #     item    : 武器/护甲(为 nil 时装备解除)
  122.   #--------------------------------------------------------------------------
  123.   def change_equip(slot_id, item)
  124.   change_equip_plus(slot_id, item)
  125.   $equip_map = true  
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● 刷新
  129.   #--------------------------------------------------------------------------
  130.   def refresh
  131.    if @equip_weight != equips.compact.inject(0) {|r, item| r += item.load }
  132.     @equip_weight = equips.compact.inject(0) {|r, item| r += item.load }
  133.    end
  134.    refresh_plus
  135.   end
  136. end
  137. #==============================================================================
  138. #  ☆ 装备超重提示 ☆#######################
  139. #==============================================================================
  140. class Scene_Map < Scene_Base
  141. include  VIPArcher::Load
  142. alias start_plus start
  143. def start
  144.    start_plus
  145.    equiptips
  146. end  
  147.   #--------------------------------------------------------------------------
  148.   # ● 装备超重提示
  149.   #--------------------------------------------------------------------------
  150.   def equiptips
  151.       if $equip_map
  152.      for i in 1..$data_system.party_members.clone.size
  153.    if $game_actors[i].equip_weight > $game_actors[i].equip_weightmax
  154.       $game_message.position = Messset
  155.       $equip_map = false
  156.      return $game_message.texts.push("#{Message2}")
  157.     end
  158.    end
  159.   end
  160. end
  161. end   
  162. #==============================================================================
  163. #  ☆ 能力窗口 ☆#######################
  164. #==============================================================================
  165. class Window_EquipStatus
  166.   include VIPArcher::Load #继承了该模块
  167.   alias refresh_plus refresh
  168.   #--------------------------------------------------------------------------
  169.   # ● 刷新
  170.   #--------------------------------------------------------------------------
  171.   def refresh
  172.   refresh_plus
  173.   if EQUIPSWLOAD
  174.   contents.font.size = 16 ;contents.font.color = text_color(21)
  175. if @actor !=nil
  176.   x=80
  177.    contents.draw_text(x,0,100,16,"负重:")
  178.    if @actor.equip_weight > @actor.equip_weightmax
  179.    contents.font.color = text_color(10)
  180.    contents.draw_text(x-30,20,100,16,"超重!")
  181.    end
  182.   contents.font.color = text_color(0)
  183.   contents.draw_text(x+50,0,100,16,"#{@actor.equip_weight}/#{@actor.equip_weightmax}")
  184. end  
  185.   contents.font.size = 21
  186.   end
  187. end
  188. end  
  189. #==============================================================================
  190. # ☆ 设定结束 ☆
  191. #==============================================================================
  192. class RPG::BaseItem
  193.   include VIPArcher::Load #继承了该模块
  194.   #--------------------------------------------------------------------------
  195.   # ● 获取道具的重量
  196.   #--------------------------------------------------------------------------
  197.   def load
  198.     return unless self.is_a?(RPG::Item) || self.is_a?(RPG::EquipItem)
  199.     return $1.to_i if @note =~ /<(?:load|负重|負重)\s*(\d+)>/i
  200.     return Default_Load #若备注没有 <负重 (数字)> 则自动替换为该常量
  201.   end
  202.   #--------------------------------------------------------------------------
  203.   # ● 新增负重帮助内容
  204.   #--------------------------------------------------------------------------
  205.   def description
  206.     if Help_SW && load && load != 0
  207.       return @description + "\n\\}重量:#{load}"
  208.     else
  209.       return @description
  210.     end
  211.   end unless $VIPArcherScript[:help_ex]
  212. end
  213. #==============================================================================
  214. #  显示当前负重信息的窗口
  215. #==============================================================================
  216. class Window_Load < Window_Base
  217.   include VIPArcher::Load
  218.   #--------------------------------------------------------------------------
  219.   # ● 初始化对象
  220.   #--------------------------------------------------------------------------
  221.   def initialize
  222.     super(Graphics.width - window_width, 72, window_width, fitting_height(1))
  223.     refresh
  224.   end
  225.   #--------------------------------------------------------------------------
  226.   # ● 获取窗口的宽度
  227.   #--------------------------------------------------------------------------
  228.   def window_width
  229.     Width
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● 刷新
  233.   #--------------------------------------------------------------------------
  234.   def refresh
  235.     contents.clear
  236.     contents.font.size - 4
  237.     draw_text(0, 0, window_width - 64, 24,load_name,0)
  238.     draw_text(0, 0, window_width - 24, 24, weight,2)
  239.     @temp_load = $game_party.current_load
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● 获取当前负重信息
  243.   #--------------------------------------------------------------------------
  244.   def weight
  245.     "#{$game_party.current_load}/#{$game_party.total_load}"
  246.   end
  247.   #--------------------------------------------------------------------------
  248.   # ● 获取负重前显示文字
  249.   #--------------------------------------------------------------------------
  250.   def load_name
  251.     Load_Name
  252.   end
  253.   #--------------------------------------------------------------------------
  254.   # ● 更新画面
  255.   #--------------------------------------------------------------------------
  256.   def update
  257.     super
  258.     refresh if @temp_load != $game_party.current_load
  259.   end
  260. end
  261. #-------------------------------------------------------------------------------
  262. class Window_ItemCategory < Window_HorzCommand
  263.   include VIPArcher::Load
  264.   #--------------------------------------------------------------------------
  265.   # ● 获取窗口的宽度
  266.   #--------------------------------------------------------------------------
  267.   def window_width
  268.     scene_item_is? ? Graphics.width - Width : Graphics.width
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   # ● 获取列数
  272.   #--------------------------------------------------------------------------
  273.   def col_max
  274.     return scene_item_is? ? 3 : 4
  275.   end
  276.   #--------------------------------------------------------------------------
  277.   # ● 判断是否为物品栏场景
  278.   #--------------------------------------------------------------------------
  279.   def scene_item_is?
  280.     return SceneManager.scene_is?(Scene_Item)
  281.   end
  282. end
  283. #==============================================================================
  284. # ■ 物品界面显示负重栏
  285. #==============================================================================
  286. class Scene_Item < Scene_ItemBase
  287.   include VIPArcher::Load
  288.   #--------------------------------------------------------------------------
  289.   # ● 开始处理
  290.   #--------------------------------------------------------------------------
  291.   alias load_start start
  292.   def start
  293.     load_start
  294.     @load_window = Window_Load.new
  295.     @load_window.y = 30
  296.     @load_window.viewport = @viewport
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # ● 结束处理
  300.   #--------------------------------------------------------------------------
  301.   alias load_terminate terminate
  302.   def terminate
  303.     load_terminate
  304.     @load_window.dispose
  305.   end
  306.   #--------------------------------------------------------------------------
  307.   # ● 更新画面
  308.   #--------------------------------------------------------------------------
  309.   alias load_update update
  310.   def update
  311.     #--------------------------------------------------------------------------
  312.     # ★ 按X键(A键)丢弃道具 - 贵重物品无法丢弃 ★修改:VIPArcher
  313.     #--------------------------------------------------------------------------
  314.     if Input.trigger?(Input::X) && Lose_SW
  315.       item = @item_window.item
  316.       if item.is_a?(RPG::Item) && item.key_item?
  317.         Sound.play_buzzer
  318.       else
  319.         Sound.play_cancel
  320.         $game_party.lose_item(item, 1)
  321.         @item_window.refresh
  322.       end unless item == nil
  323.     end
  324.     @load_window.update
  325.     load_update
  326.   end
  327. end
  328. #-------------------------------------------------------------------------------
  329. class Window_ShopNumber < Window_Selectable
  330.   include VIPArcher::Load
  331.   attr_accessor :buy_or_sell                    #买入的标志
  332.   #--------------------------------------------------------------------------
  333.   # ● 刷新
  334.   #--------------------------------------------------------------------------
  335.   alias vip_shopnumber_refresh refresh
  336.   def refresh
  337.     vip_shopnumber_refresh
  338.     draw_current_weight(@item)
  339.   end
  340.   #--------------------------------------------------------------------------
  341.   # ○ 买卖时重量变化的描绘
  342.   #--------------------------------------------------------------------------
  343.   def draw_current_weight(item)
  344.     current = $game_party.current_load
  345.     weight = current + item.load * @number * (@buy_or_sell ? 1 : -1)
  346.     width = contents_width - 8
  347.     cx = text_size(@currency_unit).width
  348.     change_color(system_color)
  349.     draw_text(4, y + 60, width, line_height, "#{Load_Name}")
  350.     change_color(normal_color)
  351.     wt = "#{weight} / #{$game_party.total_load}"
  352.     draw_text(4, y + 60, width, line_height, wt, 2)
  353.   end
  354. end
  355. #-------------------------------------------------------------------------------
  356. class Window_ShopStatus < Window_Base
  357.   include VIPArcher::Load
  358.   #--------------------------------------------------------------------------
  359.   # ● 刷新
  360.   #--------------------------------------------------------------------------
  361.   alias vip_shopstatus_refresh refresh
  362.   def refresh
  363.     vip_shopstatus_refresh
  364.     draw_weight_occupy(4, 24)
  365.   end
  366.   #--------------------------------------------------------------------------
  367.   # ● 绘制持负重信息
  368.   #--------------------------------------------------------------------------
  369.   def draw_weight_occupy(x, y)
  370.     rect = Rect.new(x, y, contents.width - 4 - x, line_height)
  371.     change_color(system_color)
  372.     draw_text(rect, "#{Load_Name}", 3)
  373.     change_color(normal_color)
  374.     weight = "#{$game_party.current_load}/#{$game_party.total_load}"  #重量/MAX重量
  375.     draw_text(rect, weight, 2)
  376.     @temp_load = $game_party.current_load
  377.   end
  378. end
  379. #==============================================================================
  380. # ■ 获取队伍最大负重
  381. #==============================================================================
  382. class Game_Party < Game_Unit
  383.   include VIPArcher::Load
  384.   #--------------------------------------------------------------------------
  385.   # ● 定义实例变量
  386.   #--------------------------------------------------------------------------
  387.   attr_accessor :current_load, :load_trade_item     #负重
  388.   #--------------------------------------------------------------------------
  389.   # ● 初始化对象
  390.   #--------------------------------------------------------------------------
  391.   alias load_initialize initialize
  392.   def initialize
  393.     load_initialize
  394.     total_load
  395.     @current_load = 0
  396.     @total_load = 0
  397.   end
  398.   #--------------------------------------------------------------------------
  399.   # ● 获取队伍最大负重
  400.   #--------------------------------------------------------------------------
  401.   def total_load
  402.     return $game_variables[Load_Var] if Load_Var > 0
  403.     all_members.inject(0) {|total,actor| total + actor.load }
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # ● 判断物品负重是否已满
  407.   #--------------------------------------------------------------------------
  408.   def load_max?
  409.     return false if @current_load == 0
  410.     @current_load >= total_load
  411.   end
  412.   #--------------------------------------------------------------------------
  413.   # ● 获取队伍的总装备重量
  414.   #--------------------------------------------------------------------------
  415. #  def equiptotal
  416. #    load=0
  417. #    for i in 1..$data_system.party_members.clone.size
  418. #    load += $game_actors[i].equip_weight
  419. #    end
  420. #    return load
  421. #  end  
  422.   #--------------------------------------------------------------------------
  423.   # ● 判断装备负重是否已满##################################
  424.   #--------------------------------------------------------------------------
  425.   def eload_max?
  426.    max=0
  427.    for i in 1..$data_system.party_members.clone.size
  428.    max+=1 if $game_actors[i].equip_weight <= $game_actors[i].equip_weightmax
  429.    return false if max == $data_system.party_members.clone.size
  430.    end
  431. end  
  432.   #--------------------------------------------------------------------------
  433.   # ● 增加/减少物品时计算负重
  434.   #--------------------------------------------------------------------------
  435.   alias load_gain_item gain_item
  436.   def gain_item(item, n, include_equip = false)
  437.     return if item.nil?
  438.     load_gain_item(item, n, include_equip)
  439.     @current_load += item.load * n if !@load_trade_item
  440.   end
  441. end
  442. #-------------------------------------------------------------------------------
  443. class Game_Actor < Game_Battler
  444.   include VIPArcher::Load
  445.   #--------------------------------------------------------------------------
  446.   # ● 装备时不计算负重的增减 * 方法覆盖
  447.   #     new_item : 取出的物品
  448.   #     old_item : 放入的物品
  449.   #--------------------------------------------------------------------------
  450.   def trade_item_with_party(new_item, old_item)
  451.     return false if new_item && !$game_party.has_item?(new_item)
  452.     $game_party.load_trade_item = true if Equip_SW == true
  453.     $game_party.gain_item(old_item, 1)
  454.     $game_party.lose_item(new_item, 1)
  455.     $game_party.load_trade_item = false if Equip_SW == true
  456.     return true
  457.   end
  458.   #--------------------------------------------------------------------------
  459.   # ● 获取角色的负重上限
  460.   #--------------------------------------------------------------------------
  461.   def load
  462.     eval(Load_Eval).to_i
  463.   end
  464. end
  465. #==============================================================================
  466. # ■ 增减物品时判断负重
  467. #==============================================================================
  468. class Game_Interpreter
  469.   include VIPArcher::Load
  470.   #--------------------------------------------------------------------------
  471.   # ● 增减道具
  472.   #--------------------------------------------------------------------------
  473.   alias load_command_126 command_126
  474.   def command_126
  475.     n = operate_value(@params[1], @params[2], @params[3])
  476.     return command_115 if check_load(@params[0], 0, n) && Stop_SW
  477.     load_command_126
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● 增減武器
  481.   #--------------------------------------------------------------------------
  482.   alias load_command_127 command_127
  483.   def command_127
  484.     n = operate_value(@params[1], @params[2], @params[3])
  485.     return command_115 if check_load(@params[0], 1, n) && Stop_SW
  486.     load_command_127
  487.   end
  488.   #--------------------------------------------------------------------------
  489.   # ● 增減防具
  490.   #--------------------------------------------------------------------------
  491.   alias load_command_128 command_128
  492.   def command_128
  493.     n = operate_value(@params[1], @params[2], @params[3])
  494.     return command_115 if check_load(@params[0], 2, n) && Stop_SW
  495.     load_command_128
  496.   end
  497.   #--------------------------------------------------------------------------
  498.   # ● 增减物品超重时提示
  499.   #--------------------------------------------------------------------------
  500.   def check_load(item_id, type, n)
  501.     case type
  502.     when 0; item = $data_items[item_id]
  503.     when 1; item = $data_weapons[item_id]
  504.     when 2; item = $data_armors[item_id]
  505.     end
  506.     if (((item.load * n) + $game_party.current_load) > $game_party.total_load)
  507.       $game_message.texts.push("#{Message}") if $game_message.visible != true
  508.       $game_message.visible = true
  509.     end
  510.     return (((item.load * n) + $game_party.current_load) > $game_party.total_load)
  511.   end
  512.   #--------------------------------------------------------------------------
  513.   # ● 更改负重
  514.   #--------------------------------------------------------------------------
  515.   def current_load(current_load,assign = false)
  516.     if assign
  517.       $game_party.current_load = current_load
  518.     else
  519.       $game_party.current_load += current_load
  520.     end
  521.   end
  522. end
  523. #==============================================================================
  524. # ★ 满负重时限制行动 ★
  525. #==============================================================================
  526. class Game_Player < Game_Character
  527.   include VIPArcher::Load
  528.   #--------------------------------------------------------------------------
  529.   # ● 判定是否可以移动###################
  530.   #--------------------------------------------------------------------------
  531.   alias load_movable? movable?
  532.   def movable?
  533.     return false if $game_party.load_max? && !Movable
  534.     return false if $game_party.eload_max? && !Movable ###################
  535.     load_movable?
  536.   end
  537. end
  538. #==============================================================================
  539. # ★ 满负重时降低移动速度 ★
  540. #==============================================================================
  541. class Game_CharacterBase
  542.   include VIPArcher::Load
  543.   #--------------------------------------------------------------------------
  544.   # ● 获取移动速度(判断是否跑步)################
  545.   #--------------------------------------------------------------------------
  546.   alias load_real_move_speed real_move_speed
  547.   def real_move_speed
  548.     return Move_Speed if $game_party.load_max? && Movable
  549.     return Move_Speed if $game_party.eload_max? && Movable ################
  550.     load_real_move_speed
  551.   end
  552. end
  553. #==============================================================================
  554. # ★ 满负重时限制购买 ★
  555. #==============================================================================
  556. class Window_ShopBuy < Window_Selectable
  557.   #--------------------------------------------------------------------------
  558.   # ● 查询商品是否可买
  559.   #--------------------------------------------------------------------------
  560.   alias load_enable? enable?
  561.   def enable?(item)
  562.     load_enable?(item) && !$game_party.load_max?
  563.   end
  564. end
  565. #==============================================================================
  566. # ★ 根据负重设定可购买的物品数量 ★
  567. #==============================================================================
  568. class Scene_Shop < Scene_MenuBase
  569.   #--------------------------------------------------------------------------
  570.   # ● 指令“买入”
  571.   #--------------------------------------------------------------------------
  572.   alias vip_load_command_buy command_buy
  573.   def command_buy
  574.     vip_load_command_buy
  575.     @number_window.buy_or_sell = true
  576.   end
  577.   #--------------------------------------------------------------------------
  578.   # ● 指令“卖出”
  579.   #--------------------------------------------------------------------------
  580.   alias vip_load_command_sell command_sell
  581.   def command_sell
  582.     vip_load_command_sell
  583.     @number_window.buy_or_sell = false
  584.   end
  585.   #--------------------------------------------------------------------------
  586.   # ● 获取可以买入的最大值
  587.   #--------------------------------------------------------------------------
  588.   alias load_max_buy max_buy
  589.   def max_buy
  590.     vip = @item.load == 0 ? load_max_buy : ($game_party.total_load -
  591.     $game_party.current_load) / @item.load
  592.     [load_max_buy,vip].min
  593.   end
  594. end

Lv4.逐梦者

梦石
3
星屑
7095
在线时间
589 小时
注册时间
2019-9-15
帖子
113

R考场第七期金奖

2
发表于 2020-4-10 02:47:18 | 只看该作者
本帖最后由 Cupidk爱呗茶 于 2020-4-10 03:01 编辑

虽说测试空白工程没有发现问题 但是还是先说声抱歉啦【确实技术这方面小茶还需要学习 可能某些地方写法真的不太对
不过LZ有需要的话可以贴出卡顿的工程 小茶会尽量解决的 【因为可能涉及到脚本冲突什么的
********
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-26 18:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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