antiblock
Cyphriun
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
KlepY

Troca De Nome

1 post in this topic

Boas pessoal trago aqui uma quest para troca de nome, traduzida por mim:

 

quest chagne_name begin

    state start begin
        when 71055.use begin
            if pc.is_married() then
                say("Nao podes mudar de nome se estas casado.")
                say("")
                return
            end
 
            if pc.is_polymorphed() then
                say("Nao podes mudar de nome se estiveres transformado.")
                say("")
                return
            end
 
            if pc.has_guild() then
                say("Nao podes mudar de nome se estas numa guild.")
                say("")
                return
            end
 
            if party.is_party() then
                say("Nao podes mudar de nome se estiveres em grupo.")
                say("")
                return
            end
 
            if pc.get_level() < 35 then
                say("Precisas de Nivel 35 para mudar de nome!")
                say("")
                return
            end
 
            if get_time() < pc.getqf("next_time") then
                say("Nao podes usar isto.")
                say("")
 
                if is_test_server() == true then
                    say("Podes alterar o nome.")
                    say("")
                else
                    return
                end
            end
 
            say("Por favor coloca o teu novo nome") ;
 
            local name = pc.name ;
            local str = input() ;
            if string.len(str) > 12 then
                say("Nome muito longo. Tenta novamente.")
                say("")
                return
             
            end
            local ret = pc.change_name(str) ;
 
            if ret == 0 then
                say("Sai da conta.")
                say("Faz relog por favor.")
                say("")
 
                char_log(0, "CHANGE_NAME", "HAVE NOT RE-LOGIN")
            elseif ret == 1 then
                say("Ocorreu um erro.")
                say("Tenta novamente.")
                say("")
             
                char_log(0, "CHANGE_NAME", "ITEM USE PROBLEM")
            elseif ret == 2 then
                say("Nome em uso.")
                say("Tenta outro nome.")
                say("")
 
                char_log(0, "CHANGE_NAME", "CAN NOT USE NAME")
            elseif ret == 3 then
                say("Nao podes usar esse nome ou ja esta em uso.")
                say("Tenta outro nome.")
                say("")
 
                char_log(0, "CHANGE_NAME", "ALREADY USING NAME")
            elseif ret == 4 then
                say("Nome mudado com sucesso.")
                say("Por favor faz relog")
                say("")
 
                item.remove() ;
 
                pc.setqf("next_time", get_time() + time_hour_to_sec(24*15))
 
                char_log(0, "CHANGE_NAME", "SUCCESS: from "..name.." to "..str)
            else
                say("Ocorreu um erro.")
                say("")
 
                char_log(0, "CHANGE_NAME", "UNKNOWN NAME")
            end
        end
    end

end

 

 

 

Créditos: Sinval (forneceu-me a quest)

 

 

 

 

Se te ajudei ou gostaste dá +1 :D

 

 

 

Cumprimentos CroSSie

Share this post


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

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