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

TFS 0.X Error Script Spell

Enderlop

Banned User
Joined
Jan 10, 2024
Messages
93
Reaction score
16
XML:
[02/04/2024 01:35:06] [Error - Spell Interface]
[02/04/2024 01:35:06] In a timer event called from:
[02/04/2024 01:35:06] data/spells/scripts/attack/samuel333.lua:onCastSpell
[02/04/2024 01:35:06] Description:
[02/04/2024 01:35:06] (luaDoCombat) Combat not found

LUA:
-- =============== COMBAT VARIABLES ===============

local combat12_Brush_2 = createCombatObject()
setCombatParam(combat12_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatParam(combat12_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
setCombatParam(combat12_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatArea(combat12_Brush_2, createCombatArea({
    {1, 0, 1},
    {0, 2, 0},
    {1, 0, 1}
}))
function getDmg_Brush_2(cid, level, maglevel)
    return -1000000, -2000000
end
setCombatCallback(combat12_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")

local dfcombat12_Brush_2 = {CONST_ANI_FLASHARROW, 1, 1, -1, 1, -1, -1, 1, -1}

local combat12_Brush = createCombatObject()
setCombatParam(combat12_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat12_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
setCombatParam(combat12_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatArea(combat12_Brush, createCombatArea({
    {0, 1, 0},
    {1, 2, 1},
    {0, 1, 0}
}))
function getDmg_Brush(cid, level, maglevel)
    return -1000000, -2000000
end
setCombatCallback(combat12_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local dfcombat12_Brush = {CONST_ANI_WHIRLWINDSWORD, 1, 0, -1, 0, 0, 1, 0, -1}

local combat7_Brush_2 = createCombatObject()
setCombatParam(combat7_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatParam(combat7_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
setCombatParam(combat7_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatArea(combat7_Brush_2, createCombatArea({
    {1, 0, 1},
    {0, 2, 0},
    {1, 0, 1}
}))
function getDmg_Brush_2(cid, level, maglevel)
    return -1000000, -2000000
end
setCombatCallback(combat7_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")

local dfcombat7_Brush_2 = {CONST_ANI_FLASHARROW, 1, 1, -1, 1, -1, -1, 1, -1}

local combat5_Brush = createCombatObject()
setCombatParam(combat5_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat5_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
setCombatParam(combat5_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatArea(combat5_Brush, createCombatArea({
    {0, 1, 0},
    {1, 2, 1},
    {0, 1, 0}
}))
function getDmg_Brush(cid, level, maglevel)
    return -1000000, -2000000
end
setCombatCallback(combat5_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local dfcombat5_Brush = {CONST_ANI_WHIRLWINDSWORD, 0, 1, 1, 0, 0, -1, -1, 0}

local combat3_Brush_2 = createCombatObject()
setCombatParam(combat3_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatParam(combat3_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
setCombatParam(combat3_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatArea(combat3_Brush_2, createCombatArea({
    {1, 0, 1},
    {0, 2, 0},
    {1, 0, 1}
}))
function getDmg_Brush_2(cid, level, maglevel)
    return -1000000, -2000000
end
setCombatCallback(combat3_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")

local dfcombat3_Brush_2 = {CONST_ANI_FLASHARROW, 1, 1, -1, 1, -1, -1, 1, -1}

local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WHIRLWINDSWORD)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatArea(combat0_Brush, createCombatArea({
    {0, 1, 0},
    {1, 2, 1},
    {0, 1, 0}
}))
function getDmg_Brush(cid, level, maglevel)
    return -1000000, -2000000
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")

local dfcombat0_Brush = {CONST_ANI_WHIRLWINDSWORD, 0, 1, 0, -1, 1, 0, -1, 0}

-- =============== CORE FUNCTION ===============

local function RunPart(c, cid, var, dirList, dirEmitPos) -- Part
    if (isCreature(cid)) then
        doCombat(cid, c, var)
        if (dirList ~= nil) then -- Emit distance effects
            local i = 2
            while (i < #dirList) do
                doSendDistanceShoot(dirEmitPos, {x = dirEmitPos.x - dirList[i], y = dirEmitPos.y - dirList[i + 1], z = dirEmitPos.z}, dirList[1])
                i = i + 2
            end
        end
    end
end

-- =============== SPELL CAST FUNCTION ===============

function onCastSpell(cid, var)
    local startPos = getCreaturePosition(cid)
    addEvent(RunPart, 1200, combat12_Brush2, cid, var, dfcombat12_Brush2, startPos)
    addEvent(RunPart, 1200, combat12_Brush2, cid, var, dfcombat12_Brush2, startPos)
    addEvent(RunPart, 500, combat7_Brush2, cid, var, dfcombat7_Brush, startPos)
    addEvent(RunPart, 300, combat3_Brush2, cid, var, dfcombat3_Brush2, startPos)
    addEvent(RunPart, 1000, combat3_Brush, cid, var, dfcombat3_Brush, startPos)
    RunPart(combat0_Brush, cid, var, dfcombat0_Brush, startPos)
    return true
end
 

Similar threads

Back
Top