• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Talkactions] Change sex por premiun days

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1[Talkactions] Change sex por premiun days Empty [Talkactions] Change sex por premiun days Dom Jul 13, 2014 11:18 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Hola usuarios de tibiaface

    Hoy les tarigo el change sex por premiun days bueno es muy simple al ejecutar el comando !trocarsexo el sexo del player sera modificado.

    Instalacion:

    Nos vamos a


    Data/talkactions/scripts

    copiamos cualquier archivo y renombramos por trocarsexo.lua y pegamos esto dentro.

    Código:
    function onSay(cid, words, param, channel)
    local config = {costPremiumDays = 0}
    if(getPlayerSex(cid) >= 2) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode mudar para o mesmo sexo.")
    return TRUE
    end
    if(getPlayerPremiumDays(cid) < config.costPremiumDays) then
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Desculpe, mas voce nao tem dias vip- change sex custa " .. config.costPremiumDays .. " days.")
    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    return TRUE
    end
    if(getPlayerPremiumDays(cid) < 65535) then
    doPlayerAddPremiumDays(cid, -config.costPremiumDays)
    end
    if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
    doPlayerSetSex(cid, PLAYERSEX_MALE)
    else
    doPlayerSetSex(cid, PLAYERSEX_FEMALE)
    end
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce trocou seu sexo e perdeu " .. config.costPremiumDays .. " days of premium time.")
    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
    return TRUE
    end


    Luego añadimos esta tag en:


    data/talkctions/talkactions.xml

    Código:
    <talkaction words="!trocarsexo" script="trocarsexo.lua" />



    y listo



    Créditos:

    Doidin

    Absolute



    [Talkactions] Change sex por premiun days YNU5B25
    http://www.tibiaface.com

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).