[SERVICE] Die Questkontrolle

01/22/2013 03:22 ©by Noa#7501
PHP Code:
local player_id= mysql_query("SELECT account_id from player.player WHERE name='"..name.."';")
                
mysql_query("UPDATE account.account SET status='BLOCK' WHERE id='"..player_id.."';") 
bräuhcte hilfe bei der Funktion hier
01/22/2013 15:01 teamspirit#7502
Hi.

I made a custom dt quest, but if i get to the 6. floor, the server shutdown...
I'm sure the quest kills it, but idk where...

No errors...

So there is the quest:

Code:
http://pastebin.com/nEgELm3E

The 6. floor begin at 257. row
01/22/2013 16:28 Endless.#7503
Hier ne fehlerhafte Quest..

Ich habs versucht.. aber da kommt dauernd der Fehler hier:
Code:
syntax error : [string "start"]:25: unexpected symbol near `and´
gaul.quest:115:abort trap (core dumped)
PHP Code:
quest gaul begin
    state start begin
        when 20349.chat
."Pferd trainieren" begin
            
if pc.count_item(50050) >= 1 then
                say_title 
("Stallbursche: ")
                
say("Sei gegrüsst "..pc.get_name().."!")
                
say("Du kannst hier dein Pferd trainieren")
                
say("und es somit zu einem Kampf oder Millitärs Pferd")
                
say("trainieren. Durch das Training steigt dein Pferd")
                
say("immer 1 Level auf. Dies kannst du machen bis dein")
                
say("Pferd Level 30 ist, allerdings kostet dich dies eine")
                
say("Pferdemedallie...")
                
say("")
                
say_reward ("Du kannst dein Pferd trainieren!")
                
local a = select ("Einfaches Training", "Kampf-Pferd Ausbildung", "Millitär-Pferd Ausbildung", "Abbrechen")
                if 
a == 4 then
                    
return
                
end
                
if a == 3 then
                    say_title
("Millitärspferde Ausbildung")
                    
say("Dafür benötigst du 20 Pferdemedallien")
                    
say("")
                    
say_reward("Möchtest du das Training beginnen?")
                    
local b = select ("Ja", "Nein")
                    if 
b == 2 then
                        
return
                    
end
                    
if b == 1 then and pc.count_item(50050) <= 19 then
                        say
("Du hast keine 20 Pferdemedallien")
                        
say("zähl bitte nochmal nach!")
                    
end
                    
if b == 1 then and pc.count_item(50050) >= 20 then
                        say
("Gut, fangen wir an!")
                        
wait()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
chat("Du hast dein Pferd erfolgreich trainiert.")
                        
pc.remove_item(50050, 20)
                    
end
                end
                
if a == 2 then
                    say_title
("Kampfpferd Training")
                    
say("Du möchtest also ein Kampfpferd haben?")
                    
say("Gut.. bring mir 10 Pferdemedallien!")
                    
say("")
                    
say_reward("Möchtest du das Training beginnen?")
                    
local c = select ("Ja", "Nein")
                    if 
c == 2 then
                        
return
                    
end
                    
if c == 1 then and pc.count_item(50050) <= 9 then
                        say
("Nene.. so läuft das nicht, 10")
                        
say("Pferdemedallien-.- sonst gibts nix")
                    
end
                    
if c == 1 then and pc.count_item(50050) >= 10 then
                        say
("Sehr gut, fangen wir an!")
                        
wait()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
pc.remove_item(50050, 10)
                        
chat("Du hast dein Pferd erfolgreich trainiert.")
                    
end
                end
                
if a == 1 then
                    say_title
("Einfaches Training")
                    
say("Möchtest du dein Pferd stufenweise")
                    
say("trainieren? Kein Problem, 1 ")
                    
say("Pferdemedallie und es geht los!")
                    
say("")
                    
say_reward("Möchtest du das Training beginnen?")
                    
local d = select ("Ja", "Nein")
                    if 
d == 2 then
                        
return
                    
end
                    
if d == 1 then and pc.count_item(50050) == 0 then
                        say
("Du hast keine Pferdemedallie!")
                        
say("Die findest du doch überall.")
                    
end
                    
if d == 1 then and pc.count_item(50050) >= 1 then
                        say
("Gut, dann fangen wir an!")
                        
say("")
                        
wait()
                        
horse.advance()
                        
pc.remove_item(50050, 1)
                        
chat("Du hast dein Pferd erfolgreich trainiert.")
                    
end
                end
            end
        end
    end
end 
Und wollte noch einstellen, das man mit Pferd Lv 30 nix mehr abgeben kann^^

Bitte helft mir ;(

gebe riesen THX


Gruß, Endless :)
01/22/2013 16:58 MrPlayboy#7504

Kein Putty Error. Wenn ein Gm online ist zeigt er es trzd als offline an
01/22/2013 16:59 ©by Noa#7505
Quote:
Originally Posted by Endless. View Post
Hier ne fehlerhafte Quest..

Ich habs versucht.. aber da kommt dauernd der Fehler hier:
Code:
syntax error : [string "start"]:25: unexpected symbol near `and´
gaul.quest:115:abort trap (core dumped)
PHP Code:
quest gaul begin
    state start begin
        when 20349.chat
