• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Ayuda] Ayuda

    Compartir:

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

    1Cảnh báo [Ayuda] Ayuda Dom Ago 10, 2014 4:27 pm

    renefelipe

    renefelipe
    Miembro
    Miembro
    Porfavor ayudenme con esto necesito los archivos lua de

    offtrain_login
    offtrain_logout

    ME TIRA ESTOS ERRORES
    VVVVVVVVVVVVVVVVVVVVV

    http://www.subeimagenes.com/img/132-1053214.html

    2 participantes
    http://mortalotserver.sytes.net

    2Cảnh báo Re: [Ayuda] Ayuda Dom Ago 10, 2014 5:02 pm

    Krapula

    Krapula
    Miembro
    Miembro
    Código:
    offline training - login.lua
    function onLogin(cid)
       OfflineTraining_initialize(cid)
       if(OfflineTraining_isTraining(cid)) then
          OfflineTraining_turnOffTraining(cid)
          -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6]
          OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid)))
          -- we remove offline training time [bar in game - 9.6],
          -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia]
          -- got '3  hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time'
          OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid)))
          OfflineTraining_onEndTraining(cid)
       else
          -- offline training time also regenerate when you are offline, but NOT train
          OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid))
       end
       return true
    end

    Ese es el de login que tengo en unos de mis ot reemplazalo a ver, Claro primero haz un respaldo

    offline training - login.lua function onLogin(cid) OfflineTraining_initialize(cid) if(OfflineTraining_isTraining(cid)) then OfflineTraining_turnOffTraining(cid) -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6] OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid))) -- we remove offline training time [bar in game - 9.6], -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia] -- got '3 hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time' OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid))) OfflineTraining_onEndTraining(cid) else -- offline training time also regenerate when you are offline, but NOT train OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid)) end return true end:


    y este es el de logount

    2 participantes
    https://www.facebook.com

    3Cảnh báo Re: [Ayuda] Ayuda Miér Sep 03, 2014 5:14 pm

    renefelipe

    renefelipe
    Miembro
    Miembro
    Gracias me sirvio + :(MG):

    2 participantes
    http://mortalotserver.sytes.net

    Contenido patrocinado


    2 participantes

    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).