• 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

MagicWall

Veteran OT User
Joined
Oct 12, 2008
Messages
125
Solutions
6
Reaction score
353
I want to present my loot statistics module for OTClient, who was presented in posts:

[OTClient Showoff] Show off your OTClient project/module/UI and other
[OTClient Showoff] Show off your OTClient project/module/UI and other

What is loot_stats module?
This module is created for presenting dropped items/killed monster: count, chance etc. Additionally module may show actual dropped loot in a graphic form. All operations is on client side, so they need additional files (look How to add?), they check loot notifications and save it.


How to add?
  1. Add folder [loot_stats] to "mods" or "modules" folder (recommended "mods" folder) in your main OTClient folder.
  2. To folder items_versions add folder with version name (8.60 -> 860).
  3. Inside created folder add items.otb* and items.xml* files.
*This files you may find in map editors/servers etc.

How it's look like

loot_stats_30-09-2017_R_2.png

Loot_Stats_29_09_2017_1.gif


Loot_On_Screen_2_13.12.2017.gif


Features
  • Information about killed monsters.
  • Loot from all monsters.
  • Loot from one type of monster.
  • Graphic loot information on left top corner.

Limitations
  • Module need to work loot notifications.
  • This module work only with "classic" loot notifications.
  • You need to have items.otb and items.xml to work this module.
  • Problems with longer loading OTClient.

Download
Loot_stats

Bugs/Issues send to project on github.
Feauters/Ideas etc. add here.

This module work only with "classic" (like rl tibia) loot notifications!
You need to add files items.otb and items.xml!
 
items.xml read successfully.
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:286: attempt to index local 'xml' (a nil value)
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:286: in function 'openItemsXML'
/loot_stats/loot_stats.lua:131: in function </loot_stats/loot_stats.lua:99>
[C]: in function 'setClientVersion'
/client_entergame/entergame.lua:245: in function 'doLogin'
/client_entergame/entergame.lua:143: in function </client_entergame/entergame.lua:141>
 
What should i do? Add the mod in a folder on folder otclient/mods/
And add a folder and create this folder: otclient/mods/Loot Stats/loot_stats/items_versions/860

And add items.otb* and items.xml* there?
 
What should i do? Add the mod in a folder on folder otclient/mods/
And add a folder and create this folder: otclient/mods/Loot Stats/loot_stats/items_versions/860

And add items.otb* and items.xml* there?

Guys! I trully wanna test this! What do i doing wrong?
 
After using this mod, its working fine, but monsters and items images some show correctly or some show an X. Also, all monsters show as a black dwarf. Whats going on? Thank you!
 
  • This module work only with "classic" loot notifications.
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
 
8255e3d0df6cfad405767dc5c8ca469f..png


No - Show loot on Screen....


f5b7829fbe8d51c8f95ab53cbacd77ac..png

Erro - Name Itens e Img


:(

You will lost all loot data!"
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:439: attempt to index a nil value
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:439: in function 'returnMonsterLoot'
/loot_stats/loot_stats.lua:561: in function 'refreshLootItems'
/loot_stats/loot_stats.lua:709: in function 'refreshDataInUI'
/loot_stats/loot_stats.lua:62: in function 'callback'
/client_topmenu/topmenu.lua:31: in function </client_topmenu/topmenu.lua:29>
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:439: attempt to index a nil value
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:439: in function 'returnMonsterLoot'
/loot_stats/loot_stats.lua:561: in function 'refreshLootItems'
/loot_stats/loot_stats.lua:709: in function 'refreshDataInUI'
/loot_stats/loot_stats.lua:276: in function </loot_stats/loot_stats.lua:150>
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:439: attempt to index a nil value
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:439: in function 'returnMonsterLoot'
/loot_stats/loot_stats.lua:561: in function 'refreshLootItems'
/loot_stats/loot_stats.lua:709: in function 'refreshDataInUI'
/loot_stats/loot_stats.lua:276: in function </loot_stats/loot_stats.lua:150>
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:439: attempt to index a nil value
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:439: in function 'returnMonsterLoot'
/loot_stats/loot_stats.lua:561: in function 'refreshLootItems'
/loot_stats/loot_stats.lua:709: in function 'refreshDataInUI'
/loot_stats/loot_stats.lua:276: in function </loot_stats/loot_stats.lua:150>
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:439: attempt to index a nil value
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:439: in function 'returnMonsterLoot'
/loot_stats/loot_stats.lua:561: in function 'refreshLootItems'
/loot_stats/loot_stats.lua:709: in function 'refreshDataInUI'
/loot_stats/loot_stats.lua:276: in function </loot_stats/loot_stats.lua:150>
ERROR: protected lua call failed: LUA ERROR:
/loot_stats/loot_stats.lua:439: attempt to index a nil value
stack traceback:
[C]: in function '__index'
/loot_stats/loot_stats.lua:439: in function 'returnMonsterLoot'
/loot_stats/loot_stats.lua:561: in function 'refreshLootItems'
/loot_stats/loot_stats.lua:709: in function 'refreshDataInUI'
/loot_stats/loot_stats.lua:276: in function </loot_stats/loot_stats.lua:150>
 
Last edited by a moderator:
LUA:
ERROR: Unable to load module 'loot_stats': LUA ERROR:
/loot_stats/loot_stats.lua:283: attempt to call field 'getRealPath' (a nil value)
stack traceback:
    [C]: in function 'getRealPath'
    /loot_stats/loot_stats.lua:283: in function 'openItemsXML'
    /loot_stats/loot_stats.lua:131: in function 'loadClientVersionItems'
    /loot_stats/loot_stats.lua:91: in function 'initLootChecker'
    /loot_stats/loot_stats.lua:36: in function 'init'
    /loot_stats/loot_stats.otmod:13:[@onLoad]:1: in main chunk
    [C]: in function 'reload'
    /client_modulemanager/modulemanager.lua:125: in function 'reloadCurrentModule'
    ...ent_modulemanager/modulemanager.otui:134: [@onClick]:2: in function <...ent_modulemanager/modulemanager.otui:134: [@onClick]:

i got this error is not working tho.
 
No - Show loot on Screen....

Tick the wee "show loot on screen" box lol


To people with the same issue with "X" pictures:
1. Open your items.xml and find "2148"
2. Replace whole code with:

Code:
    <item id="2148" article="a" name="gold coin" plural="gold coins">
        <attribute key="weight" value="10"/>
        <attribute key="worth" value="1"/>
    </item>


*CHECK YOUR items.xml FILE - make sure you get plural value and attributes correctly written FOR EVERY SINGLE ITEM, which requires plural value!!

3. Save your items.xml and copy it to: mods\loot_stats\items_versions\(into your version folder e.g 960)
 
Back
Top