You made me into dlding 7.6 xD
I've connected to first OT I've found and checked the structure.
It goes almost same as with 7.7.
HTHCode:4 bytes - things count 10*12 bytes - things in stack 10*4 bytes - things stack pos 4 bytes - filler
You made me into dlding 7.6 xD
I've connected to first OT I've found and checked the structure.
It goes almost same as with 7.7.
HTHCode:4 bytes - things count 10*12 bytes - things in stack 10*4 bytes - things stack pos 4 bytes - filler
so... there should be structure, which consists:
int
array (10), which consists things in stack
array(10) of int
and the last int, which is a filler?
Exactly.
Something like this I believe:
[code=c++]struct objectData{
int objectId;
int data1;
int data2;
};
struct tileDef {
int stackSize;
objectData Data[10];
int stackPos[10];
int unknown;
};[/code]
To find yourself in the map array (selfPos) loop through the Data array stackSize times.
For example:
If you have a single map tile on the ground and yourself, the stackSize=2.
Now... if you put rope under yourself and pick it back up, the stackSize will change to 3 and 2 afterwards.
But the rope info will stay in the memory at stackPos=3.
Same goes for creatures - there's lots of garbage in the memory map array and you have to loop only through number of things determined by stackSize.
HTH
After changing:
Z is still 0.
Comunicate from Tibia: "First go upstairs".
Here is the code:
Code:int mappointer=0x4AF478; struct objectData{ int objectId; int data1; int data2; }; struct tileDef { int stackSize; objectData Data[10]; int stackPos[10]; int unknown; }; tileDef map[2016]; int goingto_x; int goingto_y; int goingto_z; void go(int x,int y, int z){ Battle B; B=Read_Battle_List(); for (int i=0;i<150;i++){ if(B[i].idall==Read(0x4A1244,4)){ int val=1; int addr=(0x4A12AC-4)+156*i+76; int addr_x=0x4A1288; int addr_y=0x4a1284; int addr_z=0x4A1280; WriteProcessMemory(process, (void*)addr_x, &x, 4, 0); WriteProcessMemory(process, (void*)addr_y, &y, 4, 0); WriteProcessMemory(process, (void*)addr_z, &z, 4, 0); WriteProcessMemory(process, (void*)addr, &val, 4, 0); break; } } } void download_map(){ ReadProcessMemory(process, (LPVOID)Read(mappointer,4), map, sizeof(tileDef)*2016, NULL); } void search_for(int id){ download_map(); for(int i=0;i<2016;i++){ for(int e=0;e<map[i].stackSize;e++){ if(map[i].Data[e].objectId==99){ if(map[i].Data[e].data1==id){ goingto_z = i/(14*18); goingto_y= (i-goingto_z*14*18)/18; goingto_x=(i-goingto_z*14*18-goingto_y*18); char buff[10]; itoa(goingto_z,buff,10); MessageBox(NULL,buff,"",MB_OK); go(goingto_x-1,goingto_y,goingto_z); } } } } }
x/y/z you get from selfPos is your position in the memory map array.
This has absolutely nothing to do with your character global position.
You have to read memory map array position for your position and the target, and then apply it accordingly to your target.
For example:
If your global opsition is 32000x32000x7 and the target is 1 tile north and 3 tiles west from you then:
find yourself in map array - 12x5x6 (made up)
apply vector to your target - 12x5x6 + -3x-1x0 = 32000x32000x6 + -3x-1x0 = 31997x31999x7
Now you have the global target position.
HTH
goingto_z = i/(14*18);
goingto_y= (i-goingto_z*14*18)/18;
goingto_x=(i-goingto_z*14*18-goingto_y*18);
This will only create a memory location. To get a world location out of it, you need to find the player's memory location, then adjust the both memory locations so that the player's memory location is in the center. Then offset the player's world location using the tile's memory location.
I did it Thank you for everything Shall I post effects here for rest of forum?