Known ultimate manarune from highexp
Lua:
local manarune = Action()
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
exhaust:setParameter(CONDITION_PARAM_TICKS, 500)
local cooldown = Condition(CONDITION_SPELLGROUPCOOLDOWN) -- Can be removed if you use CIP client or if you don't have the function
cooldown:setParameter(CONDITION_PARAM_TICKS, 500) -- Can be removed if you use CIP client or if you don't have the function
cooldown:setParameter(CONDITION_PARAM_SUBID, 2) -- Can be removed if you use CIP client or if you don't have the function
local effect = CONST_ME_HOLYAREA -- Effect middle
local distanceEffect = CONST_ANI_HOLY -- Effect around player
local healAmount = math.random(500000000,550000000) -- Healing
function manarune.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local targetPlayer = Player(target)
if not targetPlayer then
player:sendTextMessage(MESSAGE_INFO_DESCR, "You may only use this on players!")
return true
end
local foundCondition = player:getCondition(CONDITION_EXHAUST_HEAL)
if foundCondition and foundCondition:getEndTime() > os.mtime() then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'you are exhausted.')
return true
end
local pos = targetPlayer:getPosition()
player:addCondition(exhaust)
player:addCondition(cooldown) -- Can be removed if you use CIP client or if you don't have the function
player:addMana(healAmount)
player:addHealth(healAmount)
pos:sendMagicEffect(effect)
Position(pos.x+2, pos.y+2, pos.z):sendDistanceEffect(pos, distanceEffect)
Position(pos.x+2, pos.y-2, pos.z):sendDistanceEffect(pos, distanceEffect)
Position(pos.x-2, pos.y-2, pos.z):sendDistanceEffect(pos, distanceEffect)
Position(pos.x-2, pos.y+2, pos.z):sendDistanceEffect(pos, distanceEffect)
Game.sendAnimatedText(''..math.floor(healAmount)..'', pos, 210)
return true
end
manarune:id(2297)
manarune:allowFarUse(true)
manarune:register()