赞 | 0 |
VIP | 0 |
好人卡 | 12 |
积分 | 1 |
经验 | 12966 |
最后登录 | 2020-6-2 |
在线时间 | 132 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 80
- 在线时间
- 132 小时
- 注册时间
- 2014-5-7
- 帖子
- 148
|
http://himeworks.com/2013/03/28/corpse-retrieval/
那就改成掉落道具用的吧,注意插入顺序- module TH
- module Corpse_Retrieval
-
- Lose_Normal_Items = true # 是否丢失消耗道具
- Lose_Key_Items = false # 是否丢失贵重道具
- Lose_Weapons = true # 是否丢失武器
- Lose_Armors = true # 是否丢失防具
- Include_Equiped = true # (丢失装备时)是否包括装备中的装备
-
- def self.setup_event_commands(corpse_items, list)
- list << RPG::EventCommand.new(101, 0, ["", 0, 0, 2])
- list << RPG::EventCommand.new(401, 0, ["Corpse retrieved"])
- corpse_items[:item].each do |id, amount|
- list << RPG::EventCommand.new(126, 0, [id, 0, 0, amount, false]); end
- corpse_items[:weapons].each do |id, amount|
- list << RPG::EventCommand.new(127, 0, [id, 0, 0, amount, false]); end
- corpse_items[:armors].each do |id, amount|
- list << RPG::EventCommand.new(128, 0, [id, 0, 0, amount, false]); end
- list << RPG::EventCommand.new("delete_corpse_event")
- list << RPG::EventCommand.new
- end
- end
- end
- class Game_Party < Game_Unit
-
- def collect_party_items
- corpse_items = {}
- items.each do |item|
- if item.key_item?
- next unless TH::Corpse_Retrieval::Lose_Key_Items
- else; next unless TH::Corpse_Retrieval::Lose_Normal_Items; end
- corpse_items[item.id] = item_number(item)
- lose_item(item, item_number(item)); end
- return corpse_items
- end
-
- def collect_party_weapons
- corpse_weapons = {}
- weapons.each do |item|
- corpse_weapons[item.id] = item_number(item)
- lose_item(item, item_number(item)); end
- return corpse_weapons
- end
-
- def collect_party_armors
- corpse_armors = {}
- armors.each do |item|
- corpse_armors[item.id] = item_number(item)
- lose_item(item, item_number(item)); end
- return corpse_armors
- end
-
- def collect_corpse_items
- corpse_items = {}
- corpse_items[:item] = collect_party_items
- corpse_items[:weapons] = collect_party_weapons if TH::Corpse_Retrieval::Lose_Weapons
- corpse_items[:armors] = collect_party_armors if TH::Corpse_Retrieval::Lose_Armors
- corpse_items
- end
-
- def create_party_corpse
- $game_party.members.each {|member| member.clear_equipments} if TH::Corpse_Retrieval::Include_Equiped
- corpse_items = collect_corpse_items
- return corpse_items
- end
-
- end
复制代码 |
评分
-
查看全部评分
|