--First when the he summon the pet he get bonuses if he unsummon the bonuses get removed but if they summon the pet and after that they dropp the item and pick it up and summon again the bonus get bugged (I mean it get added to them self for example The pet has 10% Crti chanse and they summon first and after dropped the pet and pick up and summon again then the bonus they get will be 20% Crit chanses) or they just die and summon the result will be the same what can i do ?
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
[1401] = { 9016, " háziállata ", 0, "buff8"},
[1402] = { 9017, " háziállata ", 0, "buff8"},
[1403] = { 9018, " háziállata ", 0, "buff8"},
[1404] = { 9019, " háziállata ", 0, "buff8"},
[1405] = { 9020, " háziállata ", 0, "buff8"},
[1406] = { 9021, " háziállata ", 0, "buff8"},
[1407] = { 9022, " háziállata ", 0, "buff8"},
[1408] = { 9023, " háziállata ", 0, "buff8"},
[1415] = { 9024, " háziállata ", 0, "buff8"},
[1436] = { 1746, " háziállata ", 0, "buff8"},
[1437] = { 1747, " háziállata ", 0, "buff8"},
[1473] = { 1767, " háziállata ", 0, "buff8"},
[1474] = { 1768, " háziállata ", 0, "buff8"},
[1475] = { 1769, " háziállata ", 0, "buff8"},
[1487] = { 1776, " háziállata ", 0, "buff8"},
[1523] = { 811, " háziállata ", 0, "buff8"},
[1524] = { 812, " háziállata ", 0, "buff8"},
[1525] = { 813, " háziállata ", 0, "buff8"},
[1526] = { 814, " háziállata ", 0, "buff8"},
[1570] = { 831, " háziállata ", 0, "buff8"},
[1571] = { 829, " háziállata ", 0, "buff8"},
[1583] = { 851, " háziállata ", 0, "buff8"},
[1569] = { 830, " háziállata ", 0, "buff8"},
[1591] = { 888, " háziállata ", 0, "buff8"},
[1592] = { 889, " háziállata ", 0, "buff8"},
[1593] = { 890, " háziállata ", 0, "buff8"},
[1616] = { 227, " háziállata ", 0, "buff8"},
[1617] = { 234, " háziállata ", 0, "buff8"},
[1618] = { 235, " háziállata ", 0, "buff8"},
[1619] = { 236, " háziállata ", 0, "buff8"},
[1614] = { 226, " háziállata ", 0, "buff8"},
[1621] = { 231, " háziállata ", 0, "buff8"},
[1622] = { 232, " háziállata ", 0, "buff8"},
[1623] = { 233, " háziállata ", 0, "buff8"},
[1624] = { 229, " háziállata ", 0, "buff8"},
[1620] = { 230, " háziállata ", 0, "buff8"},
[1615] = { 228, " háziállata ", 0, "buff8"},
}
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\\\\appear_die\\\\npc2_appear.mse",
}
return effect_table [idx]
end
when 1401.use or 1402.use or 1403.use or 1404.use or 1405.use or 1406.use or 1407.use or 1408.use or 1415.use or 1436.use or
1473.use or 1474.use or 1475.use or 1487.use or 1523.use or 1524.use or 1525.use or 1569.use or 1526.use or 1570.use or 1571.use or 1583.use or
1591.use or 1592.use or 1593.use or 1616.use or 1617.use or 1618.use or 1619.use or 1621.use or 1622.use or 1623.use or 1624.use or
1620.use or 1615.use or 1614.use begin
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])
local buffx = pet_info[4]
if true == pet.is_summon(mobVnum) then
if spawn_effect_file_name != nil then
pet.spawn_effect (mobVnum, spawn_effect_file_name)
end
--Bónuszok--
--
if mobVnum == 9024 then
chat("Elkülted az Minotaurusz peted!")
chat("-20000TP-t és -50% Szörnyek elleni erőt és 40% ördög elleni erőt kaptál mert elkülted!")
affect.add_collect(apply.MAX_HP, -20000, 60*60*24)
affect.add_collect(apply.ATTBONUS_MONSTER, -50, 60*60*24)
affect.add_collect(apply.ATTBONUS_DEVIL, -40, 60*60*24)
pet.unsummon(mobVnum)
else
pet.unsummon(mobVnum)
end
else
if pet.count_summoned() == null then
if mobVnum == 9024 then
chat("Megídézted az Minotaurusz peted!")
chat("+20000TP-t és +50% Szörnyek elleni erőt és 40% ördög elleni erőt kaptál amíg melletted van!")
affect.add_collect(apply.MAX_HP, 20000, 60*60*24)
affect.add_collect(apply.ATTBONUS_MONSTER, 50, 60*60*24)
affect.add_collect(apply.ATTBONUS_DEVIL, 40, 60*60*24)
pet.summon(mobVnum, petName, false)
else
pet.summon(mobVnum, petName, false)
pet.summon(mob_fogott, petName, false)
end
---------------------------------------------------------------------------------
else
syschat(" Nem lehet egyszerre több előhívva. ")
end
--Bónuszok--
end -- if pet.is_summon
end -- if null != pet_info
end -- when
end -- state
end -- quest