• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Sistema] Sqm Trainner funciona a la perfeccion.

    Compartir:

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

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Hola usuarios de tibiaface

    Vamos a la carpeta de tu Ot


    data/movement/script


    Creamos un archivo .lua le ponemos como nombre. sqtrainer.lua y le pegamos esto adentro:

    Código:
    -- Config --
    local skillTries = 10 -- Number of tries per skill
    local t = 3 * 1000 -- Set the time before try is added to skills
    local lock = 15 -- Time to wait before start again in seconds

    -- Weapon Types --
    local weaponTypes = {
     { 1, 2 }, -- Sword
     { 2, 1 }, -- Club
     { 3, 3 }, -- Axe
     { 4, 5 }, -- Shield
     { 5, 4 } -- Distance
    }
     
    function onStepIn(cid, item, pos, fromPos)
     local p = {cid = cid, item = item, pos = pos}
     if getPlayerStorageValue(p.cid, 18010) == 2 then
     doTeleportThing(p.cid, fromPos, TRUE)
     doPlayerSendTextMessage(p.cid,22,"You must wait "..lock.." seconds before you start again")
     return false
     end
     setPlayerStorageValue(p.cid, 18010, 1)
     if isPlayer(p.cid) and p.item.actionid == 900 then
     doPlayerSendTextMessage(p.cid,22,"La sesion de entrenamiento comenzara ahora")
     addEvent(trainMe, t, p)
     end
     return true
    end
    function onStepOut(cid, item)
     if getPlayerStorageValue(cid, 18010) == 50000 then
     return false
     end
     setPlayerStorageValue(cid, 18010, 2)
     addEvent(trainLock, lock * 1000, cid)
     doPlayerSendTextMessage(cid,22,"La sesion de entrenamiento ha terminado")
     return true
    end
    function trainLock (cid)
     if isPlayer(cid) then
     setPlayerStorageValue(cid, 18010, 0)
     end
    end
    function trainMe(p)
     if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 and p.item.actionid == 900 then
     local weaponLeft = getPlayerSlotItem(p.cid, CONST_SLOT_LEFT)
     local weaponRight = getPlayerSlotItem(p.cid, CONST_SLOT_RIGHT)
     if weaponLeft.itemid ~= 0 then
     weaponLeft = getItemWeaponType(weaponLeft.uid)
     end
     if weaponRight.itemid ~= 0 then
     weaponRight = getItemWeaponType(weaponRight.uid)
     end
     for _, t in pairs(weaponTypes) do
     if t[1] == weaponLeft or t[1] == weaponRight then
    doPlayerAddSkillTry(p.cid, t[2], skillTries)
     end
     end
     manaspent = getPlayerMana(p.cid)
     doPlayerAddSpentMana(p.cid, manaspent)
     doTargetCombatMana(0, p.cid, -manaspent, -manaspent, CONST_ME_NONE)
     
    doSendMagicEffect(getPlayerPosition(p.cid),34)
     
    addEvent(trainMe, t, p)
     end
     return true
    end

    Y vamos a a Movement.xml: Pegamos lo siguiente en cualquier parte:

    Código:
    <!-- Trainer Square -->
           <movevent type="StepIn" actionid="900" script="sqtrainer.lua"/>
         <movevent type="StepOut" actionid="900" script="sqtrainer.lua"/>

    Ok ahora para hacerlo completo, nos vamos a la carpeta:


    data/createscript/script/Login.lua

    y pegamos lo siguiente y cualquier parte:

    Código:
    setPlayerStorageValue(cid, 18010, 0)

    Ok, vi un post que la gente pedia para editar la rapides de lo que va, tonces vamos a las primeras lineas en la que es:

    Código:
    local t = 3 * 1000 -- Set the time before try is added to skills

    ok en esta parte, lo que pondremos para que valla por segundo, en el numero 3, es los segundos que cuando quitara tu mana, si quieren cambiarle ponganle los segundos que quieran.

    Ahora elegimos cualquier piso y le ponemos como ActionID: 900

    Bueno esto es todo, el training no deveria de salirle ningun error.

    Unas imagenes:

    [Sistema] Sqm Trainner funciona a la perfeccion. 12025746

    El magic level esta agregado, y el ID del piso es : 472 y el ActionID: 900[/color]
    Los cambios que le hice:
    • Le quite los 15 segundos para entrar ahora entraras cuantas veces quieras.
    • Le quite los limited por player ahora son por 100000 veces.
    • Ahora funciona sin ningun error.


    creditos: GODDemulador




    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    [Hacker]

    [Hacker]
    Nuevo Miembro
    Nuevo Miembro
    queen me ayuda a pasar este script a tfs 1.3

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    3[Sistema] Sqm Trainner funciona a la perfeccion. Empty Trainer Sqm Vie Oct 26, 2018 11:20 pm

    [Adm] SevuOT

    [Adm] SevuOT
    Miembro
    Miembro
    Aqui esta el mismo script
    * la unica diferencia es que este esta modificado para que el jugador pueda entrar y salir del trainer en cualquier momento sin delay y sin embargo no produce el bug del skill fast, ya que el evento se guarda en una variable global inmodificable incluso si haces reload!

    Codigo:
    Código:
    -- Config --
    local skillTries = 10 -- Number of tries per skill
    local t = 3 * 1000 -- Set the time before try is added to skills

    -- Weapon Types --
    local weaponTypes = {
     { 1, 2 }, -- Sword
     { 2, 1 }, -- Club
     { 3, 3 }, -- Axe
     { 4, 5 }, -- Shield
     { 5, 4 } -- Distance
    }
     
    if _G["_TrainEvents"] == nil then
       _G["_TrainEvents"] = {}
    end

    function onStepIn(cid, item, pos, fromPos)
        local p = {cid = cid, item = item, pos = pos}
       if isPlayer(p.cid) and p.item.actionid == 900 then
          doPlayerSendTextMessage(p.cid,22,"La sesion de entrenamiento comenzara ahora")
          _TrainEvents[p.cid] = addEvent(trainMe, t, p)
       end
       return true
    end

    function onStepOut(cid, item)
       stopEvent(_TrainEvents[cid])
       doPlayerSendTextMessage(cid,22,"La sesion de entrenamiento ha terminado")
       return true
    end

    function trainMe(p)
       if isPlayer(p.cid) then
          local weaponLeft = getPlayerSlotItem(p.cid, CONST_SLOT_LEFT)
          local weaponRight = getPlayerSlotItem(p.cid, CONST_SLOT_RIGHT)
          if weaponLeft.itemid ~= 0 then
             weaponLeft = getItemWeaponType(weaponLeft.uid)
          end
          if weaponRight.itemid ~= 0 then
             weaponRight = getItemWeaponType(weaponRight.uid)
          end
          for _, t in pairs(weaponTypes) do
             if t[1] == weaponLeft or t[1] == weaponRight then
                doPlayerAddSkillTry(p.cid, t[2], skillTries)
             end
          end
           local manaspent = getPlayerMana(p.cid)
           doPlayerAddSpentMana(p.cid, manaspent)
           doTargetCombatMana(0, p.cid, -manaspent, -manaspent, CONST_ME_NONE)
          doSendMagicEffect(getPlayerPosition(p.cid), 34)
           _TrainEvents[p.cid] = addEvent(trainMe, t, p)
        end
       return true
    end



    Si necesitas hospedaje para tu servidor usa este enlace y mira los buenos planes de Windows y Linux:
    Si tu cuenta de PayPal no esta verificada no importara, igual aceptan pagos con cuentas no verificadas.


    [Sistema] Sqm Trainner funciona a la perfeccion. TRJEB8aSRYK5IulEU6ilJw
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Hacker]

    [Hacker]
    Nuevo Miembro
    Nuevo Miembro
    me tira este error

    Lua Script Error: [MoveEvents Interface]
    data/movements/scripts/sqtrainer.lua:onStepOut
    LuaScriptInterface::luaAddEvent(). Argument #3 is unsafe
    stack traceback:
    [C]: in function 'addEvent'
    data/movements/scripts/sqtrainer.lua:34: in function <data/movements/scr
    ipts/sqtrainer.lua:29>
    [C]: in function 'doTeleportThing'
    data/movements/scripts/sqtrainer.lua:18: in function <data/movements/scr
    ipts/sqtrainer.lua:15>

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Adm] SevuOT

    [Adm] SevuOT
    Miembro
    Miembro
    Debes recordar que este script es para versiones menores como por ejemplo: TFS 0.4

    Nota
    la funcion addEvent no guarda valores inseguros en sus argumentos o parametros. por ello se ejecuta el siguiente error, si usas versiones altas, este script te dara error 100% seguro, a menos de que le hagas pequeñas modificaciones.



    Si necesitas hospedaje para tu servidor usa este enlace y mira los buenos planes de Windows y Linux:
    Si tu cuenta de PayPal no esta verificada no importara, igual aceptan pagos con cuentas no verificadas.


    [Sistema] Sqm Trainner funciona a la perfeccion. TRJEB8aSRYK5IulEU6ilJw
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Hacker]

    [Hacker]
    Nuevo Miembro
    Nuevo Miembro
    que modificacion tengo que hacer??

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Hacker] escribió:que modificacion tengo que hacer??

    recontruir el scripts desde cero



    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    Laura Shne

    Laura Shne
    Nuevo Miembro
    Nuevo Miembro
    y para que solo quite 5 de mana que tentria que modificar

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Laura Shne escribió:y para que solo quite 5 de mana que tentria que modificar


    elimina esto

    Código:
     manaspent = getPlayerMana(p.cid)
     doPlayerAddSpentMana(p.cid, manaspent)

    y modifica esto


    Código:
     doTargetCombatMana(0, p.cid, -5, -5, CONST_ME_NONE)



    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    Laura Shne

    Laura Shne
    Nuevo Miembro
    Nuevo Miembro
    tengo un problema con el magic level sube muy rapido de 1 a 140 es menos de un minuto

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Laura Shne escribió:tengo un problema con el magic level sube muy rapido de 1 a 140 es menos de un minuto



    testea

    Código:

    -- Config --
    local skillTries = 10 -- Number of tries per skill
    local t = 3 * 1000 -- Set the time before try is added to skills

    -- Weapon Types --
    local weaponTypes = {
     { 1, 2 }, -- Sword
     { 2, 1 }, -- Club
     { 3, 3 }, -- Axe
     { 4, 5 }, -- Shield
     { 5, 4 } -- Distance
    }
     
    if _G["_TrainEvents"] == nil then
      _G["_TrainEvents"] = {}
    end

    function onStepIn(cid, item, pos, fromPos)
        local p = {cid = cid, item = item, pos = pos}
      if isPlayer(p.cid) and p.item.actionid == 900 then
          doPlayerSendTextMessage(p.cid,22,"La sesion de entrenamiento comenzara ahora")
          _TrainEvents[p.cid] = addEvent(trainMe, t, p)
      end
      return true
    end

    function onStepOut(cid, item)
      stopEvent(_TrainEvents[cid])
      doPlayerSendTextMessage(cid,22,"La sesion de entrenamiento ha terminado")
      return true
    end

    function trainMe(p)
      if isPlayer(p.cid) then
          local weaponLeft = getPlayerSlotItem(p.cid, CONST_SLOT_LEFT)
          local weaponRight = getPlayerSlotItem(p.cid, CONST_SLOT_RIGHT)
          if weaponLeft.itemid ~= 0 then
            weaponLeft = getItemWeaponType(weaponLeft.uid)
          end
          if weaponRight.itemid ~= 0 then
            weaponRight = getItemWeaponType(weaponRight.uid)
          end
          for _, t in pairs(weaponTypes) do
            if t[1] == weaponLeft or t[1] == weaponRight then
                doPlayerAddSkillTry(p.cid, t[2], skillTries)
            end
          end
          local manaspent = getPlayerMana(cid)

         
          doPlayerAddSpentMana(cid, playerMana)

         
          doTargetCombatMana(0,cid, -manaspent, -manaspent, CONST_ME_NONE)
         
         
          doSendMagicEffect(getPlayerPosition(p.cid), 34)
          _TrainEvents[p.cid] = addEvent(trainMe, t, p)
        end
      return true
    end



    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Laura Shne escribió:tengo un problema con el magic level  sube muy rapido de 1 a 140 es menos de un minuto

    [Tienes que estar registrado y conectado para ver este vínculo]

    este servidor tiene el sistema de sqm training por si lo quiere puede retirarlo d se servidor y colocarlo en el susyo si este no le funciona perfectamente



    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    Frank088

    Frank088
    Miembro
    Miembro
    Amigo me puse a testear el sistema y me da un error, al meter el jugador al sqm siendo druid me sube distance, y siendo paladin me sube magic level, como lo soluciono?

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Frank088 escribió:Amigo me puse a testear el sistema y me da un error, al meter el jugador al sqm siendo druid me sube distance, y siendo paladin me sube magic level, como lo soluciono?


    Código:

    -- Config --
    local skillTries = 10 -- Number of tries per skill
    local t = 5 * 1000 -- Set the time before try is added to skills
    local lock = 0 -- Time to wait before start again in seconds

    -- Weapon Types --
    local weaponTypes = {
    { 1, 2 }, -- Sword
    { 2, 1 }, -- Club
    { 3, 3 }, -- Axe
    { 5, 5 }, -- Shield
    { 4, 4 } -- Distance
    }


    function onStepIn(cid, item, pos, fromPos)
        local p = {cid = cid, item = item, pos = pos}

        setPlayerStorageValue(p.cid, 18010, 1)
        if isPlayer(p.cid) and p.item.actionid == 9094 then
            doPlayerSendTextMessage(p.cid,22,"Your training session will now begin")
            addEvent(trainMe, t, p)
        end
        return true
    end
    function onStepOut(cid, item)
        if getPlayerStorageValue(cid, 18010) == 2 then
            return false
        end
        setPlayerStorageValue(cid, 18010, 2)
        doPlayerSendTextMessage(cid,22,"Your training session has now ended")
        return true
    end
    function trainMe(p)
        if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 and p.item.actionid == 9094 then
            local weaponLeft = getPlayerSlotItem(p.cid, CONST_SLOT_LEFT)
            local weaponRight = getPlayerSlotItem(p.cid, CONST_SLOT_RIGHT)
            if weaponLeft.itemid ~= 0 then
                weaponLeft = getItemWeaponType(weaponLeft.uid)
            end
            if weaponRight.itemid ~= 0 then
                weaponRight = getItemWeaponType(weaponRight.uid)
            end
            for _, t in pairs(weaponTypes) do
                if t[1] == weaponLeft or t[1] == weaponRight then           
                    doPlayerAddSkillTry(p.cid, t[2], skillTries)
                end
            end
            manaspent = getPlayerMana(p.cid)
            doPlayerAddSpentMana(p.cid, manaspent)
            doTargetCombatMana(0, p.cid, -manaspent, -manaspent, CONST_ME_NONE)
            doPlayerAddMana(p.cid, 100)

            doSendMagicEffect(getPlayerPosition(p.cid),30)
       
            addEvent(trainMe, t, p)
        end
        return true
    end 

    prueba



    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    Gatillo

    Gatillo
    Nuevo Miembro
    Nuevo Miembro
    god maya en mi data no hay ninguna carpeta que se llame createscripts, como le hago en este caso hermano?

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Gatillo escribió:god maya en mi data no hay ninguna carpeta que se llame createscripts, como le hago en este caso hermano?

    si en su ot no tiene ni una carpeta llamada asi no podra utilizar el sistema



    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    Gatillo

    Gatillo
    Nuevo Miembro
    Nuevo Miembro
    agregue el sistema sin eso de la carpeta solo agregando el script y el lua hermano, y funciona el script skilea y etc pero tengo un solo problema que es el siguiente:  me paro en el sqm al pasar unos segundo comienza la sesion y el paladin me sube magic level - distance y shielding .. cual es el problema? que el magic level solo sube cuando comienza la session el primer corte de mana sube pero de hay en adelante no sube mas magic level solo queda subiendo la distance y el shiending con el knight me sucede lo mismo. y los DRUID Y SORCERERS solo les sube el shielding NO SUBEN SU MAGIC LEVEL GOD MAYA..... lo que necesito es acomodar ese error para que siga skiliando el magic level junto con la distance y el shielding y los magos druid y sorcerer su ml tambien. en el caso de los magos no sube magic level ni empezando ni en ningun momento .ayudame bro por favor. ocupo ese script

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Gatillo escribió:agregue el sistema sin eso de la carpeta solo agregando el script y el lua hermano, y funciona el script skilea y etc pero tengo un solo problema que es el siguiente:  me paro en el sqm al pasar unos segundo comienza la sesion y el paladin me sube magic level - distance y shielding .. cual es el problema? que el magic level solo sube cuando comienza la session el primer corte de mana sube pero de hay en adelante no sube mas magic level solo queda subiendo la distance y el shiending con el knight me sucede lo mismo. y los DRUID Y SORCERERS solo les sube el shielding NO SUBEN SU MAGIC LEVEL GOD MAYA..... lo que necesito es acomodar ese error para que siga skiliando el magic level junto con la distance y el shielding y los magos druid y sorcerer su ml tambien. en el caso de los magos no sube magic level ni empezando ni en ningun momento .ayudame bro por favor. ocupo ese script


    [Tienes que estar registrado y conectado para ver este vínculo]





    [Sistema] Sqm Trainner funciona a la perfeccion. YNU5B25
    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes
    http://www.tibiaface.com

    mccrater

    mccrater
    Nuevo Miembro
    Nuevo Miembro
    MODIFIQUE EL CÓDIGO PARA QUE NO QUITE MANA Y SUBAN LOS SKILL SIN PROBLEMA TIENES QUE TENER EQUIPADA EL TIPO DE WEAPONS QUE QUIERAS ENTRENAR SALUDOS.

    Código:
    -- Config --
    local skillTries = 10 -- Number of tries per skill
    local t = 3 * 1000 -- Set the time before try is added to skills

    -- Weapon Types --
    local weaponTypes = {
     { 1, 2 }, -- Sword
     { 2, 1 }, -- Club
     { 3, 3 }, -- Axe
     { 4, 5 }, -- Shield
     { 5, 4 } -- Distance
    }
     
    if _G["_TrainEvents"] == nil then
       _G["_TrainEvents"] = {}
    end

    function onStepIn(cid, item, pos, fromPos)
        local p = {cid = cid, item = item, pos = pos}
       if isPlayer(p.cid) and p.item.actionid == 900 then
          doPlayerSendTextMessage(p.cid,22,"La sesion de entrenamiento comenzara ahora")
          _TrainEvents[p.cid] = addEvent(trainMe, t, p)
       end
       return true
    end

    function onStepOut(cid, item)
       stopEvent(_TrainEvents[cid])
       doPlayerSendTextMessage(cid,22,"La sesion de entrenamiento ha terminado")
       return true
    end

    function trainMe(p)
       if isPlayer(p.cid) then
          local weaponLeft = getPlayerSlotItem(p.cid, CONST_SLOT_LEFT)
          local weaponRight = getPlayerSlotItem(p.cid, CONST_SLOT_RIGHT)
          if weaponLeft.itemid ~= 0 then
             weaponLeft = getItemWeaponType(weaponLeft.uid)
          end
          if weaponRight.itemid ~= 0 then
             weaponRight = getItemWeaponType(weaponRight.uid)
          end
          for _, t in pairs(weaponTypes) do
             if t[1] == weaponLeft or t[1] == weaponRight then
                doPlayerAddSkillTry(p.cid, t[2], skillTries)
             end
          end
           local manaspent = getPlayerMana(p.cid)
           doPlayerAddSpentMana(p.cid, manaspent)
           doTargetCombatMana(0, p.cid, -0, -0, CONST_ME_NONE)
          doSendMagicEffect(getPlayerPosition(p.cid), 34)
           _TrainEvents[p.cid] = addEvent(trainMe, t, p)
        end
       return true
    end

    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 participantes

    Contenido patrocinado


    +3
    Laura Shne
    [Adm] SevuOT
    [Hacker]
    7 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).