Arn
Member
- Joined
- Mar 8, 2010
- Messages
- 282
- Reaction score
- 18
Like the title says, I'm trying to make a simple spell that gives me haste (got that working), and costs 50 hp to the player using it. So far, the functions I've tried, haven't worked.
Please help.
Thank you for your time,
-Arn
EDIT: I have the damage part working now, I just want want it to show "50" in red text on the character when the damage is done.
the sendAnimatedText function is depricated on my server btw.
Last Edit:
Fixed it myself. Heres the code if anyone is wondering.
Please help.
Thank you for your time,
-Arn
EDIT: I have the damage part working now, I just want want it to show "50" in red text on the character when the damage is done.
the sendAnimatedText function is depricated on my server btw.
Last Edit:
Fixed it myself. Heres the code if anyone is wondering.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, -50, -50, -50, -50)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -50, -50, CONST_ME_MAGIC_BLUE)
return doCombat(cid, combat, var)
end
Last edited: