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

[OTClient Mod] Loot stats

For those who are having difficulties with where to put what file/folder, here is a very elaborate breakdown of steps.
1. Download otclient
2. Open the folder named mods
3. Download loot_stats and drag the loot_stats folder into mods
4. Now you have OTClient folder/mods/loot_stats/
5. Open loot_stats
6. Open items_versions folder inside loot_stats
7. Now you are at OTClient folder/mods/loot_stats/items_versions
8. Create new folder for your client version for example for tibia 7.72 create folder 772 in items_versions
9. Now you are at OTClient folder/mods/loot_stats/items_versions/772/
10. Drag items.xml and items.otb from your server files (data/items/items.otb + items.xml) into items_versions
11. Start OTClient, login to your server
12. On the top right near equipment, you will see a golden GP box, click this
13. Profit
 
Does anyone know if this is supported using TFS 1.3 8.6 downgrade?
 
@Ninlin maybe it's protected by admin rights?
@MagicWall I believe this mod will cause heavy lag/delayed loading of otclient because it unnecessarily loads spr/items.xml on startup
 
@Ninlin maybe it's protected by admin rights?
@MagicWall I believe this mod will cause heavy lag/delayed loading of otclient because it unnecessarily loads spr/items.xml on startup

Without items.xml, module don't will work.
But yes, it load two times items.xml.
Why?
Because loadxml function don't load plural names, so I prepared own xml parser who save plural names, saved plural names allows to change plural names to singular names, then I convert singular names to ids.


items.otb allow to change server id from items.xml to client ids, client ids is needed to show items in module view.
Here:

So, how we may load it faster (need to modify OTC sources)?
1) Add plural atributte to itemType / parse function xml (to avoid use own xml parser).
2) Make additional functions asyncLoadOtb and asyncLoadXml, to perform them on other thread (outside main thread, faster otclient load).
 
Any guidance on how to make it compatible with item.srv and not use item.otb? Even if it takes work, I will do it.
 
What do you mean item.srv?
Where you found this?


The Nostalrius server for example does not use 'item.otb' but item srv. I believe that the server was made to run with the official leaked files from cipsoft;). I'm still waiting for answers. I once made it work, and forgot what change I had made. (Even if I got the images that loot on the ICONE buggy.
 
It works for 7.72? GP Icon shows for me, but none information are logged in mod.
Post automatically merged:

follow
Post automatically merged:

what u meant with this "classic" notifications?
I got on config
monsterLootMessage = 3
monsterLootMessageType = 22

Should I change it? Because there is nothing on Loot Stat box.
Thanks
u solved?
 

Attachments

Last edited:
is there a way to get client id items?

Do you mean change item name from stored data to client item id?
You can get item name, then change it to item object, and then get client item id. To use it, you need to load item.otb and item.xml (module default load these files).

Lua:
findItemByName = g_things.findItemTypeByName(ITEM_NAME)
local itemClientId = findItemByName:getClientId()

Example in code:
Github Loot stats example
 
Do you mean change item name from stored data to client item id?
You can get item name, then change it to item object, and then get client item id. To use it, you need to load item.otb and item.xml (module default load these files).

Lua:
findItemByName = g_things.findItemTypeByName(ITEM_NAME)
local itemClientId = findItemByName:getClientId()

Example in code:
Github Loot stats example
I mean to get the item icons on screen, cuz it'd be very lazy to edit my items.srv, and edit an otb file always, It would be awesome to load .dat and .spr files
 
I mean to get the item icons on screen, cuz it'd be very lazy to edit my items.srv, and edit an otb file always, It would be awesome to load .dat and .spr files
This module is based on .dat and .spr files, but it need to change item names (loot informations) to id, so it's need additional items.xml file to parse names to server id, and then to client id, to get images from .spr file.

Of course it's possible to create a module with a server script, who will send data using opcodes to client, who will change directly server id to client id, without search server id by item names.
 
This module is based on .dat and .spr files, but it need to change item names (loot informations) to id, so it's need additional items.xml file to parse names to server id, and then to client id, to get images from .spr file.

Of course it's possible to create a module with a server script, who will send data using opcodes to client, who will change directly server id to client id, without search server id by item names.

First time I ever add a module.
I did not get the GP icon, but I do find "Loot Stats" under options:
1660140842547.png


Cant click anything though, what is wrong?
 
Back
Top