antiblock
Elveron
  • 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
quest mestre begin
    state start begin
        when 20095.click begin
            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 necessário")
                    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 o item necessário")
                    end
                elseif bank == 3 then
                    return
                end
            else
                return
            end
        end
    end
end

 

Verifica se funciona assim, não vejo nada de errado com a tua lógica para ser sincero, apenas corrigi os tabs para verificar se estava algo de errado.

Share this post


Link to post
Share on other sites
antiblock
https://arwen2.global/
  • 0
1 hora atrás, Cσяvσ⋆ disse:

quest mestre begin
    state start begin
        when 20095.click begin
            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 necessário")
                    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 o item necessário")
                    end
                elseif bank == 3 then
                    return
                end
            else
                return
            end
        end
    end
end

 

Verifica se funciona assim, não vejo nada de errado com a tua lógica para ser sincero, apenas corrigi os tabs para verificar se estava algo de errado.

ta igual

Share this post


Link to post
Share on other sites
  • 0

Existe 4 funções para adicionar/remover yang, estas sendo:
pc.changegold
pc.changemoney
pc.change_gold
pc.change_money

 

Experimenta utilizar o pc.changegold em vez do pc.change_gold, talvez seja disso.

Share this post


Link to post
Share on other sites
  • 0
43 minutos atrás, Cσяvσ⋆ disse:

Existe 4 funções para adicionar/remover yang, estas sendo:
pc.changegold
pc.changemoney
pc.change_gold
pc.change_money

 

Experimenta utilizar o pc.changegold em vez do pc.change_gold, talvez seja disso.

ja mudei e nada continua igual

Share this post


Link to post
Share on other sites
  • 0

Ele faz o quê exatamente? Diz-te sempre que não tens o item?

Share this post


Link to post
Share on other sites
  • 0
2 minutos atrás, Cσяvσ⋆ disse:

Ele faz o quê exatamente? Diz-te sempre que não tens o item?

sim

Share this post


Link to post
Share on other sites
  • 0
if pc.count_item(95002) >= 1 then
	pc.remove_item(95002, 1)
	pc.change_gold(1000000000)
else
	say("Não tens o item necessário")
end

Experimenta assim, não estou mesmo a ver qual é o problema do if a nível de programação, talvez seja mesmo algo do metin.

Share this post


Link to post
Share on other sites
  • 0
if pc.count_item(95002) > 0 then

> 0

Share this post


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

if pc.count_item(95002) > 0 then

> 0

nao funciona

Share this post


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

O erro está aí.

e nao podes corrigir se faz favor

Share this post


Link to post
Share on other sites
  • 0
1 hora atrás, Cσяvσ⋆ disse:

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

Experimenta assim, não estou mesmo a ver qual é o problema do if a nível de programação, talvez seja mesmo algo do metin.

 

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

 

Edited by Dima
UPDATE (see edit history)

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