ist komplett selbst geschrieben aber mein problem ist das der codeblock: if horse.is_riding() == 1 then
nicht funktionert aber der rest funktioniert wie wegschicken rufen vom boden aus
PHP Code:
quest phoenix begin
state start begin
when 29008.use with pc.getqf("pet") == 0 begin
if horse.is_riding() == 1 then
local pferdlvl = {
{lvl ="1", pferd ="20099"},
{lvl ="2", pferd ="20099"},
{lvl ="3", pferd ="20099"},
{lvl ="4", pferd ="20099"},
{lvl ="5", pferd ="20099"},
{lvl ="6", pferd ="20099"},
{lvl ="7", pferd ="20099"},
{lvl ="8", pferd ="20099"},
{lvl ="9", pferd ="20099"},
{lvl ="10", pferd ="20099"},
{lvl ="11", pferd ="20102"},
{lvl ="12", pferd ="20102"},
{lvl ="13", pferd ="20102"},
{lvl ="14", pferd ="20102"},
{lvl ="15", pferd ="20102"},
{lvl ="16", pferd ="20102"},
{lvl ="17", pferd ="20102"},
{lvl ="18", pferd ="20102"},
{lvl ="19", pferd ="20102"},
{lvl ="20", pferd ="20102"},
{lvl ="21", pferd ="20105"},
}
local grade = horse.get_grade()
local lvls = horse.get_level()
if lvls == pferdlvl[lvl] then
chat("Dein Phoenix wurde gerufen!")
pc.unmount()
horse.unsummon()
horse.set_level("22")
horse.summon()
horse.set_level(lvl)
pc.mount(pferdlvl[pferd] + grade)
pc.setqf("pet", "1")
pc.setqf("reiten", "1")
affect.add_collect(apply.CON,25,60*60*24*365*60)
affect.add_collect(apply.INT,10,60*60*24*365*60)
affect.add_collect(apply.STR,10,60*60*24*365*60)
affect.add_collect(apply.DEX,10,60*60*24*365*60)
affect.add_collect(apply.MAX_HP,5000,60*60*24*365*60)
end
elseif horse.is_riding() == 0 then
chat("Dein Phoenix wurde gerufen!")
horse.set_level ("22")
horse.summon()
horse.set_level ("21")
pc.setqf("pet", "1")
pc.setqf("reiten", "0")
cmdchat("Pet_System TRUE")
affect.add_collect(apply.CON,25,60*60*24*365*60)
affect.add_collect(apply.INT,10,60*60*24*365*60)
affect.add_collect(apply.STR,10,60*60*24*365*60)
affect.add_collect(apply.DEX,10,60*60*24*365*60)
affect.add_collect(apply.MAX_HP,5000,60*60*24*365*60)
end
end
when 29008.use with pc.getqf("pet") == 1 begin
if pc.getqf("reiten") == 0 then
horse.unsummon()
horse.unride()
horse.unsummon()
horse.set_level("21")
pc.setqf("pet", "0")
cmdchat("Pet_System FALSE")
chat("Dein Phoenix wurde weggeschickt!")
affect.remove_collect(apply.CON,25,60*60*24*365*60)
affect.remove_collect(apply.INT,10,60*60*24*365*60)
affect.remove_collect(apply.STR,10,60*60*24*365*60)
affect.remove_collect(apply.DEX,10,60*60*24*365*60)
affect.remove_collect(apply.MAX_HP,5000,60*60*24*365*60)
else
chat("Dein Phoenix wurde weggeschickt!")
affect.remove_collect(apply.CON,25,60*60*24*365*60)
affect.remove_collect(apply.INT,10,60*60*24*365*60)
affect.remove_collect(apply.STR,10,60*60*24*365*60)
affect.remove_collect(apply.DEX,10,60*60*24*365*60)
affect.remove_collect(apply.MAX_HP,5000,60*60*24*365*60)
horse.unsummon()
horse.unride()
horse.unsummon()
horse.set_level("21")
horse.summon()
horse.ride()
pc.setqf("reiten", "0")
pc.setqf("pet", "0")
end
end
end
end