• 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 a "spin" spell

mezuf98

New Member
Joined
Jul 4, 2016
Messages
37
Reaction score
0
Hi guys, I tried to do but could not =(.

A spell that effect be around the player in movement for a few seconds, causing damage around.
Using TFS 1.2

Thanks !!
 
Hi guys, I tried to do but could not =(.

A spell that effect be around the player in movement for a few seconds, causing damage around.
Using TFS 1.2

Thanks !!
Maybe if you gave more information people would try to help you.

Code:
local dirs = {0, 7, 1, 5, 2, 4, 3, 6}

function spinSpell(cid, interval, combattype, distanceeffect, effect, min, max, dir, n, i)
    dir = dir or 1
    n = n or 7
    i = i or 1
    local creature = Creature(cid)
    if creature and i <= n then
        local pos = creature:getPosition()
        if Tile(pos):hasFlag(TILESTATE_PROTECTIONZONE) then
            return false
        end

        pos:getNextPosition(dirs[dir])
        local tile = Tile(pos)
        if not (tile:hasProperty(CONST_PROP_BLOCKPROJECTILE) or tile:hasFlag(TILESTATE_FLOORCHANGE) or tile:hasFlag(TILESTATE_TELEPORT) or tile:hasFlag(TILESTATE_PROTECTIONZONE)) then
            doAreaCombatHealth(cid, combattype, pos, 0, min, max, effect)
            creature:getPosition():sendDistanceEffect(pos, distanceeffect)
        end

        i = i + 1
        addEvent(spinSpell, interval, cid, interval, combattype, distanceeffect, effect, min, max, dir % 8 + 1, n, i)
        return true
    end
end

function onCastSpell(creature, variant)
    return spinSpell(creature:getId(), 100, COMBAT_FIREDAMAGE, CONST_ANI_FIRE, CONST_ME_FIREAREA, -100, -200, 1, 24)
end
 
Back
Top