赞 | 451 |
VIP | 56 |
好人卡 | 75 |
积分 | 424 |
经验 | 124650 |
最后登录 | 2024-11-24 |
在线时间 | 7602 小时 |
Lv5.捕梦者 (管理员) 老黄鸡
- 梦石
- 0
- 星屑
- 42409
- 在线时间
- 7602 小时
- 注册时间
- 2009-7-6
- 帖子
- 13506
|
本帖最后由 fux2 于 2011-1-14 11:37 编辑
回复 虫子 的帖子
150号变量记录,可以修改
范例:
范例.rar
(186.59 KB, 下载次数: 74)
- class Scene_Shop
-
- REMEMBER_COST_ID = 150
-
- def update_number
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- @number_window.active = false
- @number_window.visible = false
- case @command_window.index
- when 0
- @buy_window.active = true
- @buy_window.visible = true
- when 1
- @sell_window.active = true
- @sell_window.visible = true
- @status_window.visible = false
- end
- return
- end
- if Input.trigger?(Input::C)
- $game_system.se_play($data_system.shop_se)
- @number_window.active = false
- @number_window.visible = false
- case @command_window.index
- when 0
- $game_party.lose_gold(@number_window.number * @item.price)
- $game_variables[REMEMBER_COST_ID] += @number_window.number * @item.price
- case @item
- when RPG::Item
- $game_party.gain_item(@item.id, @number_window.number)
- when RPG::Weapon
- $game_party.gain_weapon(@item.id, @number_window.number)
- when RPG::Armor
- $game_party.gain_armor(@item.id, @number_window.number)
- end
- @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))
- case @item
- when RPG::Item
- $game_party.lose_item(@item.id, @number_window.number)
- when RPG::Weapon
- $game_party.lose_weapon(@item.id, @number_window.number)
- when RPG::Armor
- $game_party.lose_armor(@item.id, @number_window.number)
- end
- @gold_window.refresh
- @sell_window.refresh
- @status_window.refresh
- @sell_window.active = true
- @sell_window.visible = true
- @status_window.visible = false
- end
- return
- end
- end
-
- end
-
复制代码 |
|