."Pferd trainieren" begin
            
if pc.count_item(50050) >= 1 then
                say_title 
("Stallbursche: ")
                
say("Sei gegrüsst "..pc.get_name().."!")
                
say("Du kannst hier dein Pferd trainieren")
                
say("und es somit zu einem Kampf oder Millitärs Pferd")
                
say("trainieren. Durch das Training steigt dein Pferd")
                
say("immer 1 Level auf. Dies kannst du machen bis dein")
                
say("Pferd Level 30 ist, allerdings kostet dich dies eine")
                
say("Pferdemedallie...")
                
say("")
                
say_reward ("Du kannst dein Pferd trainieren!")
                
local a = select ("Einfaches Training", "Kampf-Pferd Ausbildung", "Millitär-Pferd Ausbildung", "Abbrechen")
                if 
a == 4 then
                    
return
                
end
                
if a == 3 then
                    say_title
("Millitärspferde Ausbildung")
                    
say("Dafür benötigst du 20 Pferdemedallien")
                    
say("")
                    
say_reward("Möchtest du das Training beginnen?")
                    
local b = select ("Ja", "Nein")
                    if 
b == 2 then
                        
return
                    
end
                    
if b == 1 then and pc.count_item(50050) <= 19 then
                        say
("Du hast keine 20 Pferdemedallien")
                        
say("zähl bitte nochmal nach!")
                    
end
                    
if b == 1 then and pc.count_item(50050) >= 20 then
                        say
("Gut, fangen wir an!")
                        
wait()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
chat("Du hast dein Pferd erfolgreich trainiert.")
                        
pc.remove_item(50050, 20)
                    
end
                end
                
if a == 2 then
                    say_title
("Kampfpferd Training")
                    
say("Du möchtest also ein Kampfpferd haben?")
                    
say("Gut.. bring mir 10 Pferdemedallien!")
                    
say("")
                    
say_reward("Möchtest du das Training beginnen?")
                    
local c = select ("Ja", "Nein")
                    if 
c == 2 then
                        
return
                    
end
                    
if c == 1 then and pc.count_item(50050) <= 9 then
                        say
("Nene.. so läuft das nicht, 10")
                        
say("Pferdemedallien-.- sonst gibts nix")
                    
end
                    
if c == 1 then and pc.count_item(50050) >= 10 then
                        say
("Sehr gut, fangen wir an!")
                        
wait()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
horse.advance()
                        
pc.remove_item(50050, 10)
                        
chat("Du hast dein Pferd erfolgreich trainiert.")
                    
end
                end
                
if a == 1 then
                    say_title
("Einfaches Training")
                    
say("Möchtest du dein Pferd stufenweise")
                    
say("trainieren? Kein Problem, 1 ")
                    
say("Pferdemedallie und es geht los!")
                    
say("")
                    
say_reward("Möchtest du das Training beginnen?")
                    
local d = select ("Ja", "Nein")
                    if 
d == 2 then
                        
