# me arreglan la quezt?

## Recommended Posts

quest pets begin

state start begin

function givebonus(x)

local y,boni = {53,54,1},pets.bonusliste()

table.foreach(boni[x],function(i,l) cmdchat("HaustierBonus"..i.." "..l.."") affect.add_collect(y,l,60*60*24*365*60) end )

cmdchat("HaustierLevel "..pc.getqf('petlevel').."")

cmdchat("HaustierName "..pc.get_name().."")

pc.setqf("104",1)

end

function bonusliste()

return {

[1] = {200,100,500},

[2] = {250,150,1000},

[3] = {300,200,1500},

[4] = {350,250,2000},

[5] = {400,300,3000},

}

end

function removebonus(x)

local y,boni = {53,54,1},pets.bonusliste()

table.foreach(boni[x],function(i,l) affect.remove_collect(y,l,60*60*24*365*60) end )

horse.unsummon()

pc.setqf("104",0)

horse.set_level("21")

cmdchat("HidePetGui")

cmdchat("HideIcePhoenixGui")

cleartimer("bugcheck")

end

when 30112.use with pc.getqf("101") == 0 begin

if pc.getqf('petlevel') == 0 then

pc.setqf('petlevel',1)

end

local petlvl = 22

pc.setqf("101", 1)

horse.set_level(petlvl)

pet.summon()

horse.set_level(old_level)

horse.set_name(old_name)

pets.givebonus(pc.getqf('petlevel'))

local expprocent1 = {20, 80, 160, 350, 400}

cmdchat("PetProcentExp "..(pc.getqf("exp")/expprocent1[pc.getqf("petlevel")]).."")

cmdchat("ShowPetGui")

loop_timer("bugcheck", 0.2)

end

when 30112.use with pc.getqf("101") == 1 begin

pc.setqf("101", 0)

pets.removebonus(pc.getqf('petlevel'))

pet.unsummon()

end

when 30117.use with pc.getqf("102") == 0 begin

if pc.getqf('petlevel') == 0 then

pc.setqf('petlevel',1)

end

local petlvl = 23

pc.setqf("102", 1)

horse.set_level(petlvl)

pet.summon()

horse.set_level(old_level)

horse.set_name(old_name)

pets.givebonus(pc.getqf('petlevel'))

local expprocent1 = {20, 80, 160, 350, 400}

cmdchat("IcePhoenixProcentExp "..(pc.getqf("exp")/expprocent1[pc.getqf("petlevel")]).."")

cmdchat("ShowIcePhoenixGui")

loop_timer("bugcheck", 0.2)

end

when 30118.use with pc.getqf("102") == 1 begin

pc.setqf("102", 0)

pets.removebonus(pc.getqf('petlevel'))

pet.unsummon()

end

when kill with pc.getqf("104") == 1 begin

if pc.getqf("petlevel") == 5 then

return

end

if not npc.is_pc() then

pc.setqf("exp",pc.getqf("exp")+1)

local exp2up = {500, 8000, 16000, 35000, 40000}

local expprocent = {20, 80, 160, 350, 400}

cmdchat("PetProcentExp "..(pc.getqf("exp")/expprocent[pc.getqf("petlevel")]).."")

cmdchat("IcePhoenixProcentExp "..(pc.getqf("exp")/expprocent[pc.getqf("petlevel")]).."")

if pc.getqf("exp") == exp2up[pc.getqf("petlevel")] then

if pc.getqf("petlevel") == 4 then

say_title("Herzlichen GlÃ¼ckwunsch")

say("Dein Haustier erreicht Level "..(pc.getqf("petlevel")+1).."")

say_reward("Dies war das letzte Level!")

end

say_title("Herzlichen GlÃ¼ckwunsch")

say("Dein Haustier erreicht Level "..(pc.getqf("petlevel")+1).."")

say("Rufe dein Pet bitte erneut!")

pc.setqf("petlevel",pc.getqf("petlevel")+1)

pc.setqf("exp",0)

pets.removebonus(pc.getqf('petlevel'))

end

end

end

-- Bugschutz

when bugcheck.timer begin

if pc.is_mount() then

horse.unride()

end

if pc.count_item(30112) == 0 then

say_title("Buguser")

say("Bugusing festgestellt!")

pets.removebonus(pc.getqf('petlevel'))

