• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

ManaUh script healing base in %

Sirdonald

Member
Joined
Jan 16, 2012
Messages
119
Reaction score
11
I am looking for manauh what heals % of ur mana and hp because i am using health and mana in 100% values thanks
 
I think this may work for you, what do you think?...

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onCastSpell(creature, variant, isHotkey)
    local hp = p:getMaxHealth() * .25 --This means 25%
    local mp = p:getMaxMana() *.25 -- This means 25%
    p:addHealth(hp)
    p:addMana(mp)
    return combat:execute(creature, variant)
end
 
Just place this on your potions script or do a new script. Up to you.

Code:
local ultimateSpiritRune = --your manauh itemid
if itemId == ultimateSpiritRune then
        min = 550
        max = 750
        if (not isInArray({XX, XX, XX}, target:getVocation():getId()) or target:getLevel() < 250) and not getPlayerFlagValue(player, PlayerFlag_IgnoreSpellCheck) then
            player:say("This rune can only be used by XXXX of level 250 or higher.", TALKTYPE_MONSTER_SAY)
            return true
        end

        if not doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_MAGIC_BLUE) or not doTargetCombatMana(0, target, min, max, CONST_ME_MAGIC_BLUE) then
            return false
        end

        player:addCondition(exhaust)
        target:say("Aaaah...", TALKTYPE_MONSTER_SAY)
end
 
Back
Top