return
                    
end
                    
if d == 1 then and pc.count_item(50050) == 0 then
                        say
("Du hast keine Pferdemedallie!")
                        
say("Die findest du doch überall.")
                    
end
                    
if d == 1 then and pc.count_item(50050) >= 1 then
                        say
("Gut, dann fangen wir an!")
                        
say("")
                        
wait()
                        
horse.advance()
                        
pc.remove_item(50050, 1)
                        
chat("Du hast dein Pferd erfolgreich trainiert.")
                    
end
                end
            end
        end
    end
end 
Und wollte noch einstellen, das man mit Pferd Lv 30 nix mehr abgeben kann^^

Bitte helft mir ;(

gebe riesen THX


Gruß, Endless :)
dein Fehler liegt hier
PHP Code:
if b == 1 then and pc.count_item(50050) <= 19 then 
hast es soziehmlich überall gemacht wo du die Idee hattest

Quote:
Originally Posted by MrPlayboy View Post

Kein Putty Error. Wenn ein Gm online ist zeigt er es trzd als offline an
es wird auch nichts gespeichert, daher kann es nur offline sein
01/22/2013 17:06 Endless.#7506
ja was soll ich dann machen?
Code:
if b == 1 then with pc.count_item
Oder wo ist genau der Fehler.. ich muss eh wieder questen lernen :/
Habs verlernt..
01/22/2013 17:12 MrPlayboy#7507
Quote:
Originally Posted by ©by Noa View Post
dein Fehler liegt hier
PHP Code:
if b == 1 then and pc.count_item(50050) <= 19 then 
hast es soziehmlich überall gemacht wo du die Idee hattest



es wird auch nichts gespeichert, daher kann es nur offline sein
Und in was muss ich es ändern? Beim alten Server hat er funktioniert :I
01/22/2013 17:46 .Remix#7508
Quote:
Originally Posted by Endless. View Post
ja was soll ich dann machen?
Code:
if b == 1 then with pc.count_item
Oder wo ist genau der Fehler.. ich muss eh wieder questen lernen :/
Habs verlernt..
PHP Code:
if b == 1 with pc.count_item then 
01/22/2013 18:34 .Delta#7509
Quote:
Originally Posted by .Remix View Post
PHP Code:
if b == 1 with pc.count_item then 
with geht nicht mit then, das ist böse :D

PHP Code:
if b == 1 and pc.count_item(VALUE) >= ANZAHL then 
MUH!
01/22/2013 19:11 Endless.#7510
Vielen herzlichen Dank :)

Dann hau ich die endlich mal in meinem Server rein^^ ich hab da nun au wieder was gelernt.

Gruß, Endless :)
01/22/2013 19:38 ©by Noa#7511
Quote:
Originally Posted by .Delta View Post
with geht nicht mit then, das ist böse :D

PHP Code:
if b == 1 and pc.count_item(VALUE) >= ANZAHL then 
MUH!
so würde ich das nicht machen(kann man aber)
wenn man beim if ein else hinzufügt wird es problematisch da es ja dann für das count als auch für's select gillt
01/22/2013 21:25 .Delta#7512
Quote:
Originally Posted by ©by Noa View Post
so würde ich das nicht machen(kann man aber)
wenn man beim if ein else hinzufügt wird es problematisch da es ja dann für das count als auch für's select gillt
in der select auswahl würde ich auch die if bedingung noch mal aufteilen ;)

Aber in der hier zur Verfügung gestellten Code-Zeile ist das eine akzeptable Lösung.
01/22/2013 23:43 ©by Noa#7513
Quote:
Originally Posted by .Delta View Post
in der select auswahl würde ich auch die if bedingung noch mal aufteilen ;)
jup
01/23/2013 09:56 DaShaunn#7514
Quote:
Originally Posted by MrPlayboy View Post

Kein Putty Error. Wenn ein Gm online ist zeigt er es trzd als offline an

Diese quest funktioniert nimm einfach die ;)

mfg.
DaShaunn
01/23/2013 15:22 MrPlayboy#7515
Mit der Quest wird keine Questrolle geschickt