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

Life drain spell possible?

Exiled Pain

Fervid Learner
Joined
Jan 8, 2008
Messages
552
Reaction score
4
Sup, used to have a spell, It used to work fine with TFS 2.10

Now I'm using forgotten SVN Trunk Rev 995
and this same spell its not working like I would like it to(95% sure it has nothing to do with the REV), maybe it worked then cause it was a different function or some strange bug in my favor.. or something and now it doesn’t work like it should... so my question is can this spell work as it says "LIFE DRAIN"?...Cause its working in the DAMAGE IT MAKES, but if a player has MAGIC SHIELD it doesn’t go straight to HP it goes to its mana, and what I want its a spell that goes directly to HP even if they have some sort of MAGIC SHIELD...

Is it do-able spell??
This is what I have:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.2, 0)


local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.2, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, condition)


arr = {
{0, 1, 0},
{1, 3, 1},
{0, 1, 0},
}



arr2 = {
{1, 0, 1},
{0, 0, 0},
{1, 0, 1},
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

local area2 = createCombatArea(arr2)
setCombatArea(combat2, area2)

function onCastSpell(cid, var)
        doCombat(cid, combat, var)
        return doCombat(cid, combat2, var)
end

In advance thanks
 
Back
Top