end

end

when login or logout or disconnect with pc.getqf("104") == 1 begin

pets.removebonus(pc.getqf('petlevel'))

chat("Dein Haustier ist nicht mitgekommen...")

chat("Rufe es erneut!")

end

end

end

##### Share on other sites

Si cuentas que le pasa mejor xd

Es la del nuevo pet gui de elitepvpers si no me equivoco, y deberia funcionar bien.

##### Share on other sites

entro en el juego i no funsiona

##### Share on other sites

• 7 months later...

Por si a alguien le sirve aqui dejo la quests corregida:

`quest pet_gui begin     state start begin                  function givebonus(x)             local y,boni = {53,54,1},pets.bonusliste()             table.foreach(boni[x],function(i,l)  cmdchat("HaustierBonus"..i.." "..l.."") affect.add_collect(y[i],l,60*60*24*365*60) end )             cmdchat("HaustierLevel "..pc.getqf('petlevel').."")             cmdchat("HaustierName "..pc.get_name().."")             pc.setqf("petruf",1)                         end         function bonusliste()             return {                 [1] = {200,100,500},                 [2] = {250,150,1000},                 [3] = {300,200,1500},                 [4] = {350,250,2000},                 [5] = {400,300,3000},             }         end             function removebonus(x)             local y,boni = {53,54,1},pets.bonusliste()             table.foreach(boni[x],function(i,l) affect.remove_collect(y[i],l,60*60*24*365*60) end )              pet.unsummon()             pc.setqf("petruf",0)             horse.set_level("21")             cmdchat("HidePetGui")             cleartimer("bugcheck")         end                      when 53001.use begin             horse.unride() horse.unsummon()             if pc.is_mount() then                 say_title("Hata:")                 say("Evcil hayvanýný attan indikten sonra çaðýrabilirsin!")                 return             end             if pc.getqf('petlevel') == 0 then                 pc.setqf('petlevel',1)             end             if pc.getqf("petruf") == 0 then                 local Horselevel = 29-pc.getqf('petlevel')                 horse.set_level(Horselevel)                  pet.unsummon()  pet.summon()                 chat("Evcil Hayvanýný Çaðýrdýn.")                 pets.givebonus(pc.getqf('petlevel'))                 local expprocent1 = {20, 80, 160, 350, 400}                 cmdchat("PetProcentExp "..(pc.getqf("exp")/expprocent1[pc.getqf("petlevel")]).."")                                 cmdchat("ShowPetGui")                 loop_timer("bugcheck", 0.2)             elseif pc.getqf("petruf") == 1 then                         pets.removebonus(pc.getqf('petlevel'))                 chat("Evcil Hayvanýný Gönderdin.")             end                 end                           when kill with pc.getqf("petruf") == 1 begin             if pc.getqf("petlevel") == 5 then                 return             end                 if not npc.is_pc() then                 pc.setqf("exp",pc.getqf("exp")+1)                 local exp2up = {2000, 8000, 16000, 35000, 40000}                 local expprocent = {20, 80, 160, 350, 400}                 cmdchat("PetProcentExp "..(pc.getqf("exp")/expprocent[pc.getqf("petlevel")]).."")                 if pc.getqf("exp") == exp2up[pc.getqf("petlevel")] then                     if pc.getqf("petlevel") == 4 then                         say_title("Tebrikler!")                         say("Seviye:"..(pc.getqf("petlevel")+1).."")                         say_reward("Evcil hayvanýn seviye atladý.")                     end                     say_title("Tebrikler!")                     say("Seviye: "..(pc.getqf("petlevel")+1).."")                     say("Evcil hayvanýn seviye atladý.")                     pc.setqf("petlevel",pc.getqf("petlevel")+1)                     pc.setqf("exp",0)                     pets.removebonus(pc.getqf('petlevel'))                 end             end         end                  -- Bugschutz                  when bugcheck.timer begin             if pc.count_item(53001) < 0 then                 say_title("Oyun açýðý tespit edildi!")                 say("Envanterinde mühür bulunamadý!")                 pets.removebonus(pc.getqf('petlevel'))             end         end                  when login or logout or disconnect with pc.getqf("petruf") == 1 begin             pets.removebonus(pc.getqf('petlevel'))             chat("Evcil hayvanýn çaðýralamadý!")              end                      end     end`