• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Field Damage tfs 1.2

jackl90

Member
Joined
Jul 25, 2017
Messages
249
Reaction score
12
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
combat:setParameter(COMBAT_PARAM_MAGICEFFECT, CONST_ME_HITBYFIRE)
combat:setParameter(COMBAT_PARAM_CREATEITEM, 2118)

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end

How can i modific this Fire field script to do different do damage after 5 seconds that the field was created? For example when the player use this rune, and other player stepin on field got 10 of damage, but if the player stepin after 5 seconds, the damage will be 5.
 
You can just change damage when it decay to the smaller fire after 10 seconds, in items.xml
XML:
    <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>
 
Back
Top