Hello
I would like to release this script
This manarune allows you to heal with animated text without using custom client or doing source edits
You can use this manarune aswell on other players
( Manarune healing depends on level and magic level )
This script has been tested on TFS 1.3 and should work without any big problem
I would like to release this script
This manarune allows you to heal with animated text without using custom client or doing source edits
You can use this manarune aswell on other players
( Manarune healing depends on level and magic level )
This script has been tested on TFS 1.3 and should work without any big problem
Lua:
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
exhaust:setParameter(CONDITION_PARAM_TICKS, 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_HEAL) 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(50) -- Here you can change your effect as you want.
targetPlayer:addCondition(exhaust)
return true
end