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

TFS 1.X+ How to use one item as equip/deequip?

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
176
Location
Sweden
As if i only have one item to deequip/equip i get an issue where it adds up the stats on top of each other everytime i equip/deequip.
Is there anyway to go around this?

TFS: 1.3
This is the item, in items.xml:
XML:
    <item id="3940" article="a" name="camouflage backpack">
        <attribute key="description" value="[10% maxhealth][50health/s][2+ melee/dist][size: 30]" />
        <attribute key="showattributes" value="1" />
        <attribute key="armor" value="6" />
        <attribute key="maxHitPointsPercent" value="110"/>
        <attribute key="healthGain" value="50" />
        <attribute key="healthTicks" value="1000" />
        <attribute key="skillDist" value="2" />
        <attribute key="skillaxe" value="2" />
        <attribute key="skillsword" value="2" />
        <attribute key="skillclub" value="2" />
        <attribute key="weight" value="1800" />
        <attribute key="containerSize" value="20" />
        <attribute key="slotType" value="backpack" />
        <attribute key="decayTo" value="2003" />
        <attribute key="duration" value="40" />
        <attribute key="transformEquipTo" value="3940" />
        <attribute key="showduration" value="1" />
    </item>
...and if i use both deEquip & Equip on the same item the bug with the stats goes away but i get a bug where when i relog the time stops decaying.

In movements.xml:
XML:
    <movevent event="Equip" itemid="3940" slot="backpack" function="onEquipItem"/>
    <movevent event="DeEquip" itemid="3940" slot="backpack" function="onDeEquipItem"/>
Thanks in advance!
 
Last edited:
As if i only have one item to deequip/equip i get an issue where it adds up the stats on top of each other everytime i equip/deequip.
Is there anyway to go around this?

TFS: 1.3
This is the item, in items.xml:
XML:
    <item id="3940" article="a" name="camouflage backpack">
        <attribute key="description" value="[10% maxhealth][50health/s][2+ melee/dist][size: 30]" />
        <attribute key="showattributes" value="1" />
        <attribute key="armor" value="6" />
        <attribute key="maxHitPointsPercent" value="110"/>
        <attribute key="healthGain" value="50" />
        <attribute key="healthTicks" value="1000" />
        <attribute key="skillDist" value="2" />
        <attribute key="skillaxe" value="2" />
        <attribute key="skillsword" value="2" />
        <attribute key="skillclub" value="2" />
        <attribute key="weight" value="1800" />
        <attribute key="containerSize" value="20" />
        <attribute key="slotType" value="backpack" />
        <attribute key="decayTo" value="2003" />
        <attribute key="duration" value="40" />
        <attribute key="transformEquipTo" value="3940" />
        <attribute key="showduration" value="1" />
    </item>
...and if i use both deEquip & Equip on the same item the bug with the stats goes away but i get a bug where when i relog the time stops decaying.

In movements.xml:
XML:
    <movevent event="Equip" itemid="3940" slot="backpack" function="onEquipItem"/>
    <movevent event="DeEquip" itemid="3940" slot="backpack" function="onDeEquipItem"/>
Thanks in advance!
XML:
        <attribute key="decayTo" value="2003" />
        <attribute key="duration" value="40" />
->
XML:
    <movevent event="Equip" itemid="3940" slot="backpack" function="onEquipItem"/>
    <movevent event="DeEquip" itemid="3940" slot="backpack" function="onDeEquipItem"/>
    <movevent event="DeEquip" itemid="2003" slot="backpack" function="onDeEquipItem"/>

But i think this will not work. You must add this bonuses in script file. Cuz character get bonuses from item that already dont exist in inventory.
Delete this lines
XML:
        <attribute key="decayTo" value="2003" />

        <attribute key="duration" value="40" />

And check if work without this correct..
 
Last edited:
XML:
        <attribute key="decayTo" value="2003" />
        <attribute key="duration" value="40" />
->
XML:
    <movevent event="Equip" itemid="3940" slot="backpack" function="onEquipItem"/>
    <movevent event="DeEquip" itemid="3940" slot="backpack" function="onDeEquipItem"/>
    <movevent event="DeEquip" itemid="2003" slot="backpack" function="onDeEquipItem"/>

But i think this will not work. You must add this bonuses in script file. Cuz character get bonuses from item that already dont exist in inventory.
Delete this lines
XML:
        <attribute key="decayTo" value="2003" />

        <attribute key="duration" value="40" />

And check if work without this correct..
Removing those lines doesnt make a difference, not with the stats. The duration & decay however is gone as expected.
I believe you know what I'm trying to do but to explain it further for others.
I want camouflage backpack to always tick down in time, whether its laying around in temple or in my hand etc. When the duration is 0 i want it to decay to another backpack. I do not want it to deEquip to any other item nor equip to any other item than the camouflage backpack.
The issue is still them same, that's when i remove the backpack out of the backpack slot it wont lose its stats and when i put it back on its adding the stats on top of the other. It resets when i relog however, but that would be abused alot.

Edit: If i remove the duration, decay, deEquip & equip from items.xml the item works fine, however I wont get the duration/decay as i want it to have.
 
2. Spamming / Double post: You may not repeat the same message multiple times. It is seen as spamming. This also applies if you for example "bump" a thread.
BUMP

BUMP

BUMP

BUMP
 
Solution
Back
Top