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

Need help with spell effect

Mezara

Member
Joined
Dec 25, 2013
Messages
68
Reaction score
6
I used the spell generator program to make this spell:
Code:
-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatArea(combat0_Brush,createCombatArea({{0, 1, 0},
{1, 2, 0},
{0, 0, 1}}))
function getDmg_Brush(cid, level, maglevel)
    return (10)*-1,(20)*-1 
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_SMALLHOLY,-1,-1,0,1,1,0}

-- =============== 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(cid, var)
    local startPos = getCreaturePosition(cid)
    RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
    return true
end

I was wondering how I could make the distance effects to shoot from the area and onto me? Right now it does the opposite!

rgTEsEnsU.gif


Here's a GIF of how it is now, I want the holy effects to shoot towards me instead! :) Thanks!
 
thanks evan uare truly a god :p
I knew it was something like that but i'm way too dumb :D

edit: Actually I still quite dont get it but I will try!
 
Back
Top