I did manage to find the basics for the container list and its items, but I stopped right after that.
Here's the two lua scripts I made to use with cheat engine, they're far from perfect or finished but it's a start:
IIRC the items were contained in a std::deque:
Code:
function deque_at(i)
--The deque's location in memory
local deque = 0x7F6156C;
--Load all the information from the deque
local vectormap = readInteger(deque+4);
local chunkamount = readInteger(deque+8);
local firstelement = readInteger(deque+12);
local maxelements = chunkamount * 4;
local dequesize = readInteger(deque+16);
--If element wanted is out of the deque's range, return false
if(i >= dequesize) then
return false
end
--Calculate what location the wanted element is at
local location = (firstelement+i)%maxelements;
--Calculate what chunk the element should be in
local chunk_n = math.floor(location/4)
--Calculate element in the chunk
local chunkelement_n = location%4
--Find the chunk
local chunk = readInteger(vectormap + (4*chunk_n));
--Find the element in the chunk
local element = readInteger(chunk + (4*chunkelement_n));
--Get member variable with offset
local value = readInteger(element+0x1a);
return value;
end
print(deque_at(0))
The containers were located in a std::map structure:
Code:
function getContainer(contId)
local containerPointer = getAddress("Tibianic.exe") + 0x3DC960 + 0x10
local containerAmount = readInteger(containerPointer + 0x4)
local containerList = {}
local ptr = readInteger(containerPointer)
local next = readInteger(ptr+4)
local found = false
local lastNode = false
while not lastNode and not found do
if (next == ptr) then
print("last node reached")
lastNode = true
break
end
local id = readInteger(next + 0x10)
--print("found id: ".. id)
if (contId < id) then
next = readInteger(next + 0x00)
--print("read left")
elseif (contId > id) then
--print("read right")
next = readInteger(next + 0x08)
else
found = true
--print("found = true")
end
end
local foundcontainer
if found and readInteger(next + 0x14) ~= 0 then
local containerptr = readInteger(next + 0x14)
foundcontainer ={
id = readInteger(containerptr + 0xc),
vol = readInteger(containerptr + 0x10),
name = readString(containerptr + 0x18),
hasParent = readBytes(containerptr + 0x30, 1, false),
closed = readBytes(containerptr + 0x31, 1, false),
unlocked = readBytes(containerptr + 0x32, 1, false),
hasPages = readBytes(containerptr + 0x33, 1, false),
size = 0,
firstIndex = 0
}
print("found container!")
print("id: " .. foundcontainer.id)
print("volume: " .. foundcontainer.vol)
print("name: " .. foundcontainer.name)
print("hasParent: " .. foundcontainer.hasParent)
print("closed: " .. foundcontainer.closed)
print("unlocked: " .. foundcontainer.unlocked)
print("hasPages: " .. foundcontainer.hasPages)
else
print("not found")
end
end
getContainer(0)
It's really shitty written and I honestly don't even remember much of it myself even though it was just ~1 month ago I made it, but maybe it can help a bit.