赞 | 40 |
VIP | 559 |
好人卡 | 234 |
积分 | 47 |
经验 | 251834 |
最后登录 | 2025-1-5 |
在线时间 | 5242 小时 |
Lv3.寻梦者 (版主) 八宝粥的基叔
- 梦石
- 0
- 星屑
- 4719
- 在线时间
- 5242 小时
- 注册时间
- 2009-4-29
- 帖子
- 14318
|
本帖最后由 protosssonny 于 2011-10-7 12:19 编辑
买卖物品金钱上限是被价格输入框限制在999999以内。改不了的。但是办法还是有的。请在Sence_Shop类里找到:- #--------------------------------------------------------------------------
- # ● 确定输入个数
- #--------------------------------------------------------------------------
- def decide_number_input
- Sound.play_shop
- @number_window.active = false
- @number_window.visible = false
- case @command_window.index
- when 0 # 购买
- $game_party.lose_gold(@number_window.number * @item.price)
- $game_party.gain_item(@item, @number_window.number)
- @gold_window.refresh
- @buy_window.refresh
- @status_window.refresh
- @buy_window.active = true
- @buy_window.visible = true
- when 1 # 卖出
- $game_party.gain_gold(@number_window.number * (@item.price / 2))
- $game_party.lose_item(@item, @number_window.number)
- @gold_window.refresh
- @sell_window.refresh
- @status_window.refresh
- @sell_window.active = true
- @sell_window.visible = true
- @status_window.visible = false
- end
- end
复制代码 改成:- #--------------------------------------------------------------------------
- # ● 确定输入个数
- #--------------------------------------------------------------------------
- def decide_number_input
- Sound.play_shop
- @number_window.active = false
- @number_window.visible = false
- case @command_window.index
- when 0 # 购买
- $game_party.lose_gold(@number_window.number * @item.price)
- $game_party.gain_item(@item, @number_window.number)
- @gold_window.refresh
- @buy_window.refresh
- @status_window.refresh
- @buy_window.active = true
- @buy_window.visible = true
- when 1 # 卖出
- if @item.id == 2 and @item.is_a?(RPG::Weapon) #是ID为2的物品并且是一件武器(即2号武器)
- $game_party.gain_gold(@number_window.number * (9999999)) #2号武器贩卖价格是9999999
- else
- $game_party.gain_gold(@number_window.number * (@item.price / 2))
- end
- $game_party.lose_item(@item, @number_window.number)
- @gold_window.refresh
- @sell_window.refresh
- @status_window.refresh
- @sell_window.active = true
- @sell_window.visible = true
- @status_window.visible = false
- end
- end
复制代码 相信很贵的物品不是很多的,假设只有1个就这样改。要是很多的话我在帮你想办法! |
|