local combatCross = createCombatObject()
setCombatParam(combatCross, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combatCross, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
local areaCross = {
{0,1,0},
{1,3,1},
{0,1,0}
}
setCombatArea(combatCross, createCombatArea(areaCross))
local combatLine = createCombatObject()
setCombatParam(combatLine, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combatLine, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
local areaLine = {
{1},
{1},
{3},
{1},
{1}
}
setCombatArea(combatLine, createCombatArea(areaLine))
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 5)
local max = (level / 5) + (maglevel * 7)
return -min, -max
end
setCombatCallback(combatCross, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
setCombatCallback(combatLine, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
-- 🔥 FUNCIONES
local function shootCardinal(cid)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
local dirs = {
{x = 0, y = -1},
{x = 0, y = 1},
{x = -1, y = 0},
{x = 1, y = 0}
}
for _, d in ipairs(dirs) do
local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z}
doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH)
addEvent(function()
if isCreature(cid) then
doCombat(cid, combatCross, positionToVariant(toPos))
end
end, 150)
end
end
local function shootDiagonal(cid)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
local dirs = {
{x = -1, y = -1},
{x = 1, y = -1},
{x = -1, y = 1},
{x = 1, y = 1}
}
for _, d in ipairs(dirs) do
local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z}
doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH)
addEvent(function()
if isCreature(cid) then
doCombat(cid, combatCross, positionToVariant(toPos))
end
end, 150)
end
end
local function lineAttack(cid)
if not isCreature(cid) then return end
doCombat(cid, combatLine, numberToVariant(cid))
end
-- ⚔️ SPELL
function onCastSpell(cid, var)
-- 🔹 FASE 1: disparos N S E W
shootCardinal(cid)
-- 🔹 FASE 2: impacto tipo exori en centro
addEvent(function()
if isCreature(cid) then
doCombat(cid, combatCross, var)
end
end, 200)
-- 🔹 FASE 3: línea tipo exori
addEvent(function()
lineAttack(cid)
end, 400)
-- 🔹 FASE 4: diagonales con impacto
addEvent(function()
shootDiagonal(cid)
end, 600)
-- 🔹 FASE 5: otra vez cardinal
addEvent(function()
shootCardinal(cid)
end, 800)
-- 🔹 FASE 6: otra vez diagonales
addEvent(function()
shootDiagonal(cid)
end, 1000)
-- 🔹 FINAL: texto
addEvent(function()
if isCreature(cid) then
doCreatureSay(cid, "¡COMBO FINAL!", TALKTYPE_MONSTER_SAY)
end
end, 1200)
return true
end
local combatCross = Combat()
combatCross:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combatCross:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
local areaCross = {
{0,1,0},
{1,3,1},
{0,1,0}
}
combatCross:setArea(createCombatArea(areaCross))
local combatLine = Combat()
combatLine:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combatLine:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
local areaLine = {
{1},
{1},
{3},
{1},
{1}
}
combatLine:setArea(createCombatArea(areaLine))
local function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 5)
local max = (level / 5) + (maglevel * 7)
return -min, -max
end
combatCross:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combatLine:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
local function shootCardinal(playerId)
local player = Player(playerId)
if not player then return end
local pos = player:getPosition()
local dirs = {
{x = 0, y = -1},
{x = 0, y = 1},
{x = -1, y = 0},
{x = 1, y = 0}
}
for _, d in ipairs(dirs) do
local toPos = Position(pos.x + d.x, pos.y + d.y, pos.z)
pos:sendDistanceEffect(toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(pid, tPos)
local p = Player(pid)
if p then
combatCross:execute(p, Variant(tPos))
end
end, 150, playerId, toPos)
end
end
local function shootDiagonal(playerId)
local player = Player(playerId)
if not player then return end
local pos = player:getPosition()
local dirs = {
{x = -1, y = -1},
{x = 1, y = -1},
{x = -1, y = 1},
{x = 1, y = 1}
}
for _, d in ipairs(dirs) do
local toPos = Position(pos.x + d.x, pos.y + d.y, pos.z)
pos:sendDistanceEffect(toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(pid, tPos)
local p = Player(pid)
if p then
combatCross:execute(p, Variant(tPos))
end
end, 150, playerId, toPos)
end
end
local function lineAttack(playerId)
local player = Player(playerId)
if not player then return end
combatLine:execute(player, Variant(player:getId()))
end
function onCastSpell(player, variant)
shootCardinal(player:getId())
addEvent(function(pid, var)
local p = Player(pid)
if p then
combatCross:execute(p, var)
end
end, 200, player:getId(), variant)
addEvent(lineAttack, 400, player:getId())
addEvent(shootDiagonal, 600, player:getId())
addEvent(shootCardinal, 800, player:getId())
addEvent(shootDiagonal, 1000, player:getId())
addEvent(function(pid)
local p = Player(pid)
if p then
p:say("¡COMBO FINAL!", TALKTYPE_MONSTER_SAY)
end
end, 1200, player:getId())
return true
end
Lua Script Error: [Spell Interface]
(Unknown scriptfile)
attempt to call a nil value
Lua Script Error: [Spell Interface]
(Unknown scriptfile)
attempt to call a nil value
Lua Script Error: [Spell Interface]
(Unknown scriptfile)
attempt to call a nil value
local combatCross = Combat()
combatCross:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combatCross:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combatCross:setFormula(COMBAT_FORMULA_DAMAGE, -100, 0, -150, 0)
local areaCross = {
{0,1,0},
{1,3,1},
{0,1,0}
}
combatCross:setArea(createCombatArea(areaCross))
local combatLine = Combat()
combatLine:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combatLine:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combatLine:setFormula(COMBAT_FORMULA_DAMAGE, -120, 0, -180, 0)
local areaLine = {
{1},
{1},
{3},
{1},
{1}
}
combatLine:setArea(createCombatArea(areaLine))
local function shootCardinal(playerId)
local player = Player(playerId)
if not player then return end
local pos = player:getPosition()
local dirs = {
{x = 0, y = -1},
{x = 0, y = 1},
{x = -1, y = 0},
{x = 1, y = 0}
}
for _, d in ipairs(dirs) do
local toPos = Position(pos.x + d.x, pos.y + d.y, pos.z)
pos:sendDistanceEffect(toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(pid, tPos)
local p = Player(pid)
if p then
combatCross:execute(p, Variant(tPos))
end
end, 150, playerId, toPos)
end
end
local function shootDiagonal(playerId)
local player = Player(playerId)
if not player then return end
local pos = player:getPosition()
local dirs = {
{x = -1, y = -1},
{x = 1, y = -1},
{x = -1, y = 1},
{x = 1, y = 1}
}
for _, d in ipairs(dirs) do
local toPos = Position(pos.x + d.x, pos.y + d.y, pos.z)
pos:sendDistanceEffect(toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(pid, tPos)
local p = Player(pid)
if p then
combatCross:execute(p, Variant(tPos))
end
end, 150, playerId, toPos)
end
end
local function lineAttack(playerId)
local player = Player(playerId)
if not player then return end
combatLine:execute(player, Variant(player))
end
function onCastSpell(player, variant)
shootCardinal(player:getId())
addEvent(function(pid, var)
local p = Player(pid)
if p then
combatCross:execute(p, var)
end
end, 200, player:getId(), variant)
addEvent(lineAttack, 400, player:getId())
addEvent(shootDiagonal, 600, player:getId())
addEvent(shootCardinal, 800, player:getId())
addEvent(shootDiagonal, 1000, player:getId())
addEvent(function(pid)
local p = Player(pid)
if p then
p:say("COMBO FINAL!", TALKTYPE_MONSTER_SAY)
end
end, 1200, player:getId())
return true
end
it crashes the server and its not the same spell but the begining looks the same like in oryginal. worth of taking a o look and try edit to make the oryginal spell. Thank You.Here
LUA:local combatCross = createCombatObject() setCombatParam(combatCross, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatCross, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) local areaCross = { {0,1,0}, {1,3,1}, {0,1,0} } setCombatArea(combatCross, createCombatArea(areaCross)) local combatLine = createCombatObject() setCombatParam(combatLine, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatLine, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) local areaLine = { {1}, {1}, {3}, {1}, {1} } setCombatArea(combatLine, createCombatArea(areaLine)) function onGetFormulaValues(player, level, maglevel) local min = (level / 5) + (maglevel * 5) local max = (level / 5) + (maglevel * 7) return -min, -max end setCombatCallback(combatCross, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") setCombatCallback(combatLine, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") -- 🔥 FUNCIONES local function shootCardinal(cid) if not isCreature(cid) then return end local pos = getCreaturePosition(cid) local dirs = { {x = 0, y = -1}, {x = 0, y = 1}, {x = -1, y = 0}, {x = 1, y = 0} } for _, d in ipairs(dirs) do local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z} doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH) addEvent(function() if isCreature(cid) then doCombat(cid, combatCross, positionToVariant(toPos)) end end, 150) end end local function shootDiagonal(cid) if not isCreature(cid) then return end local pos = getCreaturePosition(cid) local dirs = { {x = -1, y = -1}, {x = 1, y = -1}, {x = -1, y = 1}, {x = 1, y = 1} } for _, d in ipairs(dirs) do local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z} doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH) addEvent(function() if isCreature(cid) then doCombat(cid, combatCross, positionToVariant(toPos)) end end, 150) end end local function lineAttack(cid) if not isCreature(cid) then return end doCombat(cid, combatLine, numberToVariant(cid)) end -- ⚔️ SPELL function onCastSpell(cid, var) -- 🔹 FASE 1: disparos N S E W shootCardinal(cid) -- 🔹 FASE 2: impacto tipo exori en centro addEvent(function() if isCreature(cid) then doCombat(cid, combatCross, var) end end, 200) -- 🔹 FASE 3: línea tipo exori addEvent(function() lineAttack(cid) end, 400) -- 🔹 FASE 4: diagonales con impacto addEvent(function() shootDiagonal(cid) end, 600) -- 🔹 FASE 5: otra vez cardinal addEvent(function() shootCardinal(cid) end, 800) -- 🔹 FASE 6: otra vez diagonales addEvent(function() shootDiagonal(cid) end, 1000) -- 🔹 FINAL: texto addEvent(function() if isCreature(cid) then doCreatureSay(cid, "¡COMBO FINAL!", TALKTYPE_MONSTER_SAY) end end, 1200) return true end
This one is not working. But Thank You. Btw im using an old engine with 8.4 client maybe its not working becouse of that. I think its 0.2 mystic spirit.LUA:local combatCross = Combat() combatCross:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combatCross:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) combatCross:setFormula(COMBAT_FORMULA_DAMAGE, -100, 0, -150, 0) local areaCross = { {0,1,0}, {1,3,1}, {0,1,0} } combatCross:setArea(createCombatArea(areaCross)) local combatLine = Combat() combatLine:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combatLine:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) combatLine:setFormula(COMBAT_FORMULA_DAMAGE, -120, 0, -180, 0) local areaLine = { {1}, {1}, {3}, {1}, {1} } combatLine:setArea(createCombatArea(areaLine)) local function shootCardinal(playerId) local player = Player(playerId) if not player then return end local pos = player:getPosition() local dirs = { {x = 0, y = -1}, {x = 0, y = 1}, {x = -1, y = 0}, {x = 1, y = 0} } for _, d in ipairs(dirs) do local toPos = Position(pos.x + d.x, pos.y + d.y, pos.z) pos:sendDistanceEffect(toPos, CONST_ANI_SUDDENDEATH) addEvent(function(pid, tPos) local p = Player(pid) if p then combatCross:execute(p, Variant(tPos)) end end, 150, playerId, toPos) end end local function shootDiagonal(playerId) local player = Player(playerId) if not player then return end local pos = player:getPosition() local dirs = { {x = -1, y = -1}, {x = 1, y = -1}, {x = -1, y = 1}, {x = 1, y = 1} } for _, d in ipairs(dirs) do local toPos = Position(pos.x + d.x, pos.y + d.y, pos.z) pos:sendDistanceEffect(toPos, CONST_ANI_SUDDENDEATH) addEvent(function(pid, tPos) local p = Player(pid) if p then combatCross:execute(p, Variant(tPos)) end end, 150, playerId, toPos) end end local function lineAttack(playerId) local player = Player(playerId) if not player then return end combatLine:execute(player, Variant(player)) end function onCastSpell(player, variant) shootCardinal(player:getId()) addEvent(function(pid, var) local p = Player(pid) if p then combatCross:execute(p, var) end end, 200, player:getId(), variant) addEvent(lineAttack, 400, player:getId()) addEvent(shootDiagonal, 600, player:getId()) addEvent(shootCardinal, 800, player:getId()) addEvent(shootDiagonal, 1000, player:getId()) addEvent(function(pid) local p = Player(pid) if p then p:say("COMBO FINAL!", TALKTYPE_MONSTER_SAY) end end, 1200, player:getId()) return true end
local combatCross = createCombatObject()
setCombatParam(combatCross, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combatCross, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combatCross, COMBAT_FORMULA_DAMAGE, -100, 0, -150, 0)
local areaCross = {
{0,1,0},
{1,3,1},
{0,1,0}
}
setCombatArea(combatCross, createCombatArea(areaCross))
local combatLine = createCombatObject()
setCombatParam(combatLine, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combatLine, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combatLine, COMBAT_FORMULA_DAMAGE, -120, 0, -180, 0)
local areaLine = {
{1},
{1},
{3},
{1},
{1}
}
setCombatArea(combatLine, createCombatArea(areaLine))
local function doCombatPos(cid, pos, combat)
if not isCreature(cid) then return end
local dummy = doCreateMonster("rat", pos) --invisible monster
if not dummy then return end
doCombat(cid, combat, numberToVariant(dummy))
doRemoveCreature(dummy)
end
local function shootCardinal(cid)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
local dirs = {
{x = 0, y = -1},
{x = 0, y = 1},
{x = -1, y = 0},
{x = 1, y = 0}
}
for _, d in ipairs(dirs) do
local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z}
doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(c, tPos)
if isCreature(c) then
doCombatPos(c, tPos, combatCross)
end
end, 150, cid, toPos)
end
end
local function shootDiagonal(cid)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
local dirs = {
{x = -1, y = -1},
{x = 1, y = -1},
{x = -1, y = 1},
{x = 1, y = 1}
}
for _, d in ipairs(dirs) do
local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z}
doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(c, tPos)
if isCreature(c) then
doCombatPos(c, tPos, combatCross)
end
end, 150, cid, toPos)
end
end
local function lineAttack(cid)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
doCombatPos(cid, pos, combatLine)
end
function onCastSpell(cid, var)
shootCardinal(cid)
addEvent(function(c)
if isCreature(c) then
local pos = getCreaturePosition(c)
doCombatPos(c, pos, combatCross)
end
end, 200, cid)
addEvent(lineAttack, 400, cid)
addEvent(shootDiagonal, 600, cid)
addEvent(shootCardinal, 800, cid)
addEvent(shootDiagonal, 1000, cid)
addEvent(function(c)
if isCreature(c) then
doCreatureSay(c, "COMBO FINAL!", TALKTYPE_MONSTER_SAY)
end
end, 1200, cid)
return true
end
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:07] stack traceback:
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:07] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:07] in a timer event called from:
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:07] stack traceback:
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:07] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:99: in function <data/spells/scripts/custom/calcitro mass.lua:96>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:89: in function <data/spells/scripts/custom/calcitro mass.lua:85>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:08] stack traceback:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:08] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:08] in a timer event called from:
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:08] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:55: in function <data/spells/scripts/custom/calcitro mass.lua:53>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
[23/03/2026 22:48:09] Lua Script Error: [Spell Interface]
[23/03/2026 22:48:09] in a timer event called from:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.luanCastSpell
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: attempt to call global 'doCreateMonster' (a nil value)
[23/03/2026 22:48:09] stack traceback:
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:30: in function 'doCombatPos'
[23/03/2026 22:48:09] data/spells/scripts/custom/calcitro mass.lua:79: in function <data/spells/scripts/custom/calcitro mass.lua:77>
local combatCross = createCombatObject()
setCombatParam(combatCross, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combatCross, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combatCross, COMBAT_FORMULA_DAMAGE, -100, 0, -150, 0)
local areaCross = {
{0,1,0},
{1,3,1},
{0,1,0}
}
setCombatArea(combatCross, createCombatArea(areaCross))
local combatLine = createCombatObject()
setCombatParam(combatLine, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combatLine, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combatLine, COMBAT_FORMULA_DAMAGE, -120, 0, -180, 0)
local areaLine = {
{1},
{1},
{3},
{1},
{1}
}
setCombatArea(combatLine, createCombatArea(areaLine))
local function doCombatPos(cid, pos, combat)
if not isCreature(cid) then return end
local dummy = doSummonCreature("rat", pos)
if not dummy then return end
if isCreature(dummy) then
doCombat(cid, combat, numberToVariant(dummy))
doRemoveCreature(dummy)
end
end
local cardinal = {
{x = 0, y = -1},
{x = 0, y = 1},
{x = -1, y = 0},
{x = 1, y = 0}
}
local diagonal = {
{x = -1, y = -1},
{x = 1, y = -1},
{x = -1, y = 1},
{x = 1, y = 1}
}
local function shoot(cid, dirs)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
for _, d in ipairs(dirs) do
local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z}
doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH)
addEvent(function(c, tPos)
if isCreature(c) then
doCombatPos(c, tPos, combatCross)
end
end, 150, cid, toPos)
end
end
local function lineAttack(cid)
if not isCreature(cid) then return end
local pos = getCreaturePosition(cid)
doCombatPos(cid, pos, combatLine)
end
function onCastSpell(cid, var)
shoot(cid, cardinal)
addEvent(function(c)
if isCreature(c) then
local pos = getCreaturePosition(c)
doCombatPos(c, pos, combatCross)
end
end, 200, cid)
addEvent(lineAttack, 400, cid)
addEvent(shoot, 600, cid, diagonal)
addEvent(shoot, 800, cid, cardinal)
addEvent(shoot, 1000, cid, diagonal)
addEvent(function(c)
if isCreature(c) then
doCreatureSay(c, "COMBO FINAL!", TALKTYPE_MONSTER_SAY)
end
end, 1200, cid)
return true
end
still crashing the otsLUA:local combatCross = createCombatObject() setCombatParam(combatCross, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatCross, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatFormula(combatCross, COMBAT_FORMULA_DAMAGE, -100, 0, -150, 0) local areaCross = { {0,1,0}, {1,3,1}, {0,1,0} } setCombatArea(combatCross, createCombatArea(areaCross)) local combatLine = createCombatObject() setCombatParam(combatLine, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatLine, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatFormula(combatLine, COMBAT_FORMULA_DAMAGE, -120, 0, -180, 0) local areaLine = { {1}, {1}, {3}, {1}, {1} } setCombatArea(combatLine, createCombatArea(areaLine)) local function doCombatPos(cid, pos, combat) if not isCreature(cid) then return end local dummy = doSummonCreature("rat", pos) if not dummy then return end if isCreature(dummy) then doCombat(cid, combat, numberToVariant(dummy)) doRemoveCreature(dummy) end end local cardinal = { {x = 0, y = -1}, {x = 0, y = 1}, {x = -1, y = 0}, {x = 1, y = 0} } local diagonal = { {x = -1, y = -1}, {x = 1, y = -1}, {x = -1, y = 1}, {x = 1, y = 1} } local function shoot(cid, dirs) if not isCreature(cid) then return end local pos = getCreaturePosition(cid) for _, d in ipairs(dirs) do local toPos = {x = pos.x + d.x, y = pos.y + d.y, z = pos.z} doSendDistanceShoot(pos, toPos, CONST_ANI_SUDDENDEATH) addEvent(function(c, tPos) if isCreature(c) then doCombatPos(c, tPos, combatCross) end end, 150, cid, toPos) end end local function lineAttack(cid) if not isCreature(cid) then return end local pos = getCreaturePosition(cid) doCombatPos(cid, pos, combatLine) end function onCastSpell(cid, var) shoot(cid, cardinal) addEvent(function(c) if isCreature(c) then local pos = getCreaturePosition(c) doCombatPos(c, pos, combatCross) end end, 200, cid) addEvent(lineAttack, 400, cid) addEvent(shoot, 600, cid, diagonal) addEvent(shoot, 800, cid, cardinal) addEvent(shoot, 1000, cid, diagonal) addEvent(function(c) if isCreature(c) then doCreatureSay(c, "COMBO FINAL!", TALKTYPE_MONSTER_SAY) end end, 1200, cid) return true end
local combat1 = createCombatObject()
local combat2 = createCombatObject()
for _, combat in ipairs({combat1, combat2}) do
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_LARGEROCK)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, TRUE)
-- spellcaster do not take damage
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, FALSE)
-- damage based on lvl
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, 0, -2.0, 0)
end
-- areas (it damage at "1" squares) and it throws few parts of this combination
local area1 = {
{0,1,0},
{1,3,1},
{0,1,0}
}
local area2 = {
{1,0,1},
{0,3,0},
{1,0,1}
}
setCombatArea(combat1, createCombatArea(area1))
setCombatArea(combat2, createCombatArea(area2))
-- animations (Large + small stones)
local function sendRocks(cid, area)
local pos = getCreaturePosition(cid)
for x = -1, 1 do
for y = -1, 1 do
local value = area[y + 2][x + 2]
-- pomijamy środek
if value ~= 3 then
local toPos = {
x = pos.x + x,
y = pos.y + y,
z = pos.z
}
if value == 1 then
-- big rock = damage
doSendDistanceShoot(pos, toPos, CONST_ANI_LARGEROCK)
else
-- small rock = only animation
doSendDistanceShoot(pos, toPos, CONST_ANI_SMALLSTONE)
end
end
end
end
end
-- 7 series of that combo so the
local sequence = {
{combat1, area1},
{combat2, area2},
{combat1, area1},
{combat2, area2},
{combat1, area1},
{combat2, area2},
{combat1, area1}
}
local function castWave(parameters)
if isCreature(parameters.cid) then
local data = sequence[parameters.step + 1]
-- animations
sendRocks(parameters.cid, data[2])
-- damage
doCombat(parameters.cid, data[1], parameters.var)
end
end
function onCastSpell(cid, var)
for i = 0, 6 do
addEvent(castWave, i * 250, { cid = cid, var = var, step = i })
end
return TRUE
end