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

[Help] Very Simple Spells Issue.

tabz23

New Member
Joined
Sep 3, 2009
Messages
66
Reaction score
0
Hi, i know this is going to be a VERY noobish question but im sure i can get a quick simple answer :D

in my spells scripts there is usually the
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 10, 10, 10, 10) formula...


is there something to replace it with so that i can simply put it to do strict amounts of damage or healing? like a math.random?

like

sethealingformula(combat, math.random(50,100)) or something like that? can someone give me an example with exura or something please? =] thank you!

EDIT!: can someone help me do it now, to do strict amount of damage? the healing worked perfectly but now i want the damage done like 50-100 random number of those to hit the target... thanks!
 
Last edited:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
	doCreatureAddHealth(cid, math.random(50, 100))
	return doCombat(cid, combat, var)
end
 
thanks! repped you, worked perfectly... and as for dealing damage?
lol sorry for the nubness...

i want it to deal strict amounts of damage also... can someone help?
 
Back
Top