• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Action] Misiones diarias + contador

    Compartir:

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

    1[Action] Misiones diarias + contador Empty [Action] Misiones diarias + contador Dom Sep 22, 2013 11:59 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Descripción:
    El premio puede ser tomado cada 24 horas. La configuración predeterminada es: 1 cc.
    La adición de un contador que muestra el número de veces que se llevó el premio.

    TIP `s:
    * Puede configurar la hora, si usted quiere 5h o no 24;
    * El tiempo no se restablece después de caída del servidor;
    * Contador personalizable;

    instalacion:
    data/actions/actions.xml :

    Código:
    <action actionid="7777" event="script" value="daily.lua"/>

    data/actions/scripts/daily.lua :
    Código:
    function onUse(cid, item, fromPosition, itemEx, toPosition)
    local daysvalue = 1 * 24 * 60 * 60
    local daily = getPlayerStorageValue(cid, 13541)
    if (daily == -1) then
    daily = 0
    end
    if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
    doPlayerAddItem(cid, 2160, 1)
    time = os.time() + daysvalue
    setPlayerStorageValue(cid, 13540, time)
    setPlayerStorageValue(cid, 13541, daily+1)
    local daily = getPlayerStorageValue(cid, 13541)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You done your " .. daily .. " Daily Quest. You got 1 cc.")
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must wait 24 Hours to get your daily quest. Next avaiable will be at: " .. os.date("%H:%M:%S", getPlayerStorageValue(cid, 13540)) .. ".")
    end
    return true
    end


    Creditos 100%
    Regards,
    Fresh.


    Buen script para quest diarias.
    Atte: Like a Star @ heaven  God Maya Like a Star @ heaven



    [Action] Misiones diarias + contador 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).