Hey Leute,
hab gestern Henker und Boney eingefügt. Jetzt aber das Problem. Wenn ich auf das Icon von Boney klicke kommt Feuerphönix... Ich poste mal die Quest hier. Wenn ich ihn mit /m summone dann ist er da.
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("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Rentierjunges
when 53002.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Eis-Phönix
when 53003.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Azrael
when 53005.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Wolfs
when 53006.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Löwen
when 53007.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Keiler
when 53008.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Tiger
when 53009.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Eisbär
when 53014.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Boney
when 53016.use begin
if pet.is_summon() then
pet.unsummon()
chat("Dein Haustier verabschiedet sich nun von dir!")
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1000, 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.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Namenskette - Namensändung des Haustiers
when 71110.use begin
say_title("Namenskette :")
say("")
say("Hier kannst du deinem Haustier einen neuen")
say("Namen geben. Damit kannst du dein Haustier")
say("über alle anderen hervorheben.")
say("")
akna = haustiere.get_pet_name()
if string.len(akna) == 0 then
say_reward("Dein Haustier besitzt bis jetzt keinen Namen.")
else
say_reward("Der aktuelle Name deines Haustieres lautet: "..akna)
end
say("")
say("Möchtest du fortfahren?")
say("")
local s=select("Umbenennen", "Abbrechen")
if s==2 then
return
end
say_title("Namenskette :")
say("")
say("Bitte gib hier den neuen Namen deines")
say("Haustieres ein.")
local x = input()
if string.len(x) < 2 then
say_title("Namenskette :")
say("Der eingegeben Name ist zu kurz.")
say("")
say_reward("Der neue Name muss aus")
say_reward("mind. 2 Zeichen bestehen.")
say("")
return
elseif string.len(x) > 12 then
say_title("Namenskette :")
say("Der eingegeben Name ist zu lang.")
say("")
say_reward("Der neue Name darf max.")
say_reward("aus 12 Zeichen bestehen.")
say("")
return
end
haustiere.set_pet_name(x)
chat("Haustier erfolgreich umbenannt")
pc.remove_item(71110, 1)
end
end
end
Ist die offical_pets.quest. Wenn einer eine Idee hat bitte sagen dankeschön.
[Problem]Habe ein Problem und zwar spinnt mein VPC etwas(ohne Grund)?! 07/28/2011 - Metin2 Private Server - 10 Replies Also wie schon gesagt meins Server spinnt wodurch kiks usw. kommen :(
ich lade euch die Screens in den Anhang, mit der Hoffnung, dass ihr mir helfen könnt :) wäre echt sehr nice :)