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

AoE Fire Spell

DrComet

New Member
Joined
Nov 25, 2014
Messages
63
Reaction score
3
Hello there. I have a request. I need a spell called Apocalypse (I believe it's a name of it) which hits random squares per second with fire effect. I had this spell on my server but now when I wanted to use it - it's just gone... I don't know how it is even possible, cuz I didn't change anything about spells.

If I wasn't precise enough, here's additional note about it:

The AoE range is the same like in Hell's Core spell. It summons randomly fire per 1 second (or something like that) for like 5-7 seconds. But that's only fire effect, not a fire field.

I hope You get me guys.

Cheers!
 
You should include your TFS version.

This is the one for TFS 0.3.6:

Code:
    <instant name="apocalypse" words="Apocalypse" lvl="150" manapercent="1" exhaustion="1500" needlearn="0" event="script" value="customspells/apocalypse.lua">
        <vocation id="1"/>
        <vocation id="5"/>
    </instant>
Make sure this part is correctly: "value="customspells/apocalypse.lua">"
Code:
local combat = createCombatObject()


arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
{0, 1, 1, 3, 1, 3, 1, 3, 1, 1, 0},
{0, 1, 1, 1, 3, 3, 3, 1, 1, 1, 0},
{1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1},
{0, 1, 1, 1, 3, 3, 3, 1, 1, 1, 0},
{0, 1, 1, 3, 1, 3, 1, 3, 1, 1, 0},
{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

function spellCallback(param)
    if param.count > 0 or math.random(0, 1) == 1 then
        doSendMagicEffect(param.pos, CONST_ME_HITBYFIRE)
        doAreaCombatHealth(param.cid, COMBAT_FIREDAMAGE, param.pos, 0, -300, -450, CONST_ME_EXPLOSIONHIT)
    end

    if(param.count < 5) then
        param.count = param.count + 1
        addEvent(spellCallback, math.random(1000, 4000), param)
    end
end

function onTargetTile(cid, pos)
    local param = {}
    param.cid = cid
    param.pos = pos
    param.count = 0
    spellCallback(param)
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Back
Top