• 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!

Distance effects on spells help

N e r o n Z

Banned User
Joined
Jul 12, 2016
Messages
308
Reaction score
81
Can someone help me to put on the spell distance effect? it doenst work somehow.. here

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 
In xml:
Code:
needtarget="1"
Paste spell's things from xml please

For distance effects, check data/lib/constant.lua
 
You may miss some infos in your constant.

Spells with:
Code:
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
will have NO distance effect if they don't need a target or direction in xml. This is basics.
 
Back
Top