• 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+ Check Items in Deposit and House by command?

OTcreator

Active Member
Joined
Feb 14, 2022
Messages
425
Solutions
1
Reaction score
44
Hi!
Is there any way to check a player e.g. with a command how much of a given ID is in his depo and house?
 
Lua:
house:getItems()
player:getDepotChest(depotId[, autoCreate = false])
player:getInbox()
player:getItemCount(itemId[, subType = -1])

container:getItems([recursive = false])

Yep, should be possible.
Use the recursive nature of container:getItems to find all the items, then loop through them to find all items that match the item you are looking for.

House items obviously are a bit different, where you need to loop through them to find items matching, and also to find all containers, so you can search through their contents as well.

Lua:
container:getItemCountById(itemId[, subType = -1])
There is this function as well.. but I have a feeling that it only counts the top layer of a container.
Might be wrong, so worth a test.
 
Lua:
house:getItems()
player:getDepotChest(depotId[, autoCreate = false])
player:getInbox()
player:getItemCount(itemId[, subType = -1])

container:getItems([recursive = false])

Yep, should be possible.
Use the recursive nature of container:getItems to find all the items, then loop through them to find all items that match the item you are looking for.

House items obviously are a bit different, where you need to loop through them to find items matching, and also to find all containers, so you can search through their contents as well.

Lua:
container:getItemCountById(itemId[, subType = -1])
There is this function as well.. but I have a feeling that it only counts the top layer of a container.
Might be wrong, so worth a test.
Thanks!
Generally needs talkactions, to check the total money held by the player.
HOUSE/BANK/DEPO/BP.

If there is a cash bug, then it is easy to figure out who is using it and watch the person on GHOST until it leads us to the source :)
 
Back
Top