Cornwallis
Member
- Joined
- Jan 3, 2010
- Messages
- 480
- Reaction score
- 16
Well I've been redoing a lot of my spells this way, honestly idk why, easier to use i suppose. WARNING: if you plan to use this spell file format, it does not work with bonuses such as utito tempo, or equipment bonuses, there's ways around the equipment bonuses. ( check slot item ) But I'm not 100% sure how to use this function, let me know where it's wrong.
PHP:
function onCastSpell(cid, var)
local lvl = getPlayerLevel(cid)
local dmgMax = ((lvl * 5))
local dmgMin = ((dmgMax*0.90))
ret = doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getCreaturePosition(cid), AREA_SMALLSHIELD, -dmgMin, -dmgMax, CONST_ME_GROUNDSHAKER)
return ret
end