quest haustiere begin
state start begin
-- Setzt den neuen Petnamen in die Datenbank ein
function set_pet_name(name)
mysql_query("DELETE FROM player.pet_name WHERE id = '"..pc.get_player_id().."'")
mysql_query("INSERT INTO player.pet_name(id, name) VALUES('"..pc.get_player_id().."', '"..name.."')")
end
-- Holt sich den Petnamen aus der Datenbank
function get_pet_name()
local pet_name = mysql_query("SELECT * FROM player.pet_name WHERE id = '"..pc.get_player_id().."'")
return (pet_name.name or {pc.get_name().."'s Haustier"})[1]
end
-- Feuer-Phönix
when 53001.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.ATTBONUS_DEVIL, 30, 60*60*8)
affect.remove_collect(apply.ATT_BONUS_TO_MONSTER, 30, 60*60*8)
affect.remove_collect(apply.MAX_HP, 3000, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(22)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.ATTBONUS_DEVIL, 30, 60*60*8)
affect.add_collect(apply.ATT_BONUS_TO_MONSTER, 30, 60*60*8)
affect.add_collect(apply.MAX_HP, 3000, 60*60*8)
chat("The power of the Golden Beast has been summoned ")
chat("You Recive 30 Monster...")
chat("30 Devils")
chat("3000 Hp")
end
end
-- Rentierjunges
when 53002.use begin
if pet.is_summon() then
pet.unsummon()
chat(Your pet now says goodbye to you!")
affect.remove_collect(apply.STR, 10, 60*60*8)
affect.remove_collect(apply.INT, 10, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 15, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(24)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.STR, 10, 60*60*8)
affect.add_collect(apply.INT, 10, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 15, 60*60*8)
chat("The power of the Baby Panda has been summoned ")
chat("You recive 10 against Demi Human,1000k Hp and... ")
chat("10 into your Strenght and Intelligence ")
end
end
-- Eis-Phönix
when 53003.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.STR, 20, 60*60*8)
affect.remove_collect(apply.DEX, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 3500, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(23)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.STR, 20, 60*60*8)
affect.add_collect(apply.DEX, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 3500, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
chat("The power of the Phoenix has been summoned ")
chat("You recive 20 Against Demi Human 3500 hp and... ")
chat("20 into your Strenght and Dexterity ")
end
end
-- Baby-Azrael
when 53005.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!!")
affect.remove_collect(apply.ATT_BONUS_TO_MONSTER, 20, 60*60*8)
affect.remove_collect(apply.EXP_DOUBLE_BONUS, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 2500, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(25)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.ATT_BONUS_TO_MONSTER, 20, 60*60*8)
affect.add_collect(apply.EXP_DOUBLE_BONUS, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 2500, 60*60*8)
chat("The power of the Azrael has been summoned ")
chat("You recive 20 Against Monster 2500 hp and... ")
chat("20 Exp Bonus.")
end
end
-- Baby-Wolfs
when 53006.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.STR, 10, 60*60*8)
affect.remove_collect(apply.DEX, 10, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN,15, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(26)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.STR, 10, 60*60*8)
affect.add_collect(apply.DEX, 10, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN,15, 60*60*8)
chat("The power of the Baby Wolf has been summoned ")
chat("You recive 15 Against Demi Human 1000 hp and... ")
chat("10 into your Strenght and Dexterity ")
end
end
-- Baby-Löwen
when 53007.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.DEX, 10, 60*60*8)
affect.remove_collect(apply.INT, 10, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 15, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(27)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.DEX, 10, 60*60*8)
affect.add_collect(apply.INT, 10, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 15, 60*60*8)
chat("The power of the Baby Lion has been summoned")
chat("You recive 15 Against Demi Human 1000 hp and... ")
chat("10 into your Intelligence and Dexterity ")
end
end
-- Baby-Keiler
when 53008.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.INT, 20, 60*60*8)
affect.remove_collect(apply.STR, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 3500, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(28)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.INT, 20, 60*60*8)
affect.add_collect(apply.STR, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 3500, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
chat("The power of the Baby Raptor has been summoned ")
chat("You recive 20 Against Demi Human 3000 hp and... ")
chat("20 into your Strenght and Intelligence ")
end
end
-- Baby-Tiger
when 53009.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.INT, 20, 60*60*8)
affect.remove_collect(apply.DEX, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 3500, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(29)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.INT, 20, 60*60*8)
affect.add_collect(apply.DEX, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 3500, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
chat("The power of the Lixie has been summoned ")
chat("You recive 20 Against Demi Human 3500 hp and... ")
chat("20 into your Intelligence And Dexterity ")
end
end
-- Baby-Eisbär
when 53014.use begin
if pet.is_summon() then
pet.unsummon()
chat("Your pet now says goodbye to you!")
affect.remove_collect(apply.CRITICAL_PCT, 20, 60*60*8)
affect.remove_collect(apply.CAST_SPEED, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 3500, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
else
local old_level = horse.get_level()
local old_name = horse.get_name()
horse.set_level(30)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.CRITICAL_PCT, 20, 60*60*8)
affect.add_collect(apply.CAST_SPEED, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 3500, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
chat("The power of the ???? has been summoned ")
chat("You recive 20 Against Demi Human 3500 hp and... ")
chat("20 Critical and Casting Speed")
Chat("DRACARYS!!")
end
end
Hello folks i have a problem compling the quest
Can anyone tell me whats wrong and which line ?
Thnaks !