Jump to content

Recommended Posts

Posted
image-1.png

quest cambio_nombre begin
state start begin
when item que desea usar.use begin
if pc.is_married() then
say("Usted no puede cambiarse su nombre si está casado.")
say("")
return
end

if pc.is_polymorphed() then
say("Usted no puede cambiar su nombre si está transformado.")
say("")
return
end

if pc.has_guild() then
say("Usted no puede cambiar su nombre si está en un gremio. ")
say("")
return
end

if party.is_party() then
say("Usted no puede cambiar su nombre si está en grupo.")
say("")
return
end

if pc.get_level() < 35 then
say("Necesitas ser nivel 35 o mas para cambiar tu nombre!")
say("")
return
end

if get_time() < pc.getqf("next_time") then
say("No puede utilizarce ahora.")
say("")

if is_test_server() == true then
say("Puede irse")
say("")
else
return
end
end

say("Introdusca su nombre nuevo") ;

local name = pc.name ;
local str = input() ;
if string.len(str) > 16 then
say("El nombre es demasiado largo, intentelo de nuevo.")
say("")
return

end
local ret = pc.change_name(str) ;

if ret == 0 then
say("Debe relogear despues de cambiar su nombre.")
say("please re-log in.")
say("")

char_log(0, "CHANGE_NAME", "HAVE NOT RE-LOGIN")
elseif ret == 1 then
say("Ha ocurrido un problema.")
say("Por favor uselo de nuevo.")
say("")

char_log(0, "CHANGE_NAME", "ITEM USE PROBLEM")
elseif ret == 2 then
say("Este nombre no está disponible.")
say("Por favor ingrese otro nombre.")
say("")

char_log(0, "CHANGE_NAME", "CAN NOT USE NAME")
elseif ret == 3 then
say("Este nombre no está disponible.")
say("Por favor ingrese otro nombre.")
say("")

char_log(0, "CHANGE_NAME", "ALREADY USING NAME")
elseif ret == 4 then
say("Ha cambiado su nombre con exito.")
say("Por favor, inicie sesión de nuevo.")
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("Error desconocido.")
say("")

char_log(0, "CHANGE_NAME", "UNKNOWN NAME")
end
end
end
end

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies to enhance your browsing experience and provide relevant content. By continuing to browse, you agree to our We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. and Terms of Use. For more information on how we protect your data, please check our Privacy Policy.