warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
I have this spell
And i want to change 2 things
1) change area to this area:
2) make the spell run 3 times, i mean, after call the spell
3 times i mean, the attack runs 3 times each second
Code:
local manaporlevel = 3
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function onGetFormulaValues(cid, level, maglevel)
min = ( (maglevel * 40) * 0.5 ) * -1
max = ( (maglevel * 40) * 1.0 ) * -1
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
if getPlayerMana(cid) >= (getPlayerLevel(cid)*manaporlevel) then
doPlayerAddMana(cid, -(getPlayerLevel(cid)*manaporlevel))
return doCombat(cid, combat, var)
end
return doPlayerSendCancel(cid, "You don't have mana. ["..tostring(getPlayerLevel(cid)*manaporlevel).."]")
end
And i want to change 2 things
1) change area to this area:
2) make the spell run 3 times, i mean, after call the spell
3 times i mean, the attack runs 3 times each second