TFS 1.X+ Items decaying at ground

biaggio12

Member
Joined
Aug 22, 2009
Messages
41
Reaction score
3
Hello, my items decaying even at ground or while unequipped. On the ground it decays even faster . 1 s = 3s on ground.

No idea where to search for fix anyone can help me ?
 

Lyky

Active Member
Joined
May 27, 2014
Messages
204
Reaction score
44
item must have transformEquipTo and back as in this example

inside items.xml
XML:
    <item id="2168" article="a" name="life ring">
       <attribute key="weight" value="80" />
       <attribute key="slotType" value="ring" />
       <attribute key="transformEquipTo" value="2205" />
       <attribute key="stopduration" value="1" />
       <attribute key="showduration" value="1" />
   </item>

    <item id="2205" article="a" name="life ring (faster regeneration)">
       <attribute key="weight" value="80" />
       <attribute key="slotType" value="ring" />
       <attribute key="decayTo" value="0" />
       <attribute key="transformDeEquipTo" value="2168" />
       <attribute key="duration" value="1200" />
       <attribute key="healthGain" value="2" />
       <attribute key="healthTicks" value="6000" />
       <attribute key="manaGain" value="8" />
       <attribute key="manaTicks" value="6000" />
       <attribute key="showduration" value="1" />
       <attribute key="showattributes" value="1" />
   </item>
then next step is movements.xml

XML:
<movevent event="Equip" itemid="2168" slot="ring" function="onEquipItem"/>
<movevent event="DeEquip" itemid="2205" slot="ring" function="onDeEquipItem"/>

if those are not fulfilled, once activated - they won't stop its duration - or won't start.

Note parameters in items.xml
'stopduration'
'transform*'
 
OP
B

biaggio12

Member
Joined
Aug 22, 2009
Messages
41
Reaction score
3
items.xml
HTML:
<item id="26235" article="a" name="blade of mayhem (overcharged)">
        <attribute key="weight" value="5000" />
        <attribute key="defense" value="34" />
        <attribute key="attack" value="52" />
        <attribute key="description" value="This weapon is over charged." />
    <!--<attribute key="skillSword" value="1" />
        <attribute key="skillcriticalchance" value="10" />
        <attribute key="skillcriticaldamage" value="75" />-->
        <attribute key="weaponType" value="sword" />
        <attribute key="transformEquipTo" value="25909" />
        <attribute key="stopduration" value="1" />
        <attribute key="showduration" value="1" />
    </item>
    <item id="25909" article="a" name="blade of mayhem (overcharged)">
        <attribute key="weight" value="5000" />
        <attribute key="defense" value="34" />
        <attribute key="attack" value="52" />
        <attribute key="description" value="This weapon is over charged." />
        <attribute key="skillSword" value="1" />
        <attribute key="weaponType" value="sword" />
        <attribute key="skillcriticalchance" value="10" />
        <attribute key="skillcriticaldamage" value="60" />
        <attribute key="decayTo" value="25879" />
        <attribute key="transformDeEquipTo" value="26235" />
        <attribute key="duration" value="54000" />
        <attribute key="showduration" value="1" />
    </item>
movements.xml
HTML:
  <movement event="Equip" itemid="25909" slot="hand" function="onEquipItem"/>
  <movement event="DeEquip" itemid="25909" slot="hand" function="onDeEquipItem"/>
still decaying :/
@Lyky
 
Last edited:

Lyky

Active Member
Joined
May 27, 2014
Messages
204
Reaction score
44
notice how different itemid's are used in my example in movements.xml

:)
 
OP
B

biaggio12

Member
Joined
Aug 22, 2009
Messages
41
Reaction score
3
@Lyky i still have problem while item laying on ground. It just count down the time left on mayhem. Any idea how to fix it ?
Also if i equip then deequip then time accelerate and decays even faster. Any idea ?
 

Lyky

Active Member
Joined
May 27, 2014
Messages
204
Reaction score
44
ensure that active itemid (when time is counted) is <movevent event="DeEquip" in movements.xml;

if DeEquip doesn't work there may be something wrong with your source, do you have same issue with rings like life ring?
 
OP
B

biaggio12

Member
Joined
Aug 22, 2009
Messages
41
Reaction score
3
Nope rings works fine. Only mayhem weapons. And im sure i set it correctly.
items.xml
HTML:
<item id="26320" article="a" name="wand of mayhem (overcharged)">
        <attribute key="description" value="This weapon is over charged." />
        <attribute key="weight" value="3500" />
        <attribute key="weaponType" value="wand" />
        <attribute key="range" value="3" />
        <attribute key="magiclevelpoints" value="1" />
        <attribute key="skillcriticalchance" value="10" />
        <attribute key="skillcriticaldamage" value="75" />
        <attribute key="transformEquipTo" value="25917" />
        <attribute key="stopduration" value="1" />
        <attribute key="showduration" value="1" />
    </item>
    <item id="25917" article="a" name="wand of mayhem (overcharged)">
        <attribute key="description" value="This weapon is over charged." />
        <attribute key="weight" value="3500" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="energy" />
        <attribute key="magiclevelpoints" value="1" />
        <attribute key="range" value="3" />
        <attribute key="skillcriticalchance" value="10" />
        <attribute key="skillcriticaldamage" value="60" />
        <attribute key="decayTo" value="25887" />
        <attribute key="transformDeEquipTo" value="26320" />
        <attribute key="duration" value="54000" />
        <attribute key="showduration" value="1" />
    </item>
HTML:
    <movevent event="Equip" itemid="26320" slot="hand" level="250" function="onEquipItem">
        <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" showInDescription="0" />
    </movevent>
  <movement event="DeEquip" itemid="25917" slot="hand" level="250" function="onDeEquipItem">
    <vocation name="Sorcerer" />
        <vocation name="Master Sorcerer" showInDescription="0" />
  </movement>
Do you know where to look in sources for function responsible for countdown ?
Btw i checked how rings are looking in movements.

Code:
  <movevent event="Equip" itemid="2168" slot="ring" function="onEquipItem" />
  <movevent event="Equip" itemid="2205" slot="ring" function="onEquipItem" />
  <movevent event="DeEquip" itemid="2205" slot="ring" function="onDeEquipItem" />
and it works correctly.
 
Last edited:

Lyky

Active Member
Joined
May 27, 2014
Messages
204
Reaction score
44
look for "stopduration" inside your source, then look for definition; but if rings work - then there must be some difference between your setup, and how your rings are set up.
 

2Rec

Veteran OT User
Joined
Jul 31, 2013
Messages
517
Reaction score
656
Didn't register DeEquip for id 26320?
 
Top