• 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!

TFS 1.3+ Health/Mana buff spell

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,076
Solutions
15
Reaction score
370
Location
Sweden
YouTube
Joriku
Hi,
Since I was hosting a PvP based server. Here's a way of buffing the player's health/mana for X amount of time (Configured).
The script below will allow the player to buff their health if the vocation is a RP. The spell buffs the paladin's health with 319% and 207% mana.
The spell can be spammed, however. It costs the same heavy amount of mana to use and it draws your health back to your old max health/mana to avoid any abuse of it.

This spell will print out a buff image onto the ground of the player using the ID 234. You might want to change that to avoid any crashes since that was a custom spell effect for my server.

Lua:
local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 319)
condition:setParameter(CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 207)
condition:setParameter(CONDITION_PARAM_TICKS, 24 * 60 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_SUBID, 4)
condition:setParameter(CONDITION_PARAM_BUFF, true)

local spell = Spell("instant")
function spell.onCastSpell(creature, variant)
    creature:addCondition(condition)
    creature:getPosition():sendMagicEffect(234)
    return true
end

spell:name("Mana and life increase Paladin")
spell:words("utamo strong")
spell:group("support")
spell:vocation("Royal Paladin")
spell:cooldown(1 * 1000)
spell:groupCooldown(1 * 1000)
spell:level(100)
spell:id(125)
spell:manaPercent(15)
spell:isAggressive(false)
spell:isSelfTarget(true)
spell:isPremium(false)
spell:needLearn(false)
spell:register()
 
Back
Top