Michcol94
Member
- Joined
- Sep 2, 2021
- Messages
- 105
- Reaction score
- 19
This is a link to the topic with the module:
MOD
Trying to add the [OTClient Mod] Loot stats module to my otclient mehah version, downloaded from here and compiled from GitHub - mehah/otclient: An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize (https://github.com/mehah/otclient)
Unfortunately, I have a problem, the first one I think I solved was the wrong path to the icons, here are the screenshots:
I copied the /img folder with its contents to the /-OTClient-Mod-loot_stats folder as shown in the screenshot:
Now when I turn on the client and log in, I have a second problem that I cannot solve, this is a screenshot of errors in otclient:
This is what the contents of the folder and the path to the files look like:
content of createStats.lua link file:
Create Stats.lua
Lines 1 to 65 that cause the error:
Finally, I will add that no part of the module appears and it does not work at all. I am using TFS Engine 1.5 by nekiro Downgrade 8.6 with the latest release on github mehah otclient. And I have custom items.otb items.xml files, which means that I edited them by adding new items, but they work normally with the client, so it shouldn't pose a problem, I think.
MOD
Trying to add the [OTClient Mod] Loot stats module to my otclient mehah version, downloaded from here and compiled from GitHub - mehah/otclient: An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize (https://github.com/mehah/otclient)
Unfortunately, I have a problem, the first one I think I solved was the wrong path to the icons, here are the screenshots:
I copied the /img folder with its contents to the /-OTClient-Mod-loot_stats folder as shown in the screenshot:
Now when I turn on the client and log in, I have a second problem that I cannot solve, this is a screenshot of errors in otclient:
This is what the contents of the folder and the path to the files look like:
content of createStats.lua link file:
Create Stats.lua
Lines 1 to 65 that cause the error:
Lua:
function CreateStats()
local createStats = {
loadedVersionItems = 0;
ownParser = false;
_loadClientVersionItems = nil;
_checkLootTextMessage = nil;
init = function(self)
self._loadClientVersionItems = function() self:loadClientVersionItems() end
self._checkLootTextMessage = function(messageMode, message) self:checkLootTextMessage(messageMode, message) end
connect(g_game, { onClientVersionChange = self._loadClientVersionItems })
connect(g_game, { onTextMessage = self._checkLootTextMessage })
if (self.loadedVersionItems == 0 and g_game.getClientVersion() ~= 0) or (g_game.getClientVersion() ~= 0 and self.loadedVersionItems ~= g_game.getClientVersion()) then
self:loadClientVersionItems()
end
end;
terminate = function(self)
disconnect(g_game, { onClientVersionChange = self._loadClientVersionItems })
disconnect(g_game, { onTextMessage = self._checkLootTextMessage })
end;
-- Load items
loadClientVersionItems = function(self)
local version = g_game.getClientVersion()
if version ~= self.loadedVersionItems then
if not directoryExists('items_versions/' .. version) then
pwarning("Directory: items_versions/" .. version .. "/ doesn't exist!")
pwarning("Add " .. version .. " directory to items_versions/ with correct version items.otb and items.xml!")
self.loadedVersionItems = 0
g_modules.getModule('loot_stats'):unload()
modules.client_modulemanager.refreshLoadedModules()
return
end
if not fileExists('items_versions/' .. version .. '/items.otb') then
pwarning("File: items_versions/" .. version .. "/ doesn't exist!")
pwarning("Add correct version items.otb to items_versions/" .. version .. "/!")
self.loadedVersionItems = 0
g_modules.getModule('loot_stats'):unload()
modules.client_modulemanager.refreshLoadedModules()
return
end
if not fileExists('items_versions/' .. version .. '/items.xml') then
pwarning("File: items_versions/" .. version .. " doesn't exist!")
pwarning("Add correct version items.xml to items_versions/" .. version .. "/!")
self.loadedVersionItems = 0
g_modules.getModule('loot_stats'):unload()
modules.client_modulemanager.refreshLoadedModules()
return
end
loadOtb('items_versions/' .. version .. '/items.otb')
loadXml('items_versions/' .. version .. '/items.xml')
self:checkParserType()
self.loadedVersionItems = version
end
end;
Finally, I will add that no part of the module appears and it does not work at all. I am using TFS Engine 1.5 by nekiro Downgrade 8.6 with the latest release on github mehah otclient. And I have custom items.otb items.xml files, which means that I edited them by adding new items, but they work normally with the client, so it shouldn't pose a problem, I think.
Last edited: