ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
How do I get a return on how much a rune's damage did? As in the light magic missile script
If I want to, say, set a storage value for the LMM doing at least 75 damage, would I add
?
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, -10, 5, 5, 0.6, 1, -10, -20)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
If I want to, say, set a storage value for the LMM doing at least 75 damage, would I add
LUA:
if return >= 75 then
doPlayerSetStorageValue(cid, 1001, 1)
end