antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
RicardoMoreira

[Duvida] Limite De Comprar Cavalo

Question

Boas eu gostava de tirar esta duvida, eu coloquei o Rapaz do estabulo a vender niveis de cavalo, assim:

 

 

say_title ( "Equitador:" ) 

say ( "" ) 
say ( "Ola!" ) 
say ( "Comigo você pode aumentar o seu cavalo." ) 
say ( "O Cavalo vai-lhe custar 1kk" ) 
say ( "" ) 
say_reward ( "Quere 1 nivel para o seu cavalo?" ) 
say ( "" ) 
local s = select ( "Sim" , "Não" ) 
if s == 1 then 
say_title ( "Equitador:" ) 
say ( "" ) 
if pc . money >= 1e+06 then 
pc . changemoney ( "-1000000" ) 
horse . unride ( ) 
horse . advance ( ) 
horse . ride ( ) 
say ( " " .. ( horse . get_level ( ) ) .. " Nivel." ) 
say ( "" ) 
elseif horse . get_level ( ) >= 30 then 
say ( "O Seu cavalo está a nivel 30." ) 
say ( "" ) 
say ( "" ) 
elseif pc . money < 1e+06 then 
say ( "Voçê não tem yang suficiente" ) 
say ( "" ) 
end 
elseif s == 2 then 
return 
end 
 

 

e eu queria colocar so o rapaz do estabulo a vender so ate lvl 21 e fiz assim:

 

 

say_title ( "Equitador:" ) 

say ( "" ) 
say ( "Ola!" ) 
say ( "Comigo você pode aumentar o seu cavalo." ) 
say ( "O Cavalo vai-lhe custar 1kk" ) 
say ( "" ) 
say_reward ( "Quere 1 nivel para o seu cavalo?" ) 
say ( "" ) 
local s = select ( "Sim" , "Não" ) 
if s == 1 then 
say_title ( "Equitador:" ) 
say ( "" ) 
if pc . money >= 1e+06 then 
pc . changemoney ( "-1000000" ) 
horse . unride ( ) 
horse . advance ( ) 
horse . ride ( ) 
say ( " " .. ( horse . get_level ( ) ) .. " Nivel." ) 
say ( "" ) 
elseif horse . get_level ( ) >= 21 then 
say ( "O Seu cavalo está a nivel 21." ) 
say ( "" ) 
say ( "" ) 
elseif pc . money < 1e+06 then 
say ( "Voçê não tem yang suficiente" ) 
say ( "" ) 
end 
elseif s == 2 then 
return 
end 
 
Mas mesmo assim ele vende ate nivel 30, ha maneira de meter so ate lvl 21?

 

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Remove "elseif s == 2 then " e tenta .

Share this post


Link to post
Share on other sites
antiblock
Elveron
  • 0

Vou remover então, mas esse elseif é o quê?

 

@Edit

Ainda estou a aprender esses codigos xd desculpe minhas perguntas estupidas :)

Share this post


Link to post
Share on other sites
  • 0

Pergunta ao pacificador xD

Share this post


Link to post
Share on other sites
  • 0
quest comprar_cavalo begin	state start begin		when 20349.chat."Comprar Cavalo" begin			local yang = 1000000			say_title("Equitador:")			if horse.get_level() >= 21 then				say("O seu cavalo é nível maior/igual que 21.")				return			end			say("Ola![ENTER]Comigo você pode aumentar o seu Cavalo.[ENTER]Vai-lhe custar 1kk.")			say_reward("Quer 1 nível para o seu Cavalo?")			if select("Sim", "Não") == 1 then				if pc.get_gold() < yang then					say("Não tem yang suficiente.")					return				end				horse.unride()				horse.advance()				horse.ride()				say("Seu cavalo está agora a nível "..horse.get_level())			end		end	endend

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this