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

spell creator distance effect

Sweetlove

Member
Joined
Jun 22, 2009
Messages
270
Reaction score
14
Location
Sverige
Hey!

im using speall creator by Yoshi which is an amazing program, i really love it.. made spells both fun and easy as he said it would be.. i do however need one thing sorted out and that's why i turned to the ppl of otland ^^

When you open a brush and pick " distance effect " for an aoe spell the effects goes through anything, the aoe effect does not show inside pz etc or on the other side of walls.. but the distance effect does, ive posted the script below just incase theres something simple that has to be changed..

best regards

XKpYXjj.png




Code:
-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush_8 = createCombatObject()
setCombatParam(combat0_Brush_8, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat0_Brush_8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush_8,createCombatArea({{1, 1, 1, 1, 1, 1, 1, 1},
{1, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 2, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 1},
{1, 1, 1, 1, 1, 1, 1, 1}}))
function getDmg_Brush_8(cid, level, maglevel)
    return (10)*-1,(20)*-1
end
setCombatCallback(combat0_Brush_8, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_8")
local dfcombat0_Brush_8 = {CONST_ANI_SMALLHOLY,3,3,3,2,3,1,3,0,3,-1,3,-2,3,-3,3,-4,2,-4,1,-4,0,-4,-1,-4,-2,-4,-3,-4,-4,-4,-4,-3,-4,-2,-4,-1,-4,0,-4,1,-4,2,-4,3,-4,4,-3,4,-2,4,-1,4,0,4,1,4,2,4,3,4}

-- =============== 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_8,cid,var,dfcombat0_Brush_8,startPos)
    return true
end
 
Back
Top