脚本1
class Game_Alchemy
attr_accessor :recipe_list
attr_accessor :fail_id
def initialize
@recipe_list = []
main
end
def main
材料A = [0,181]
材料B = [0,206]
成品 = [103, 104]
@recipe_list << [材料A, 材料B, 成品]
end
end
脚本2
def make_result
@alchemy = []
for i in 0...2
kind = 0
@alchemy = [kind,@alchemy_window.stuff.id]
end
@list = $game_alchemy.recipe_list
for i in 0...@list.size
if @alchemy[0] == @list[0] and @alchemy[1] == @list[1]
# 检查队伍和仓库是否包含该宠物ID
if $game_actors[$game_variables[1]].kds_baby.include?(@result.id) ||
$game_party.actors2.include?($game_actors[@result.id])
p "无法继续获得宠物"
# 如果没有该宠物
else
p "获得宠物"
# 添加进队伍
switch_baby(@result.id)
end
end
end
end [/pre]