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

    You don't have permission to chat.
    Load More
  • 0
єxŧєrмiηαŧєr

Quest error

Question

Spoiler

quest mestre begin
    state start begin
        when 20095.click begin -- when chat fica melhor do que o begin na minha opinião
            local mestre = select("OldEliteMt2 Bank", "Top-Secret", "Fechar") 
                if mestre == 1 then
                    local bank = select("Pedir Cheque", "Depositar Cheque", "Fechar")    
                        if bank == 1 then    
                            local cost = 1000000000
                            if pc.get_gold() < cost then
                                say("nao tens o Yang necessario")
                            else
                                pc.give_item2(95002, 1)
                
                                pc.change_gold(-1000000000)
                            end
                        elseif bank == 2 then
                            if pc.count_item(95002) > 0 then
                            pc.remove_item(95002, 1)
                            pc.change_gold(1000000000)
                        else
                            say("O Pato Nao me Enganas")
                        end
                    elseif bank == 3 then
                        return
                    end
            else
                return
                end
            end
        end
    end

Bom a quest ta mais ou menos funcional so nao desempenha a funçao de verificar se o jogador tem o item no inventario e se tiver remover e dar lhe o dinheiro se nao tiver dizer a mensagem "Pato nao me enganas" esta parte é a que ta com erro:

Spoiler

                        elseif bank == 2 then
                            if pc.count_item(95002) > 0 then
                            pc.remove_item(95002, 1)
                            pc.change_gold(1000000000)
                        else
                            say("O Pato Nao me Enganas")
                        end

 

Share this post


Link to post
Share on other sites

26 answers to this question

  • 0
48 minutos atrás, Cσяvσ⋆ disse:

Não consegues o quê? Nem dizes o que está a correr mal...

 

48 minutos atrás, Dima disse:

Experimente assim:

if pc.count_item(95002) > 0 then
    pc.remove_item("95002", 1)
    pc.change_gold(1000000000)
else
    say("Não tens o item necessário")
end

 

 

E também verifica se o item e mesmo 95002 :D

 

Edit -2 deve funcionar 


quest mestre begin
    state start begin
        when 20095.click begin -- when chat fica melhor do que o begin na minha opinião
            local mestre = select("OldEliteMt2 Bank", "Top-Secret", "Fechar") 
                if mestre == 1 then
                    local bank = select("Pedir Cheque", "Depositar Cheque", "Fechar")    
                        if bank == 1 then    
                            local cost = 1000000000
                            if pc.get_gold() < cost then
                                say("nao tens o Yang necessario")
                            else
                                pc.give_item2("95002", 1)
                
                                pc.change_gold(-1000000000)
                            end
                        elseif bank == 2 then
                            if pc.count_item(95002) > 0 then
                            pc.remove_item("95002", 1)
                            pc.change_gold(1000000000)
                        else
                            say("O Pato Nao me Enganas")
                        end
                    elseif bank == 3 then
                        return
                    end
            else
                return
                end
            end
        end
    end

 

nao da continua a dar a mesma coisa é como se nao conseguisse saber se o player tem o item ou nao

Share this post


Link to post
Share on other sites
antiblock
Cyphriun
  • 0

Certifica-te  se o item e mesmo 

95002

Share this post


Link to post
Share on other sites
  • 0

Abre outro quest e vê como esta la o 

pc.count_item()

Pode ser modificado da source 

Share this post


Link to post
Share on other sites
  • 0
9 minutos atrás, Dima disse:

Abre outro quest e vê como esta la o 


pc.count_item()

Pode ser modificado da source 

 

ta igual ja vi noutra quest

Share this post


Link to post
Share on other sites
  • 0

Tenta esta

quest mestre begin
	state start begin
		when 20095.click begin
			local mestre = select("OldEliteMt2 Banco", "Top-Secret", "Fechar") 
				if mestre == 3 then
					return
				end
				if mestre == 1 then
					local bank = select("Pedir Cheque", "Depositar Cheque", "Fechar")    
						if bank == 1 then    
							local cost = 1000000000
							if pc.get_gold() < cost then
								say("Não tens Yang suficiente.")
							else
								pc.give_item2(95002, 1)
								pc.change_gold(-1000000000)
							end
						elseif bank == 2 then
							if pc.count_item(95002) > 0 then
								pc.remove_item(95002, 1)
								pc.change_gold(1000000000)
							else
								say("Não tens nenhum Cheque contigo.")
							end
						elseif bank == 3 then
							return
						end
					end
				elseif mestre == 2 then
					say("segredo")
				end
			end
		end
	end
end

 

Share this post


Link to post
Share on other sites
  • 0
2 minutos atrás, Tyler Durden disse:

Tenta esta


quest mestre begin
	state start begin
		when 20095.click begin
			local mestre = select("OldEliteMt2 Banco", "Top-Secret", "Fechar") 
				if mestre == 3 then
					return
				end
				if mestre == 1 then
					local bank = select("Pedir Cheque", "Depositar Cheque", "Fechar")    
						if bank == 1 then    
							local cost = 1000000000
							if pc.get_gold() < cost then
								say("Não tens Yang suficiente.")
							else
								pc.give_item2(95002, 1)
								pc.change_gold(-1000000000)
							end
						elseif bank == 2 then
							if pc.count_item(95002) > 0 then
								pc.remove_item(95002, 1)
								pc.change_gold(1000000000)
							else
								say("Não tens nenhum Cheque contigo.")
							end
						elseif bank == 3 then
							return
						end
					end
				elseif mestre == 2 then
					say("segredo")
				end
			end
		end
	end
end

 

nao deu mas obrigado

Share this post


Link to post
Share on other sites
  • 0
1 hora atrás, Tyler Durden disse:

Manda-me o id e a pw por mensagem.

Obrigado tyler pela ajuda e o tempo que tives te me ajudar que foi para ai 1 hora e tal xD obrigado

#CloseRequest

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