Code:
quest pet begin
state start begin
when 53001.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level("22")
horse.set_name(pc.get_name().."'s Feuerphönix")
pet.summon()
syschat("test")
pc.setqf("pet_da",1)
affect.add_collect(apply.FKS, 15, 60*60*24*7)
affect.add_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.FKS, 15, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53002.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level("24")
horse.set_name(pc.get_name().."'s Rentier")
pet.summon()
pc.setqf("pet_da",1)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53003.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level(23)
horse.set_name(pc.get_name().."'s Eisphönix")
pet.summon()
pc.setqf("pet_da",1)
affect.add_collect(apply.DSS, 20, 60*60*24*7)
affect.add_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53005.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level(25)
horse.set_name(pc.get_name().."'s Babyazrael")
pet.summon()
pc.setqf("pet_da",1)
affect.add_collect(apply.MAX_HP, 10000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.MAX_HP, 10000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53006.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level(26)
horse.set_name(pc.get_name().."'s Babyhund")
pet.summon()
pc.setqf("pet_da",1)
affect.add_collect(apply.MAX_HP, 50000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_HUMAN, 700, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.MAX_HP, 50000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 700, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53007.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level(27)
horse.set_name(pc.get_name().."'s Babylöwe")
pet.summon()
pc.setqf("pet_da",1)
affect.add_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53008.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level(28)
horse.set_name(pc.get_name().."'s Babykeiler")
pet.summon()
pc.setqf("pet_da",1)
affect.add_collect(apply.DSS, 20, 60*60*24*7)
affect.add_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when 53009.use begin
if pc.getqf("pet_da") == 0 then
local pferd_lvl = horse.get_level()
local pferd_name = horse.get_name()
horse.set_level(29)
horse.set_name(pc.get_name().."'s Babytiger")
pet.summon()
pc.setqf("pet_da",1)
affect.add_collect(apply.FKS, 15, 60*60*24*7)
affect.add_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.add_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
horse.set_level(pferd_lvl)
horse.set_name(pferd_name)
syschat("Pet wurde gerufen")
loop_timer("bugcheck", 1)
elseif pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.FKS, 15, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
pet.unsummon()
pc.setqf("pet_da",0)
cleartimer("bugcheck")
end
end
when bugcheck.timer begin
if pc.count_item(53001) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.FKS, 15, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
cleartimer("bugcheck")
end
if pc.count_item(53002) == 0 and pc.getqf("pet_da") == 1 then
cleartimer("bugcheck")
end
if pc.count_item(53003) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
cleartimer("bugcheck")
end
if pc.count_item(53005) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.MAX_HP, 10000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*24*7)
cleartimer("bugcheck")
end
if pc.count_item(53006) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.MAX_HP, 50000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 700, 60*60*24*7)
cleartimer("bugcheck")
end
if pc.count_item(53007) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
cleartimer("bugcheck")
end
if pc.count_item(53008) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
cleartimer("bugcheck")
end
if pc.count_item(53009) == 0 and pc.getqf("pet_da") == 1 then
affect.remove_collect(apply.FKS, 15, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
cleartimer("bugcheck")
end
end
when login or logout or disconnect with pc.getqf("pet_da") == 1 begin
pet.unsummon()
if pc.count_item(53001) != 0 then
affect.remove_collect(apply.FKS, 15, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
elseif pc.count_item(53003) != 0 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
elseif pc.count_item(53004) != 0 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 2000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 10, 60*60*24*7)
elseif pc.count_item(53005) != 0 then
affect.remove_collect(apply.MAX_HP, 10000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*24*7)
elseif pc.count_item(53006) != 0 then
affect.remove_collect(apply.MAX_HP, 50000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_HUMAN, 700, 60*60*24*7)
elseif pc.count_item(53007) != 0 then
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
elseif pc.count_item(53008) != 0 then
affect.remove_collect(apply.DSS, 20, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
elseif pc.count_item(53009) != 0 then
affect.remove_collect(apply.FKS, 15, 60*60*24*7)
affect.remove_collect(apply.MAX_HP, 8000, 60*60*24*7)
affect.remove_collect(apply.ATTBONUS_MONSTER, 10, 60*60*24*7)
end
pc.setqf("pet_da",0)
loop_timer("bugcheck", 1)
end
end
end
das syschat("test") ist nur zum testen da und ich merke dass nichtmal das erscheint^^