• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Spell Target

mackerel

Well-Known Member
Joined
Apr 26, 2017
Messages
398
Solutions
18
Reaction score
74
How do you make the target spell to hit random locations around the target and the actual target?

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 7)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 5)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.2, 1, -0.3, 1)
function onCastSpell(cid, var)
    addEvent(doCombat, 200, cid, combat, var)
    addEvent(doCombat, 400, cid, combat, var)
    addEvent(doCombat, 600, cid, combat, var)
    return doCombat(cid, combat, var)
end

This one hits 4 times but, unfortunately the same spot :\

Here's one of many possible outcomes I want to achieve, it can even hit twice the same spot as long as it is randomized

gJHXYMu.png
 
Back
Top