[QUEST] 20084 - One time only

02/24/2013 16:35 KillHumans#1
Code:
quest missoesbiologo begin
state start begin
when 20084.chat."As minhas Missões" begin
if pc . count_item ( 30183 ) == 0 then
say ( "Olá!" )
say ( "Estou perdido com estas máscaras." )
say ( "Mas eu preciso de:")
say_item ("200 Máscaras", 30183, "")
say_reward ( "Podes encontrar em Metins" )
elseif pc . count_item ( 30183 ) >= 200 then
say ( "Recompensa:" )
say ( "Velocidade de Movimento 45%" )
say ( "+50 Valor de Ataque" )
say ( "+60 de Defesa" )
say ( "+20% Redução de Danos" )
say ( "+10% Semi-Humanos" )
say_reward ( "Espero que gostes!" )
affect.add_collect(apply.MOV_SPEED,30,60*60*24*365*60)
affect.add_collect(apply.MOV_SPEED,15,60*60*24*365*60)
affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
affect.add_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
affect.add_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
pc.remove_item(30183,200)
elseif pc . count_item ( 30183 ) <= 199 then
say ( "Tens menos de 200 Máscaras." )
end
end
end
end
I need to project this quest to use only 1 time.
Thank you.
02/24/2013 17:11 lfcmaus#2
set state complete on the end of quest
02/24/2013 17:17 KillHumans#3
This quest it's only chat with NPC, not like button. :(
02/24/2013 17:31 lfcmaus#4
....

PHP Code:
quest missoesbiologo begin
    state start begin
        when 20084.chat
."As minhas Missões" begin
        
if pc . count_item ( 30183 ) == 0 then
            say 
( "Olá!" )
            
say ( "Estou perdido com estas máscaras." )
            
say ( "Mas eu preciso de:")
            
say_item ("200 Máscaras", 30183, "")
            
say_reward ( "Podes encontrar em Metins" )
        elseif 
pc . count_item ( 30183 ) >= 200 then
            say 
( "Recompensa:" )
            
say ( "Velocidade de Movimento 45%" )
            
say ( "+50 Valor de Ataque" )
            
say ( "+60 de Defesa" )
            
say ( "+20% Redução de Danos" )
            
say ( "+10% Semi-Humanos" )
            
say_reward ( "Espero que gostes!" )
            
affect.add_collect(apply.MOV_SPEED,30,60*60*24*365*60)
            
affect.add_collect(apply.MOV_SPEED,15,60*60*24*365*60)
            
affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            
affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            
affect.add_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
            
affect.add_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
            
affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
            
pc.remove_item(30183,200)
            
set_state(___complete)
        elseif 
pc . count_item ( 30183 ) <= 199 then
            say 
( "Tens menos de 200 Máscaras." )
        
end
    end
    state __complete begin
    end
end 
02/24/2013 17:36 KillHumans#5
[Only registered and activated users can see links. Click Here To Register...]


:( :( :(
02/24/2013 17:38 ©by Noa#6
da fehlt ein end
02/24/2013 17:43 KillHumans#7
I try to put end at much places, but give me another error like core dumped.
02/24/2013 17:45 lfcmaus#8
sry i forget a end of the first end

PHP Code:
quest missoesbiologo begin
    state start begin
        when 20084.chat
."As minhas Missões" begin
            
if pc . count_item ( 30183 ) == 0 then
                say 
( "Olá!" )
                
say ( "Estou perdido com estas máscaras." )
                
say ( "Mas eu preciso de:")
                
say_item ("200 Máscaras", 30183, "")
                
say_reward ( "Podes encontrar em Metins" )
            elseif 
pc . count_item ( 30183 ) >= 200 then
                say 
( "Recompensa:" )
                
say ( "Velocidade de Movimento 45%" )
                
say ( "+50 Valor de Ataque" )
                
say ( "+60 de Defesa" )
                
say ( "+20% Redução de Danos" )
                
say ( "+10% Semi-Humanos" )
                
say_reward ( "Espero que gostes!" )
                
affect.add_collect(apply.MOV_SPEED,30,60*60*24*365*60)
                
affect.add_collect(apply.MOV_SPEED,15,60*60*24*365*60)
                
affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
                
affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
                
affect.add_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
                
affect.add_collect(apply.DEF_GRADE_BONUS,10,60*60*24*365*60)
                
affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
                
pc.remove_item(30183,200)
                
set_state(__complete)
            elseif 
pc . count_item ( 30183 ) <= 199 then
                say 
( "Tens menos de 200 Máscaras." )
            
end
        end
    end
    state __complete begin
    end
end 
02/24/2013 17:48 KillHumans#9
Working, thank you very much! :P