I need an exhaust in manarune that will be taken from ('timeBetweenExActions').
TFS 1.2
I need have in config :
-- Item Usage
timeBetweenActions = 0
timeBetweenExActions = 0
but maybe Its possible to add ('timeBetweenExActions') to lua? for manarune.Lua?.
TFS 1.2
I need have in config :
-- Item Usage
timeBetweenActions = 0
timeBetweenExActions = 0
but maybe Its possible to add ('timeBetweenExActions') to lua? for manarune.Lua?.
Lua:local exhaust = Condition(CONDITION_EXHAUST) exhaust:setParameter(CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') + 1000) -- Here you can put your exhaust as you want. ( 1000 means = 1 second ) function onUse(player, item, fromPosition, target, toPosition, isHotkey) local level = player:getLevel() local magLevel = player:getMagicLevel() local min = (level * 1) + (magLevel * 1) -- for every level you heal 1 mana more so if you setup 10 you'll heal for every level 10 mana more / same for magic level. local max = (level * 1) + (magLevel * 1) local mana_add = math.random(min,max) targetPlayer = Player(target) if not targetPlayer then player:sendTextMessage(MESSAGE_INFO_DESCR, "You may only use this on players!") return true end local pos = targetPlayer:getPosition() if player:getCondition(CONDITION_EXHAUST) then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED)) return true end targetPlayer:addMana(mana_add) -- This part allows you to heal with animated text even without source edits or custom client. local spectators = Game.getSpectators(pos, false, false, 13, 13, 7, 7) if #spectators > 0 then for i = 1, #spectators do local spectator = spectators[i] if spectator:isPlayer() then spectator:sendTextMessage(MESSAGE_HEALED, nil, pos, mana_add, TEXTCOLOR_YELLOW) -- <-- There you can change the color as you want. end end end pos:sendMagicEffect(CONST_ME_MAGIC_RED) targetPlayer:addCondition(exhaust) return true end