Instead of reading the Tibia.dat file, there's a way to read the information from Tibia's memory.
The structure of the data is like this:
Code:
struct TibiaObject {
int width; //used to be height
int height; // used to be width, which was wrong
int unknown1; // dunno what this is yet.. i think it's not read from tibia.dat
int layers; // i think this is like, spriteOffset or something like that
int patternX; // dunno, not read from tibia.dat afaik
int patternY; // dunno, not read from tibia.dat afaik
int patternDepth; //used to be rare
int phase; // used to be anim count
WORD* sprites; //points to an array of sprites, each element being of WORD size, and its packed
// and the number of sprites, is, width * height * layers * patternX * patterhnY * patternDepth * phase
TibiaObjFlags flags;
int walkSpeed; // ground tiles slow or speed your char up, zero is unwalkable
int textLimit; //if its readable or writable
int lightRadius; //or intensity
int lightColor;
int shiftX; // offset from the right side of the spot where the sprite is shown ->
int shiftY; // offset from the bottom side of the spot where the sprite is shown \/
int height; //objects like parcels, when walked over, have have a diff. height
int automap; //colors in the "minimap"
TibiaObjlensHelp lensHelp; // defines which msg is shown then you use the Client Help of tibia
}
for the flags:
Code:
enum TibiaObjFlags {
None = 0;
WalkSpeed = 1;
TopOrder1 = 0x2; //
TopOrder2 =0x4;
TopOrder3 =0x8;
IsContainer = 0x10; // is actually container
IsStackable = 0x20; //stack was thought to be 0x10 before, its 0x20 though
IsCorpse = 0x40;
IsUsable = 0x80;
IsRune = 0x100; // contains charges?
IsWritable = 0x200;
IsReadable = 0x400;
IsFluidContainer = 0x800; //fluid containers..
IsSplash = 0x1000;
Blocking = 0x2000; // objects that you cant walk over
IsImmovable = 0x4000;
BlocksMissiles = 0x8000; // walls
BlocksPath = 0x10000;
IsPickupable = 0x20000; // can this be put into other containers?
IsHangable = 0x40000;
IsHangableHorizontal = 0x80000;
IsHangableVertizcal = 0x100000;
IsRotatable = 0x200000;
IsLightSource = 0x400000;
Floorchange = 0x800000;
IsShifted = 0x1000000;
HasHeight = 0x2000000;
IsLayer = 0x4000000;
IsIdleAnimation = 0x8000000;
HasAutoMapColor = 0x10000000;
HasHelpLens = 0x20000000;
IsGround = 0x40000000;
}
for the actions:
Code:
enum TibiaObjLensHelp {
IsLadder = 0x44C;
IsSewer = 0x44D;
IsDoor = 0x450;
IsDoorWithLock = 0x451;
IsRopeSpot = 0x44E;
IsSwitch = 0x44F;
IsStairs = 0x452;
IsMailbox = 0x453;
IsDepot = 0x454;
IsTrash = 0x455;
IsHole = 0x456;
HasSpecialDescription = 0x457;
IsReadOnly = 0x458;
}
I'll post more findings soon.
Read my next posts to find out how to use this.
EDIT: Fixed struct, added more findings.
EDIT: More findings, and actions, is HELPLENS, not actions, these define what help it should show for mailboxes, ladders, depots, etc.
EDIT: changed the names of some stuff for the real ones.
EDIT: Added IsContainer, and placed where it should be, note that all the values after IsContainer have been changed.
EDIT: modified nubmer of sprites formula