|
You last visited: Today at 16:10
Advertisement
[SERVICE] Die Questkontrolle
Discussion on [SERVICE] Die Questkontrolle within the Metin2 Private Server forum part of the Metin2 category.
03/08/2014, 12:43
|
#9811
|
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
|
PHP Code:
when 2493.kill with pc.in_dungeon() and d.getf("grotte_boss") == 2 begin
d.setf("grotte_boss", 3)
notice_all("Die Gruppe von "..pc.get_name().." hat Beran-Setaou getötet.")
d.notice("Beeindruckend, ihr habt ihn tatsächlich besiegt.") -- Als Abschluss könnt ihr noch die Metins zerstören")
d.notice("ihr werdet in 60 Sekunden zurück in Grotte 2 gebracht.")
timer("skipia_boss_end", 60)
d.kill_all()
d.spawn_mob(9012, 239, 173)
d.clear_regen()
end
Klappt nicht.
Ideen?
|
|
|
03/08/2014, 12:56
|
#9812
|
elite*gold: 0
Join Date: Mar 2010
Posts: 255
Received Thanks: 13
|
Problem gelöst danke (;
|
|
|
03/08/2014, 13:21
|
#9813
|
elite*gold: 0
Join Date: May 2010
Posts: 294
Received Thanks: 157
|
say("Aber das hat dir wahrscheinlich Soon schon
da fehlt ") am ende
PHP Code:
when 2493.kill with pc.in_dungeon() and d.getf("grotte_boss") == 2 begin
d.setf("grotte_boss", 3)
notice_all("Die Gruppe von "..pc.get_name().." hat Beran-Setaou getötet.")
d.notice("Beeindruckend, ihr habt ihn tatsächlich besiegt.") -- Als Abschluss könnt ihr noch die Metins zerstören")
d.notice("ihr werdet in 60 Sekunden zurück in Grotte 2 gebracht.")
timer("skipia_boss_end", 60)
d.kill_all()
d.spawn_mob(9012, 239, 173)
d.clear_regen()
end
denke mal der einschub mit -- und ") am ende ist das problem für die syntax ka wie du das da genau haben willst
|
|
|
03/08/2014, 13:30
|
#9814
|
elite*gold: 0
Join Date: Mar 2010
Posts: 255
Received Thanks: 13
|
Problem gelöst danke (;
|
|
|
03/09/2014, 03:06
|
#9815
|
elite*gold: 0
Join Date: Nov 2011
Posts: 53
Received Thanks: 15
|
hab vorhin den Pets bonis gegeben und genommen jetz bekomme ich aber ein Fehler :
PHP Code:
syntax error : [string "start"]:6: `)' expected near `20'
official_pets.quest:33:Error occured on compile official_pets.quest
Die Quest:
PHP Code:
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.ATTBONUS_DEVIL 20, 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.ATTBONUS_DEVIL 20, 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.MAX_HP, 3500, 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.MAX_HP, 3500, 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, 50, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 2000, 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, 50, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Wolfshund
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, 50, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 50, 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, 50, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 50, 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.HP_REGEN, 35, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 200, 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(27)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.HP_REGEN, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 2500, 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, 200, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 60*60*8)
affect.remove_collect(apply.CRITICAL_PCT, 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.ATT_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 60*60*8)
affect.add_collect(apply.CRITICAL_PCT, 20, 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.DEF_GRADE_BONUS, 200, 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(29)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 3000, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.remove_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.add_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 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
Danke für jede hilfe..
|
|
|
03/09/2014, 09:32
|
#9816
|
elite*gold: 0
Join Date: Sep 2011
Posts: 188
Received Thanks: 99
|
Quote:
Originally Posted by Chiksz
hab vorhin den Pets bonis gegeben und genommen jetz bekomme ich aber ein Fehler :
PHP Code:
syntax error : [string "start"]:6: `)' expected near `20'
official_pets.quest:33:Error occured on compile official_pets.quest
Die Quest:
[php]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.ATTBONUS_DEVIL 20, 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.ATTBONUS_DEVIL 20, 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.MAX_HP, 3500, 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.MAX_HP, 3500, 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, 50, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 2000, 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, 50, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Wolfshund
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, 50, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 50, 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, 50, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 50, 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.HP_REGEN, 35, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 200, 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(27)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.HP_REGEN, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 2500, 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, 200, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 60*60*8)
affect.remove_collect(apply.CRITICAL_PCT, 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.ATT_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 60*60*8)
affect.add_collect(apply.CRITICAL_PCT, 20, 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.DEF_GRADE_BONUS, 200, 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(29)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 3000, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.remove_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.add_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 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
[/php
]
Danke für jede hilfe..
|
Ist nur leicht abgewandelt, schau mal nach, ob der Error weiterhin besteht:
PHP Code:
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.ATTBONUS_DEVIL, 20, 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.ATTBONUS_DEVIL, 20, 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.MAX_HP, 3500, 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.MAX_HP, 3500, 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, 50, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 2000, 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, 50, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Wolfshund
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, 50, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 50, 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, 50, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 50, 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.HP_REGEN, 35, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 200, 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(27)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.HP_REGEN, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 2500, 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, 200, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 60*60*8)
affect.remove_collect(apply.CRITICAL_PCT, 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.ATT_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 60*60*8)
affect.add_collect(apply.CRITICAL_PCT, 20, 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.DEF_GRADE_BONUS, 200, 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(29)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 3000, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.remove_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.add_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 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
|
|
|
03/09/2014, 19:19
|
#9817
|
elite*gold: 0
Join Date: Nov 2011
Posts: 53
Received Thanks: 15
|
Quote:
Originally Posted by 123Crusher123
Ist nur leicht abgewandelt, schau mal nach, ob der Error weiterhin besteht:
PHP Code:
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.ATTBONUS_DEVIL, 20, 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.ATTBONUS_DEVIL, 20, 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.MAX_HP, 3500, 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.MAX_HP, 3500, 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, 50, 60*60*8)
affect.remove_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.remove_collect(apply.MAX_HP, 2000, 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, 50, 60*60*8)
affect.add_collect(apply.ATTBONUS_HUMAN, 20, 60*60*8)
affect.add_collect(apply.MAX_HP, 1000, 60*60*8)
end
end
-- Baby-Wolfshund
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, 50, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 50, 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, 50, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 50, 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.HP_REGEN, 35, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 200, 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(27)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.HP_REGEN, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 2500, 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, 200, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 60*60*8)
affect.remove_collect(apply.CRITICAL_PCT, 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.ATT_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 60*60*8)
affect.add_collect(apply.CRITICAL_PCT, 20, 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.DEF_GRADE_BONUS, 200, 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(29)
horse.set_name(haustiere.get_pet_name())
pet.summon()
horse.set_level(old_level)
horse.set_name(old_name)
affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*8)
affect.add_collect(apply.MAX_HP, 3000, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.remove_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.remove_collect(apply.MAX_HP, 1500, 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_BONUS_TO_MONSTER 20, 60*60*8)
affect.add_collect(apply.ATT_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 150, 60*60*8)
affect.add_collect(apply.MAX_HP, 1500, 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
|
Immer noch gleiche Fehler :
syntax error : [string "start"]:4: `)' expected near `20'
official_pets.quest:198:Error occured on compile official_pets.quest
|
|
|
03/09/2014, 20:11
|
#9818
|
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
|
must start with 'quest'
tausch.quest:1:Error occured on compile tausch.quest
PHP Code:
quest tausch begin
state start begin
when 30129.chat."Ostereier Tauschen" begin
say_title("Ostereier Tauschen")
say("")
say("Sieh an! Ein reisender!")
say("Du willst wohl Eier eintauschen?")
say("Hier eine kleine Liste für dich:")
say("")
say_reward("50 Eier: 1x Oster Truhe I")
say_reward("100 Eier: 1x Oster Truhe II")
say_reward("150 Eier: 1x Oster Truhe III")
say_reward("200 Eier: 1x Oster Truhe IV")
say("")
say_reward("Und? Willst du etwas eintauschen?")
say("")
local s = select("Oster Truhe I", "Oster Truhe II", "Oster Truhe III", "Oster Truhe IV", "Abbrechen!")
if s == 5 then
return
elseif s == 1 then
if pc.count_item(44605) < 50 then
say("Ehy! Du hast nicht genug Eier!")
else
pc.remove_item(44605, 50)
pc.give_item2(44601, 1)
say("Viel Spass, und Glück mit deiner Truhe..")
end
elseif s == 2 then
if pc.count_item(44605) < 100 then
say("Du hast nicht genügend Steinstücke")
else
pc.remove_item(44605, 100)
pc.give_item2(44602, 1)
say("Viel Spass, und Glück mit deiner Truhe..")
end
elseif s == 3 then
if pc.count_item(44605) < 150 then
say("Du hast nicht genügend Steinstücke")
else
pc.remove_item(44605, 150)
pc.give_item2(44603, 1)
say("Viel Spass, und Glück mit deiner Truhe..")
end
else
if pc.count_item(44605) < 200 then
say("Du hast nicht genügend Steinstücke")
else
pc.remove_item(44605, 200)
pc.give_item2(44604, 1)
say("Viel Spass, und Glück mit deiner Truhe..")
end
end
end
end
end
|
|
|
03/09/2014, 22:22
|
#9819
|
elite*gold: 0
Join Date: May 2010
Posts: 294
Received Thanks: 157
|
3zPx
Nehm mal bei say("Viel Spass, und Glück mit deiner Truhe..") den hast du häufiger immer den letzten punkt raus, vlt liegt es dadran, denn normal nutzt man die ja für ausgaben von zb dem namen im ausgabe fenster um das ein zu leiten und wenn er die als solche liest, dann besteht da ein syntaxfeheler
|
|
|
03/09/2014, 22:31
|
#9820
|
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
|
Quote:
Originally Posted by Rofelmau
3zPx
Nehm mal bei say("Viel Spass, und Glück mit deiner Truhe..") den hast du häufiger immer den letzten punkt raus, vlt liegt es dadran, denn normal nutzt man die ja für ausgaben von zb dem namen im ausgabe fenster um das ein zu leiten und wenn er die als solche liest, dann besteht da ein syntaxfeheler
|
Hab den Fehler bereits Gefixxt, danke trdz
Mein nächstes Problem ist einfach, das ich 2493.kill nicht benutzen kann.
Es wird nicht 'getriggert' wie man's halt nennen will. Man kann den Drachen tötet, und im Drachenraum bleiben, ohne raus TP't zu werden.
Gibts da alternativen?
|
|
|
03/10/2014, 15:08
|
#9821
|
elite*gold: 12
Join Date: Jun 2012
Posts: 978
Received Thanks: 860
|
Quote:
Originally Posted by 3zPx
Hab den Fehler bereits Gefixxt, danke trdz
Mein nächstes Problem ist einfach, das ich 2493.kill nicht benutzen kann.
Es wird nicht 'getriggert' wie man's halt nennen will. Man kann den Drachen tötet, und im Drachenraum bleiben, ohne raus TP't zu werden.
Gibts da alternativen?
|
Das liegt sicherlich daran, dass du
when 2493.kill begin
in einer anderen Quest hast.
|
|
|
03/10/2014, 15:21
|
#9822
|
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
|
Quote:
Originally Posted by .Xilent
Das liegt sicherlich daran, dass du
when 2493.kill begin
in einer anderen Quest hast.
|
Hab ich eig. schon überall Entfernt. Bio, Bossmsg usw..
|
|
|
03/10/2014, 16:36
|
#9823
|
elite*gold: 0
Join Date: Nov 2011
Posts: 1,448
Received Thanks: 1,257
|
Quote:
Originally Posted by 3zPx
Hab ich eig. schon überall Entfernt. Bio, Bossmsg usw..
|
Verwende mal:
PHP Code:
when kill with npc.get_race() == 2493 begin
|
|
|
03/10/2014, 21:28
|
#9824
|
elite*gold: 0
Join Date: Dec 2010
Posts: 200
Received Thanks: 24
|
Hallo zusammen,
ich habe derzeit ein problem mit den 40k games und zwar kann ich mit dem Befehl mysql_querry nichts in der Datenbank ändern bzw einfügen.
Die Funktion ist eingetragen.
Kann mir einer zufällig verraten was sich hier in der Bespiel Zeile falsch ist?
PHP Code:
mysql_query("INSERT INTO player.test(ID,Name) VALUE ('"..pc_get_player_id().."', '"..pc_get_name().."')")
|
|
|
03/10/2014, 22:50
|
#9825
|
elite*gold: 0
Join Date: Jan 2013
Posts: 114
Received Thanks: 8
|
Hallo Epvp,
was ist an dieser Quest falsch...
wenn ich sie hochlade kommt ein fehler...
PHP Code:
quest rangpunkte begin
state start begin
when 20094.chat."Rang" begin
say_title("Rangpunkte")
say("Ich biete dir die Möglichkeit, deine Rangpunkte")
say("zu erhöhen.")
say("Du kannst jeden Rang annehmen und")
say("jederzeit ändern.")
say("")
local s=select("Ritterlich", "Edel", "Gut", "Freundlich", "Abbrechen")
if s==1 then
pc.change_alignment(-40000)
pc.change_alignment(40000)
say("Dein Rang wurde auf Ritterlich gestellt.")
end
elseif s==2 then
pc.change_alignment(-40000)
pc.change_alignment(28000)
say("Dein Rang wurde auf Edel gestellt.")
end
elseif s==3 then
pc.change_alignment(-40000)
pc.change_alignment(24000)
say("Dein Rang wurde auf Gut gestellt.")
end
elseif s==4 then
pc.change_alignment(-40000)
pc.change_alignment(21000)
say("Dein Rang wurde auf Freundlich gestellt.")
end
elseif s==5 then
return
end
end
end
end
|
|
|
All times are GMT +1. The time now is 16:10.
|
|