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

Item's slot type

OperatorMopa

Member
Joined
Feb 10, 2014
Messages
127
Reaction score
6
How can i get item slot type ? i've tried with getSlotPosition but it returns same value (48) for weapons and shields. What i need is to check what slot the item can be equiped (CONST_SLOT_HEAD, CONST_SLOT_RIGHT etc.)
 
How can i get item slot type ? i've tried with getSlotPosition but it returns same value (48) for weapons and shields. What i need is to check what slot the item can be equiped (CONST_SLOT_HEAD, CONST_SLOT_RIGHT etc.)
You didn't say what TFS...

TFS 1.2: itemType:getSlotPosition()
TFS 0.3.6: getItemInfo(itemid).slotPosition
 
Nope, it was just in old tibia
You can use it with weaponTypes as well. Just make a table like:
Code:
local slots = {
[WEAPON_SHIELD] = SLOTP_RIGHT,
...
...
}

If the item doesn't have weaponType or the weapontype is not in this table you return itemType:getSlotPosition().
 
Back
Top