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

[0.4] Moveevents

Competitibia

Pain & Glory WHole
Joined
Apr 1, 2021
Messages
545
Solutions
3
Reaction score
210
XML:
<movevent event="Equip" itemid="5802" slot="hand" function="onEquipItem" /> --sword
    <movevent event="DeEquip" itemid="5802" slot="hand" function="onDeEquipItem" />

so I wanted to say add sword that adds Skills but I have to declare them in moveevents wondering how to add extra function? can i just go function="onEquipItem;weapon" like with itemid id;id;id?

say after I add skills to sword and declare it in movements this way it wont attack. it will do everything but it wont attack xD should i declare it in weapons xml instead or something? what am I missing
 
are you sure your movements is loading properly and not erroring?

--sword is not the proper way to greentext in an xml document.
should be <!--sword-->
 
are you sure your movements is loading properly and not erroring?

--sword is not the proper way to greentext in an xml document.
should be <!--sword-->
the comment does not matter.
only occurs with melee weapons.
I cant add statistics like sword fighting etc to them in items because when i declare them in movements they only increase skill but refuse to do default weapon attack action
 
I see the problem.

you're using TFS 1.0+ movement config not 0.4 movement

change
XML:
<movevent event="Equip" itemid="5802" slot="hand" function="onEquipItem" />
<movevent event="DeEquip" itemid="5802" slot="hand" function="onDeEquipItem" />
to
XML:
<movevent type="Equip" itemid="5802" slot="hand" event="function" value="onEquipItem"/>
<movevent type="DeEquip" itemid="5802" slot="hand" event="function" value="onDeEquipItem"/>
 
I see the problem.

you're using TFS 1.0+ movement config not 0.4 movement

change
XML:
<movevent event="Equip" itemid="5802" slot="hand" function="onEquipItem" />
<movevent event="DeEquip" itemid="5802" slot="hand" function="onDeEquipItem" />
to
XML:
<movevent type="Equip" itemid="5802" slot="hand" event="function" value="onEquipItem"/>
<movevent type="DeEquip" itemid="5802" slot="hand" event="function" value="onDeEquipItem"/>
but armors etc work?

XML:
<movevent event="Equip" itemid="5882" slot="head" function="onEquipItem" />
    <movevent event="DeEquip" itemid="5882" slot="head" function="onDeEquipItem" />
   
        <movevent event="Equip" itemid="5881" slot="armor" function="onEquipItem" />
    <movevent event="DeEquip" itemid="5881" slot="armor" function="onDeEquipItem" />
   
        <movevent event="Equip" itemid="5880" slot="legs" function="onEquipItem" />
    <movevent event="DeEquip" itemid="5880" slot="legs" function="onDeEquipItem" />
   
        <movevent event="Equip" itemid="5879" slot="feet" function="onEquipItem" />
    <movevent event="DeEquip" itemid="5879" slot="feet" function="onDeEquipItem" />
   
        <movevent event="Equip" itemid="5878" slot="necklace" function="onEquipItem" />
    <movevent event="DeEquip" itemid="5878" slot="necklace" function="onDeEquipItem" />
    <!-- how do element protection work are they item related?-->
   
        <movevent event="Equip" itemid="2171" slot="necklace" function="onEquipItem" />
    <movevent event="DeEquip" itemid="2171" slot="necklace" function="onDeEquipItem" />
 
tfs 0.4 rev 3777 is as I showed.

I'm starting to think you're using some off-branch like OTX, which has a notoriously buggy as hell source, and you might be out of luck.

If not, I can only suggest for you to test what I posted.

-- Edit

Basically the tldr is

items.xml -- holds the information for the item
movements.xml -- allows the item to have custom attributes aside from armor/attack to be active on the player. (regen, swordSkill, et cetera)
weapons.xml -- is for custom attack script / wield unproperly (assuming melee weapon)

So, for what you're trying to do..
edit items.xml for the attributes you wanna add
add item to movements.xml for it to apply to the character when worn

weapons.xml not required.

--
So assuming you're doing both of those things correctly, with no errors when loading..
The problem would then be in the source somewhere.
 
Last edited:
Back
Top