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

Percent mana drain

adamox223

New Member
Joined
Oct 21, 2017
Messages
98
Reaction score
4
Hello i have this script - what i need? i need add to this script drain in percent (50% mana drain from target per second for 10sec) can you help me?
Code:
-- Damage Configuration
local MIN = 200
local MAX = 300

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.4, -MIN, -0.4, -MAX)

function onCastSpell(cid, var)
        return doCombat(cid, combat, var)
end
 
you want to make condition then? so player can mana drain for 50% of his damages? or on top of total dmg + mana drain
question is whos on the condition for 10 second
 
so you want player to have condition upon casting spell? or you want this spell to deal damage and mana drain like ticks on the other hero
 
i want to do this, when player A use on X player spell then player X have 50% mana drain per seconds and effects work 10s
sorry for bad eng :D
 
so you want any damage dealt to the player X give you 50% of mana drain of your damage
You want to make this spell a condition on player A
that uses ticks (best is to create or enchant an item with it i guess? like weapon)
 
Back
Top