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

Rune doesn't heal

DreadShi

Member
Joined
May 18, 2019
Messages
180
Reaction score
7
i have an issue with manarune script it just showing effects without any healing action
Code:
setCombatArea(combat2_Brush_2,createCombatArea({{0, 1, 0},
{1, 2, 1},
{0, 1, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (2000),(3000)
end
setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat2_Brush_2 = {CONST_ANI_SMALLICE,0,1,-1,0,1,0,0,-1}

-- Areas/Combat for 100ms
local combat1_Brush = createCombatObject()
setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatArea(combat1_Brush,createCombatArea({{0, 1, 0},
{1, 2, 1},
{0, 1, 0}}))
function getDmg_Brush(cid, level, maglevel)
    return (5000),(7000)
end
setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat1_Brush = {CONST_ANI_ENERGYBALL,-1,0,0,-1,0,1,1,0}

-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatArea(combat0_Brush,createCombatArea({{0, 1, 0},
{1, 2, 1},
{0, 1, 0}}))
function getDmg_Brush(cid, level, maglevel)
    return (5000),(7000)
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_ENERGYBALL,-1,0,1,0,0,1,0,-1}

-- Areas/Combat for 300ms
local combat3_Brush_2 = createCombatObject()
setCombatParam(combat3_Brush_2, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatArea(combat3_Brush_2,createCombatArea({{0, 1, 0},
{1, 2, 1},
{0, 1, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
    return (2000),(3000)
end
setCombatCallback(combat3_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat3_Brush_2 = {CONST_ANI_SMALLICE,0,1,-1,0,1,0,0,-1}

-- =============== CORE FUNCTIONS ===============
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

function onCastSpell(creature, var)
local cid = creature:getId()
    local startPos = getCreaturePosition(cid)
    addEvent(RunPart,200,combat2_Brush_2,cid,var,dfcombat2_Brush_2,startPos)
    addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)
    RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
    addEvent(RunPart,300,combat3_Brush_2,cid,var,dfcombat3_Brush_2,startPos)
    return true
end
 
Solution
[Warning - CallBack::loadCallBack] Event onRavioliRavioli not found.
[Warning - CallBack::loadCallBack] Event onRavioliRavioli2 not found.
[Warning - Event::checkScript] Event onCastSpell not found. scripts/energyballs.lua
[Warning - CallBack::loadCallBack] Event onRavioliRavioli not found.
[Warning - CallBack::loadCallBack] Event onRavioliRavioli2 not found.
[Warning - Event::checkScript] Event onCastSpell not found. scripts/healing/donatormana.lua

Ok, I take it you are registering this through the spells.xml file? In that case we don't need to create a spell object. It's looking for a raw onCastSpell, because everything is already is created and set when the XML is read.

I'm not sure why it's having a problem with the...
At this point, I'll have to actually fire up a copy of TFS myself to figure that out. I haven't actually played any OTs since ~2013. Right now I'm just getting used to the codebase again 😅 I helped you with this port by sheer amount of programming experience.
 
Back
Top