Percent mana drain

adamox223

Member
Joined
Oct 21, 2017
Messages
96
Best answers
0
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
 

naprawiamforum

Banned User
Joined
Apr 28, 2019
Messages
124
Best answers
1
Reaction score
42
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
 
OP
A

adamox223

Member
Joined
Oct 21, 2017
Messages
96
Best answers
0
Reaction score
4
each drain (one drain per seconds and this effect is for 10)

one hit: 50% mana (1second)
two hit: 50% mana (2 second) etc :D
 

naprawiamforum

Banned User
Joined
Apr 28, 2019
Messages
124
Best answers
1
Reaction score
42
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
 
OP
A

adamox223

Member
Joined
Oct 21, 2017
Messages
96
Best answers
0
Reaction score
4
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
 

naprawiamforum

Banned User
Joined
Apr 28, 2019
Messages
124
Best answers
1
Reaction score
42
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)
 
OP
A

adamox223

Member
Joined
Oct 21, 2017
Messages
96
Best answers
0
Reaction score
4
I need work this hmm like mana steal from enemy xd

50% current target mana ofc
 
Top