• 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+ get current page in container with pagination

Joe Rod

Discord: joerod1
Joined
Mar 16, 2011
Messages
499
Solutions
2
Reaction score
172
GitHub
joerod1
Is there a way to get current page on container with pagination?
I.E. If i am
2qi7lfp.png

current page it would be 2

update:
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
 
Last edited:
Solution
Ty for answer. Let me explain better
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
Ah, when moving the item. Afaik cipsoft client (not sure about otc), does not calculate the exact slot after page 1 (container index > container maxsize), when you move item to paginated container, it's moved into the first slot (index 0 and that's what cipsoft client is sending)...
I think no, but you can get item index in container and calculate it, for example container has 30 slots and its paginated, indexes starts from 0, then 30 item is on page 2, 29 is on page 1. If you arent working with any item, you just need the page for some reason, then its prolly not possible.
 
I think no, but you can get item index in container and calculate it, for example container has 30 slots and its paginated, indexes starts from 0, then 30 item is on page 2, 29 is on page 1. If you arent working with any item, you just need the page for some reason, then its prolly not possible.

Ty for answer. Let me explain better
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
 
Ty for answer. Let me explain better
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
Ah, when moving the item. Afaik cipsoft client (not sure about otc), does not calculate the exact slot after page 1 (container index > container maxsize), when you move item to paginated container, it's moved into the first slot (index 0 and that's what cipsoft client is sending), that's why you can't get what you want.
 
Last edited:
Solution
Back
Top