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

Spell with Error tfs 1.2


New Member
Feb 27, 2011
Best answers
Reaction score
local config ={
cooldown = 120, -- tempo entre uma magia e outra
storage = 19330,
tempo = 250, --- tempo que vai durar a spell
percent = 35, -- quanto % vai aumentar hp
percent2 = 60, -- quanto % vai aumentar mana
hp = 35000, -- quanto de hp ganha a cada intervalo
mana = 50000, -- quanto de mana ganha a cada intervalo
intervalo = 2,  --- intervalo que leva pra recuperar X de mana
ml = 30, -- quantos ira aumentar o skill de ML
sword = 0, -- quantos ira aumentar o skill de Sword
shield = 100 -- quantos ira aumentar o skill de Shield

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, config.tempo*1000)
setConditionFormula(speed, 0.8, 72, 0.8, 72)
setCombatCondition(combat, speed)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANAPERCENT, 100+config.percent2)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 100+config.percent)
setConditionParam(condition, CONDITION_PARAM_STAT_PROTECTIONALL, 100)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, config.ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, config.sword)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, config.shield)
setCombatCondition(combat, condition)

function onCastSpell(cid, var) 
if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then 
for i = 1, config.tempo do 
if isPlayer(cid) then 
local pos = getPlayerPosition(cid) 
doCreatureAddHealth(cid, config.hp)
end, 1000*i) 
setPlayerStorageValue(cid, config.storage, os.time()) 
       setPlayerStorageValue(cid, config.storage, os.time()+config.cooldown)
   doPlayerSendTextMessage(cid, 19, "DarkLord Buff: Heal 35k HP e 50k MANA em 2s / 35% a mais HP 60% a mais de MANA / Magic: +30 e Def: +100 / Tempo: 5min") 
   return doCombat(cid, combat, var)
doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") 
return true

I have this script, when i use works fine, but if i logout my TFS CLOSE, and no show error.