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

[0.4] creating a spell with an offset effect.

spyk3z

Theós:Undying
Joined
Jul 23, 2007
Messages
385
Reaction score
90
Location
Home.
My spell effect is screwed up and is moved one sqm to the east, is it possible to center the effect over the target?
 
If anyone is curious as to how to do it.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

function onCastSpell(cid, var)
local pos = getCreaturePosition(getCreatureTarget(cid))
doSendMagicEffect({x = pos.x + 1, y = pos.y, z = pos.z}, 78)
    return doCombat(cid, combat, var)
end
 
Back
Top