• 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+ TFS 1.4 add storeitem onto movements.xml

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
177
Location
Sweden
Yello! (Using newest repo of TFS 1.4) I'm looking to add storeitem into movements.xml so items moved in/out from can be registered onEquip/onDeEquip.
Anyone willing to point me into the right directions?

As example I'd like to make this item:
Lua:
<movevent event="Equip" itemid="2164" slot="ring" function="onEquipItem" />
    <movevent event="DeEquip" itemid="2164" slot="ring" function="onDeEquipItem" />
As this:
Lua:
    <movevent event="Equip" itemid="2164" slot="storeItem" function="onEquipItem" />
    <movevent event="DeEquip" itemid="2164" slot="storeItem" function="onDeEquipItem" />

This means that if I'd add regeneration to the item it would register to the player when putting the item into the store container.


Edit: I successfully added 'slotp_store' into sources which made the warnings of unknown slot type to dissapear when adding it into movements, however, non of the attributes on the item will register to the player.
 
Last edited:
look how infernum did here:
So what this does:
Lua:
function Player:onInventoryUpdate(item, slot, equip)
    if hasEventCallback(EVENT_CALLBACK_ONINVENTORYUPDATE) then
        EventCallback(EVENT_CALLBACK_ONINVENTORYUPDATE, self, item, slot, equip)
    end
end

Is basically sending to an eventCallback file in scripts/eventcallbacks/player/default_onInventoryUpdate.lua ?
And in there I need to register which item IDs I want to update on equip/deequip and the type of conditions I want to update?
 
Back
Top