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

Fire Field not decaying TFS 1.0

Tort

New Member
Joined
Jun 6, 2008
Messages
3
Reaction score
0
When creating fire fields throught this spell the created fire fields never decay.

Code:
local delay = 5000

local combatfire = 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, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 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(combatfire, area)

local function spellCallback(param)
    if isCreature(param.cid) then   
        a = math.random(0,9)
        if a == 1 and isCreature(param.cid) then
            addEvent(doSendMagicEffect,delay,param.pos, CONST_ME_FIREATTACK)
            addEvent(doCreateItem,delay,1487,1,param.pos)
        elseif a == 2 and isCreature(param.cid) then
            addEvent(doSendMagicEffect,delay,param.pos, CONST_ME_FIREATTACK)
            addEvent(doCreateItem,delay,1488,1,param.pos)
        elseif a == 3 or a == 4 and isCreature(param.cid) then
            addEvent(doSendMagicEffect,delay,param.pos, CONST_ME_FIREATTACK)
            addEvent(doCreateItem,delay,1489,1,param.pos)
        end
    end
end

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

setCombatCallback(combatfire, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
    return doCombat(cid, combatfire, var)
end

But according to the items.xml they should properly decay after 120sec

Code:
    <item id="1487" article="a" name="fire field">
        <attribute key="type" value="magicfield" />
        <attribute key="decayTo" value="1488" />
        <attribute key="duration" value="120" />
        <attribute key="field" value="fire">
            <attribute key="damage" value="20" />
            <attribute key="ticks" value="10000" />
            <attribute key="count" value="7" />
            <attribute key="damage" value="10" />
        </attribute>
    </item>
    <item id="1488" article="a" name="fire field">
        <attribute key="type" value="magicfield" />
        <attribute key="decayTo" value="1489" />
        <attribute key="duration" value="120" />
        <attribute key="field" value="fire">
            <attribute key="ticks" value="10000" />
            <attribute key="count" value="7" />
            <attribute key="damage" value="10" />
        </attribute>
    </item>
    <item id="1489" article="a" name="fire field">
        <attribute key="type" value="magicfield" />
        <attribute key="decayTo" value="0" />
        <attribute key="duration" value="120" />
        <attribute key="field" value="fire" />
    </item>

Does anyone have an idea why they don't decay? When using fire field runes or creating the fire fields myself they do decay. I'm using TFS 1.0
 
Back
Top Bottom