antiblock
https://i.imgur.com/aJ17bf7.gif
  • Chatbox

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

[Duvida]Quest Comprar Cavalo

Question

Boas o pacificador num post de duvida que eu fiz ele resolveu o meu problema de comprar o cavalo so ate lvl 21, mas agora tenho um problema grave xd é que ao comprar o cavalo os jogadores nao gastam dinheiro, na quest diz lá 1kk mas ao comprar nao retira o dinheiro ao jogador :S vou deixar aqui a quest 

 

 

 

 

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
end
end

 

quem poder ajudar agradecia

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

pc.change_gold(-yang)Por baixo do say("Seu cavalo bla bla bla

Share this post


Link to post
Share on other sites
antiblock
https://i.imgur.com/aJ17bf7.gif
  • 0

Obrigado, entao para que serve

 

 

 

local yang = 1000000

 

 

é para contar o dinheiro que tem no iventario?

 

ex; se tiver 999k ja nao pode comprar pq nao tem 1kk no iventario certo?

 

ainda tou a aprender estes codigos malditos xd

Share this post


Link to post
Share on other sites
  • 0

"Yang" é uma variável à qual lhe foi atribuida um valor.

Share this post


Link to post
Share on other sites
  • 0

Desculpem duble post nao consegui editar:

 

Pacificador nao funcionou, continua sem retirar o dinheiro; ve la a quest se faz favor:

 

 

quest buyhorse begin

state start begin
when 20349.chat."Comprar Cavalo" begin
local yang = 1000000
say_title("Equitador:")
if horse.get_level() >= 10 then
pc.change_gold(-1000000)
say("O seu cavalo já é nível 10 não pode aumentar mais tente a nivel 35.")
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
end
end

Share this post


Link to post
Share on other sites
  • 0

lol Mas tu não deves ter lido bem o que disse... já viste onde é que tu puseste isso? Acho que a partir do que dizem os says consegues chegar lá! --"
 

pc.change_gold(-yang)
Por baixo do say("Seu cavalo bla bla bla

Não disse por baixo do say("O seu cavalo

Share this post


Link to post
Share on other sites
  • 0

Posso meter aqui entao?

 

 

quest buyhorse begin

state start begin
when 20349.chat."Comprar Cavalo" begin
local yang = 1000000
say_title("Equitador:")
if horse.get_level() >= 10 then
say("O seu cavalo já é nível 10 não pode aumentar mais tente a nivel 35.")
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())
pc.change_gold(-1000000)
end
end
end
end
 
assim so tira dinheiro se o cavalo for aumentado certo?

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