antiblock
Elveron
  • Chatbox

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

AJUDA COM QUEST DE ITENS

Question

Ola Cyberianos estou com uma duvida aqui e ja quebrei a cabeça e nao consegui resolver e um problema que pra muitos acredito ser facil porem nao estou conseguindo lhe dar com a situaçao.
Criei uma quest para dar um item in game por um determinado valor porem mesmo nao tendo o gold necessario a quest da o item.

Codigo da questhttps://pastebin.com/sxU0PZsW
 

Reparem que a quest se executou mesmo sem ter os 5.000.000 gold necessarios pelo que diz o codigo.

 

  • Imagens in game

 

  1. https://prntscr.com/j36en2
  2. https://prntscr.com/j36emh
  3. https://prntscr.com/j36emj
  4. https://prntscr.com/j36emz

 

Se alguem puder me ajudar fico grato desde ja.

Share this post


Link to post
Share on other sites

6 answers to this question

  • 1

Não fizeste a verificação para saber se tem yang ou não...

 

quest esfera_bencao begin    
	state start begin
		when 20359.chat."Esfera da Benção" begin
			say_title("Comprar Esfera da Benção")
			say("")
			say("")
			say("Deseja comprar 5x Esferas da Benção?")
			say_reward("Ira te custar 5.000.000")
			say("")
			say("")
			say("")
			say("")
			say("")
			say("")
			say("")
			say("")
			local s = select("Comprar", "Cancelar")
			if s == 1 then
				if pc.get_money() >= 5000000
					pc.change_money(-5000000)
					pc.give_item2(70024,5)
				else
					say("Não tens dinheiro suficiente...")
				end
			elseif s == 2 then
				return
			end
		end
	end
end

 

Share this post


Link to post
Share on other sites
antiblock
diamwall
  • 1
2 minutes ago, Z3R0 said:


Esta funcionando faz a verificacao e gera a mensagem de nao ter o gold porem mesmo assim da o item.

EDIT: https://pastebin.com/rPMxat78

Edited by .ukitobi (see edit history)

Share this post


Link to post
Share on other sites
  • 0

 

4 horas atrás, Karbust™ # PT disse:

Não fizeste a verificação para saber se tem yang ou não...

 


quest esfera_bencao begin    
	state start begin
		when 20359.chat."Esfera da Benção" begin
			say_title("Comprar Esfera da Benção")
			say("")
			say("")
			say("Deseja comprar 5x Esferas da Benção?")
			say_reward("Ira te custar 5.000.000")
			say("")
			say("")
			say("")
			say("")
			say("")
			say("")
			say("")
			say("")
			local s = select("Comprar", "Cancelar")
			if s == 1 then
				if pc.get_money() >= 5000000
					pc.change_money(-5000000)
					pc.give_item2(70024,5)
				else
					say("Não tens dinheiro suficiente...")
				end
			elseif s == 2 then
				return
			end
		end
	end
end

 

 

Tentei esse codigo mais sempre que tento instalar me da o seguinte erro: https://prntscr.com/j3cmn0

 

Share this post


Link to post
Share on other sites
  • 0
22 minutos atrás, .ukitobi disse:

Experimentar usar esta:

https://pastebin.com/XaUZTHv1


Esta funcionando faz a verificacao e gera a mensagem de nao ter o gold porem mesmo assim da o item.

Share this post


Link to post
Share on other sites
  • 0
11 minutos atrás, .ukitobi disse:


Esse esta a funcionar muito obrigado como que da +1 

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