Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant archive_postsperpage - assumed 'archive_postsperpage' (this will throw an Error in a future version of PHP) in ..../archive/index.php on line 456
Map structure [Archive] - Forums

PDA

View Full Version : Map structure



Xleniz
06-28-2013, 11:31 PM
Hello Dear TPForums, im having trouble getting a constant address to itemid on map.
Right now its:
0336D29C

but, I did

e60000(baseaddress) + X(unknown Value) = 0336D29C

e60000(baseaddress) -= e60000
0336D29C -= e60000

-- Common mathematics --


and found out X value to add base address,

but even though so, the address is changing.
I looked tutorial and google, but there is no answer on how to get the map itemid address constant.
I tried for hours, and im stuck.............

no flame me
Google /tpforums search shows no result that gives result

(Im trying to find Wall ID, but I want to start finding itemid on map, I dont know if its same).

Thanx,

XtrmJash
06-28-2013, 11:39 PM
Hello Dear TPForums, im having trouble getting a constant address to itemid on map.
Right now its:
0336D29C

but, I did

e60000(baseaddress) + X(unknown Value) = 0336D29C

e60000(baseaddress) -= e60000
0336D29C -= e60000

-- Common mathematics --


and found out X value to add base address,

but even though so, the address is changing.
I looked tutorial and google, but there is no answer on how to get the map itemid address constant.
I tried for hours, and im stuck.............

no flame me
Google /tpforums search shows no result that gives result

(Im trying to find Wall ID, but I want to start finding itemid on map, I dont know if its same).

Thanx,

Steps to find the address of an item location on the map:

Toss a GP on the floor.
Scan for 3031
Toss an empty potion flask on the floor
Scan for empty potion flask ID

Repeat until addresses are minimal.

I'm pretty sure at that point you will only have a non-static address, so you'll most likely need to do a pointer scan and find a static pointer address to get the end value.

Do you know how to read pointers?

Xleniz
06-29-2013, 12:04 AM
No.

I dont know.

XtrmJash
06-29-2013, 12:17 AM
No.

I dont know.

Well, I'll explain my method for reading a pointer...

When you do a pointer scan in CheatEngine you will see a list of addresses, then a list of offsets, so you go like this:

PtrLvl1 = Read Memory @ First Address
PtrLvl2 = Read Memory @ PtrLvl1 + Offset1
PtrLvl3 = Read Memory @ PtrLvl2 + Offset2
Actual value = Read Memory @ PtrLvl3 + Offset3

My ReadPtr function goes like this:


public Int32 ReadPtrInt32(UInt32 Address, UInt32[] Offsets)
{
UInt32 Adr = (UInt32)ReadInt32(Address + Base);
foreach (UInt32 Offset in Offsets)
{
Adr = (UInt32)ReadInt32(Adr + Offset);
}
return Adr;
}

Something like that :)

I suspect you will need to read pointers to get the map data :P

Xleniz
06-29-2013, 12:27 AM
Ok, but after pointer scanning the non static value, it says "Offset0",?

Ahh I dont understand.

XtrmJash
06-29-2013, 12:42 AM
Alright so here's how we're working, you search for a value and find it in memory, but when you open the address view thing up in CheatEngine, it doesn't display "Tibia.exe + Address", it just says "Address" (replacing address with the address itself)... So this memory address is not static, it will change location either on restart or if the value is changed. This leads to the issue that you cannot access the value... So to find the value, you need to do a pointer scan.

A pointer scan actually takes the memory address (e.g 0x000001), and searches for that number in memory. When it finds that number in memory, this is a pointer, because instead of storing the value we are storing a pointer to the memory address which holds the value. There are multi level pointers, in which instance you will have a memory address, from which you will read a memory address, and in that memory address you can read another memory address, and maybe in that memory address you will read your value. It gets a little more complex though, because these values are often stored in classes / structures, meaning that you may end up with a sequence that looks like this:

Address, Value
0001 0002
0002 0003
0003 0004
0004 VALUE

But, these will usually be offset, so it will actually look like this:

0001 0004
0007 0009
0015 0025
0030 VALUE

In this instance, you will read:

Memory address at 0001, and get the value 0004.
You must then add the offset 0003 to the value 0004, to get the address 0007.
You then read 0007, and get the value 0009, to which you must add 0006 to get the value 0015.
You then read 0015, and get the value 25, to which you must add 0005 to get 0030.
You then read 0030, and get the actual value you're trying to read.

I will give you a working example:

Int32 Ptr1 = ReadInt32(GUIStart + BaseAddress);
Int32 Ptr2 = ReadInt32(Ptr1 + 0x40);
Int32 Ptr3 = ReadInt32(Ptr2 + 0x44);
Int32 Ptr4 = ReadInt32(Ptr3 + 0x2C);
string Value = ReadString(Ptr4);

GUIStart is declared as 0x3BE800, and the offsets are 0x40, 0x44, and 0x2C. It will look like this in CheatEngine:

http://i.imgur.com/xXzaWEy.png

Xleniz
06-29-2013, 01:21 AM
Nice information, but why the textvalue? Dont joke with my name

lol (jk), but isnt it kind of vulgular on such forum -_

ONTOPIC:

03153674+1b4+368+6D0
doesnt give static address.
It sounds obvious, but you told me to add offsets, and I did.

XtrmJash
06-29-2013, 09:42 AM
Nice information, but why the textvalue? Dont joke with my name

lol (jk), but isnt it kind of vulgular on such forum -_

ONTOPIC:

03153674+1b4+368+6D0
doesnt give static address.
It sounds obvious, but you told me to add offsets, and I did.

IDK if you are understanding it correctly.

So you read the information stored at the first address, and the value you will get will be a different memory address, you then add the first offset to the address which you read from memory, and read that value (with the offset added) and you will get yet another address, then once more add the second offset to the address you have read out of memory and read the value, do this until you run out of offsets, then read the value at the last read address...

Puterin
06-29-2013, 10:02 AM
the real answer is this:
http://tpforums.org/forum/threads/5638-Good-References
go to "Projects", and then check either NeoClone or JAPI (both of them use memory reading).
After that, just check how they read values using pointers and offsets. (And since it's in a repository you don't have to download it)

congrats, you're done!

XtrmJash
06-29-2013, 10:50 AM
the real answer is this:
http://tpforums.org/forum/threads/5638-Good-References
go to "Projects", and then check either NeoClone or JAPI (both of them use memory reading).
After that, just check how they read values using pointers and offsets. (And since it's in a repository you don't have to download it)

congrats, you're done!

If only one of us had done the map structure already hehe :P

Puterin
06-29-2013, 11:42 AM
If only one of us had done the map structure already hehe :P
true lol, but he can check it with the cooldown stuff or the messages or w/e.
He can also check your videotutorial