I made this script,
Anways, as you can see from what I'm attempting to do is create a process that changes the area of damage after it did it once. Could someone please show me the proper way because this is terrible.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.6, 0)
local area = createCombatArea(AREASWORDSPIN)
setCombatArea(combat, area)
function spellCallback(area)
if area.count == 0 then
createCombatArea(AREASWORDSPIN2)
setCombatArea(combat, area)
spin.count = spin.count + 1
end
if area.count == 1 then
createCombatArea(AREASWORDSPIN3)
setCombatArea(combat, area)
spin.count = spin.count + 1
end
if area.count == 3 then
createCombatArea(AREASWORDSPIN4)
setCombatArea(combat, area)
spin.count = spin.count + 1
end
if area.count == 4 then
createCombatArea(AREASWORDSPIN)
setCombatArea(combat, area)
spin.count = spin.count + 1
end
end
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Anways, as you can see from what I'm attempting to do is create a process that changes the area of damage after it did it once. Could someone please show me the proper way because this is terrible.