quest pet_system begin
state start begin
function get_pet_info(itemVnum)
pet_info_map = {
----------------------------------------------------------------------
-- [ITEM VNUM] MOB_VNUM, DEFAULT NAME, buff_idx, spawn_effect_idx --
----------------------------------------------------------------------
[53001] = {34001, " Fenix de Fogo", 1},
[53002] = {34010, " Rena Treinada", 2},
[53003] = {34003, " Fenix de Gelo", 3},
[53004] = {34001, " Fenix de Fogo", 4},
[53005] = {34004, " Gahnasel", 5},
[53006] = {34009, " Gahnasel(ouro)", 6},
[53007] = {34002, " Rena Bebe", 7},
[53008] = {34011, " Urso Polar", 8},
[53009] = {34012, " Panda", 9},
[53010] = {34008, " Leão Bebe", 10},
[53011] = {34007, " Tigre Bebe", 11},
[53012] = {34005, " Javali Bebe", 12},
[53013] = {34006, " Lobo Bebe", 13},
[53014] = {34013, " Executor", 14},
[53015] = {34014, " Executor(ouro)", 15},
[53016] = {34015, " Costelinha", 16},
[53017] = {34016, " Fenix Jade", 17},
[53018] = {34020, " Leão Branco", 18},
[53019] = {34019, " Tigre Branco", 19},
[53020] = {34017, " Javali Branco", 20},
[53021] = {34018, " Lobo Branco", 21},
[53022] = {34021, " Kokido Bebe", 22},
[53023] = {34022, " Peppy Jr", 23},
[53024] = {34023, " Pantera Bebe", 24},
[53025] = {34024, " Leopardo Bebe", 25},
[53026] = {00000, " Pepsi Bebe", 26},
----------------------------------------------
----------------------------------------------
[53218] = {34023, " Pantera Bebe", 27},
[53219] = {34023, " Pantera Bebe", 28},
[53220] = {34024, " Leopardo Bebe", 29},
[53221] = {34024, " Leopardo Bebe", 30},
[53222] = {34026, " Jack Moschata", 31},
[53223] = {34027, " Piaçaba", 32},
[53224] = {34028, " Bola de Neve", 33},
[53225] = {34029, " Ajudante Noel", 34},
[53226] = {34030, " Deus do Amor", 35},
[53227] = {34031, " Coração Feroz", 36},
[53228] = {34033, " Lua Azul", 37},
[53229] = {34032, " Lua Vermelha", 38},
[53230] = {34034, " Ovelha Branca", 39},
[53231] = {34035, " Carneiro Azul", 40},
[53232] = {34039, " Huashin Bebe", 41},
[53233] = {34055, " Nosferatu", 42},
[53234] = {34056, " Familiar", 43},
[53235] = {34057, " Morcego", 44},
[53236] = {34058, " Valentino+", 45},
[53237] = {34059, " Valentinia+", 46},
[53238] = {34060, " Valentino", 47},
[53239] = {34061, " Valentinia", 48},
[55701] = {34041, "'s Kleiner Affe", 0},
[55702] = {34045, "'s Kleiner Spinne", 0},
[55703] = {34049, "'s Kleiner Razador", 0},
[55704] = {34053, "'s Kleiner Nemere", 0},
[55705] = {34036, "'s Kleiner Dragonette", 0},
}
itemVnum = tonumber(itemVnum)
return pet_info_map[itemVnum]
end
function get_spawn_effect_file(idx)
effect_table = {
[0] = nil,
[1] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_fenix_fogo.mse",
[2] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_rena_natalina.mse",
[3] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_fenix_gelo.mse",
[4] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_fenix_fogo.mse",
[5] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_mini_gahnasel.mse",
[6] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_mini_gahnasel.mse",
[7] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_rena.mse",
[8] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_panda_gelo.mse",
[9] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_panda_negro.mse",
[10] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leao.mse",
[11] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_tigre.mse",
[12] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_javali.mse",
[13] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_lobo.mse",
[14] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_executor.mse",
[15] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_executor_dourado.mse",
[16] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_boney.mse",
[17] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_fenix_esmeralda.mse",
[18] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leao_gelo.mse",
[19] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_tigre_gelo.mse",
[20] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_javali_gelo.mse",
[21] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_lobo_gelo.mse",
[22] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_kokido_filhote.mse",
[23] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_coelho_jr.mse",
[24] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leopardo_negro.mse",
[25] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leopardo.mse",
[26] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
[27] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leopardo_negro.mse",
[28] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leopardo_negro.mse",
[29] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leopardo.mse",
[30] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\pet_leopardo.mse",
[31] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[32] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[33] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[34] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[35] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[36] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[37] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[38] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[39] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[40] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[41] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[42] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[43] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[44] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[45] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[46] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[47] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[48] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[49] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[50] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[51] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
[52] = "d:\\\\ymir work\\\\effect\\\\etc\\\\pets\\\\aaaaaaaaaaa.mse",
}
return effect_table[idx]
end
when 53001.use or 53002.use or 53003.use or 53004.use or 53005.use or 53006.use or 53007.use or 53008.use or 53009.use or 53010.use or
53011.use or 53012.use or 53013.use or 53014.use or 53015.use or 53016.use or 53017.use or 53018.use or 53019.use or 53020.use or
53021.use or 53022.use or 53023.use or 53024.use or 53025.use or 53026.use or 53057.use or 53058.use or 53059.use or 53218.use or
53219.use or 53220.use or 53221.use or 53222.use or 53223.use or 53224.use or 53225.use or 53226.use or 53227.use or 53228.use or
53229.use or 53230.use or 53231.use or 53232.use or 53233.use or 53234.use or 53235.use or 53236.use or 53237.use or 53238.use or
53239.use or 53240.use or 53241.use or 53242.use or 53243.use or 55701.use or 55702.use or 55703.use or 55704.use or 55705.use begin
if pc.get_map_index() == 110 or pc.get_map_index() == 111 or pc.get_map_index() == 112 or pc.get_map_index() == 113 then
syschat("Não pode utilizar pet aqui.")
return
end
local pet_info = pet_system.get_pet_info(item.vnum)
if null != pet_info then
local mobVnum = pet_info[1]
local petName = pet_info[2]
local spawn_effect_file_name = pet_system.get_spawn_effect_file(pet_info[3])
if true == pet.is_summon(mobVnum) then
if spawn_effect_file_name != nil then
pet.spawn_effect(mobVnum, spawn_effect_file_name)
end
pet.unsummon(mobVnum)
-- cmdchat("sound_pets_close")
else
if pet.count_summoned() < 1 then
pet.summon(mobVnum, petName, false)
else
syschat("Um Pet já foi convocado.")
end
if spawn_effect_file_name != nil then
pet.spawn_effect(mobVnum, spawn_effect_file_name)
end
-- cmdchat("sound_pets_open")
end -- if pet.is_summon
end -- if null != pet_info
end -- when
end -- state
end -- quest