• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Pedido] scripts de Runas: (hp, mana, great) 13.20 (otservbr)

    Compartir:

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

    3zequi3l

    3zequi3l
    Miembro
    Miembro
    saludos, alguien me puede ayudar con estos scripts de Runas (hp, mana, great) 13.20 (otservbr)
    ☺♥ de antemano muchas gracias
    (ESPERO QUE CUANDO PASEN LOS SCRIPTS A OTRAS PERSONAS LES SIRVA TAMBIEN, COMO ME SERVIRA A MI)
    ♥



    (OJO)
    REVSCRIPT

    2 participantes

    SoyFabi

    SoyFabi
    Miembro
    Miembro
    Como exactamente? el otservbr no trae ya todo eso men?  [Pedido] scripts de Runas: (hp, mana, great) 13.20 (otservbr) 1f611

    De igual manera te comparto lo que uso para las potions con su exhausted

    Código:
    local exhaust = {}
    local potions = {
     -- Mana Potion --
     [268] = {vocations = {1,2,3,4,5,6,7,8}, exhaustTime = 700, manaMin = 120, manaMax = 220, healthMin = 0, healthMax = 0, flask = 285},
     -- Strong Mana Potion --
     [237] = {vocations = {1,2,3,5,6,7}, exhaustTime = 700, manaMin = 275, manaMax = 325, healthMin = 0, healthMax = 0, flask = 283},
     -- Great Mana Potion --
     [238] = {vocations = {1,2,5,6}, exhaustTime = 700, manaMin = 385, manaMax = 455, healthMin = 0, healthMax = 0, flask = 284},
     -- Ultimate Mana Potion --
     [23373] = {vocations = {1,2,5,6}, exhaustTime = 700, manaMin = 455, manaMax = 520, healthMin = 0, healthMax = 0, flask = 284},
     -- Health Potion --
     [266] = {vocations = {1,2,3,4,5,6,7,8}, exhaustTime = 700, manaMin = 0, manaMax = 0, healthMin = 80, healthMax = 130, flask = 285},
     -- Strong Health Potion --
     [236] = {vocations = {3,4,7,8}, exhaustTime = 700, manaMin = 0, manaMax = 0, healthMin = 245, healthMax = 325, flask = 283},
     -- Great Health Potion --
     [239] = {vocations = {4,8}, exhaustTime = 700, manaMin = 0, manaMax = 0, healthMin = 360, healthMax = 410, flask = 284},
     -- Ultimate Health Potion --
     [7643] = {vocations = {4,8}, exhaustTime = 700, manaMin = 0, manaMax = 0, healthMin = 455, healthMax = 530, flask = 284},
     -- Supreme Health Potion --
     [23375] = {vocations = {4,8}, exhaustTime = 700, manaMin = 0, manaMax = 0, healthMin = 530, healthMax = 620, flask = 284},
     -- Great Spirit Potion --
     [7642] = {vocations = {3,7}, exhaustTime = 700, manaMin = 280, manaMax = 315, healthMin = 390, healthMax = 480, flask = 284},
     -- Ultimate Spirit Potion --
     [23374] = {vocations = {3,7}, exhaustTime = 700, manaMin = 300, manaMax = 350, healthMin = 415, healthMax = 520, flask = 284},
    }

    ---- Potions ---
    local mana_potion = Action()
    function mana_potion.onUse(cid, item, fromPosition, target, toPosition, isHotkey)
     
     local player = Player(cid)
     local playerId = player:getId()
     local currentTime = os.mtime()
     
     if exhaust[playerId] and exhaust[playerId] > currentTime then
     player:sendCancelMessage("Your potions are still on cooldown. (MS:" .. exhaust[playerId] - currentTime .. ")")
     return true
     end
     
     local potion = potions[item:getId()]
     
     if not isInArray(potion.vocations, getPlayerVocation(cid)) then
     player:say("You are not the necessary vocation to use this potion.")
     return true
     end
     
     targetPlayer = Player(target)
     if not targetPlayer then
     player:sendTextMessage(MESSAGE_INFO_DESCR, "You may only use this on players!")
     return true
     end
     
     if potion.healthMin > 0 then
     local health_add = math.random(potion.healthMin, potion.healthMax)
     targetPlayer:addHealth(health_add)
     targetPlayer:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
     end
     
     if potion.manaMin > 0 then
     local mana_add = math.random(potion.manaMin, potion.manaMax)
     targetPlayer:addMana(mana_add)
     targetPlayer:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
     end
     
     exhaust[playerId] = currentTime + potion.exhaustTime
     
     if not configManager.getBoolean(configKeys.REMOVE_POTION_CHARGES) then
     return true
     end
     
     item:remove(1)
     return true
    end

    for itemId, _ in pairs(potions) do
     mana_potion:id(itemId)
    end
    mana_potion:register()

    2 participantes

    3zequi3l

    3zequi3l
    Miembro
    Miembro
    Muchisimas gracias, es para un nuevo server, 13.20 (tipo baiak)
    ♥

    2 participantes

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