When this spell is been shot it leavs a mark behind you if you run only if you run if you stand still and spammes it no problem but when you run and shot it becomes a hole behind you where you are suppost to stand.
How do i fix the whole behind me or the spot that i am standing? Only when im using distanc effect i get this problem with a small delay on the shot.
The spell:
How do i fix the whole behind me or the spot that i am standing? Only when im using distanc effect i get this problem with a small delay on the shot.
The spell:
LUA:
local formula, distEffect, area, dmgtype, effect, combat = {
[1] = {-34.9, -4, -34.2, -700},
[2] = {-24.8, -7, -3.79, -400},
[3] = {-24.7, -5, -3.24, -200},
[4] = {-24.7, -5, -3.24, -200}
},
{
[1] = CONST_ANI_DEATH,
[2] = CONST_ANI_DEATH,
[3] = CONST_ANI_DEATH,
[4] = CONST_ANI_DEATH
},
{
[1]={
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
[2]={
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{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
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
},
{
[1] = COMBAT_PHYSICALDAMAGE,
[2] = COMBAT_PHYSICALDAMAGE,
[3] = COMBAT_PHYSICALDAMAGE,
[3] = COMBAT_PHYSICALDAMAGE
},
{
[1] = CONST_ME_MORTAREA,
[2] = CONST_ME_GROUNDSHAKER,
[3] = CONST_ME_YELLOWENERGY,
[4] = CONST_ME_PURPLEENERGY
},
{}
for i = 1, #formula do
table.insert(combat, createCombatObject())
setCombatParam(combat[i], COMBAT_PARAM_TYPE, dmgtype[i])
setCombatParam(combat[i], COMBAT_PARAM_EFFECT, effect[i])
setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, distEffect[i] or CONST_ANI_NONE)
setCombatFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, formula[i][1], formula[i][2], formula[i][3], formula[i][4])
setCombatArea(combat[i], createCombatArea(area[i]))
end
function onCastSpell(cid, var)
for i = 1, #formula do
addEvent(function(cid, combat, var) if isPlayer(cid) == TRUE then doCombat(cid, combat, var) end end, i * 100 + 100, cid, combat[i], var)
end
return TRUE
end
Last edited: