Project1
标题: 获取全部物品武器防具的脚本 [打印本页]
作者: Nil2011 时间: 2017-8-24 21:47
标题: 获取全部物品武器防具的脚本
之前都是复制粘贴的。。工程没了也记不住
谁能发一下谢谢!!
作者: 御曹司 时间: 2017-8-24 23:12
ひきも記 (http://hikimoki.sakura.ne.jp/)
RGSS3_アイテム操作コマンド
作者: 张咚咚 时间: 2017-8-25 09:51
本帖最后由 张咚咚 于 2017-8-25 10:05 编辑
#获取全部物品
for i in 1..$data_items.length - 1
item = $data_items[i]
next if item.name.empty?
$game_party.gain_item(item, 99)
end
#获取全部物品
for i in 1..$data_items.length - 1
item = $data_items[i]
next if item.name.empty?
$game_party.gain_item(item, 99)
end
#获取全部武器
for i in 1..$data_weapons.length - 1
weapon = $data_weapons[i]
next if weapon.name.empty?
$game_party.gain_item(weapon, 1)
end
#获取全部武器
for i in 1..$data_weapons.length - 1
weapon = $data_weapons[i]
next if weapon.name.empty?
$game_party.gain_item(weapon, 1)
end
#获取全部防具
for i in 1..$data_armors.length - 1
armor = $data_armors[i]
next if armor.name.empty?
$game_party.gain_item(armor, 1)
end
#获取全部防具
for i in 1..$data_armors.length - 1
armor = $data_armors[i]
next if armor.name.empty?
$game_party.gain_item(armor, 1)
end
。。。谁能告诉我为什么for item in $data_items不管用啊。。。
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |