Uhm Offsets Hex -> Dec ?

You can find tutorials and ask questions about memory editing here. You may also post any game-specific information you find (ie. cheat tables or addresses).
Post Reply
Message
Author
User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Uhm Offsets Hex -> Dec ?

#1 Post by 3cmSailorfuku » Wed Apr 16, 2008 8:09 am

Looking for pointers in ArtMoney is taking a bit longer than in Cheat Engine, however the pointer I get in Cheat Engine is in Hex,
something like "64D". Now, everything I try to use in micromacro (64D, 1613, 1316 etc) will result in bad parameters. So how do I convert this :(

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Uhm Offsets Hex -> Dec ?

#2 Post by Administrator » Wed Apr 16, 2008 12:26 pm

Precede that data with a 0x. 0x will typically tell the programming language to use hex notation. 0x64D should work flawlessly. You could also use the Windows Calculator to convert it to decimal, but...who actually does that?

And yes, ArtMoney's pointer lookup may be a bit slower than Cheat Engines. The difference is in the way the search works. Depending on how the game was programmed, the two different approaches may return different results (and by results, I mean in effectiveness, not necessarily different addresses).

If I remember later, I'll post a tutorial on how to do different types of pointer look-ups in Cheat Engine. One, in particular, relies on using the "What accesses this address" function to find a static pointer and offset to it.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Uhm Offsets Hex -> Dec ?

#3 Post by 3cmSailorfuku » Wed Apr 16, 2008 3:11 pm

elverion wrote:Precede that data with a 0x. 0x will typically tell the programming language to use hex notation. 0x64D should work flawlessly. You could also use the Windows Calculator to convert it to decimal, but...who actually does that?
But it won't work ;) Hmm, maybe my script is wrong? Wouldn't be the first time.
And no, converting them via the Science Calculator didn't help also, like I said.
elverion wrote: And yes, ArtMoney's pointer lookup may be a bit slower than Cheat Engines. The difference is in the way the search works. Depending on how the game was programmed, the two different approaches may return different results (and by results, I mean in effectiveness, not necessarily different addresses).
I weren't actually talking about Cheat Engine being faster than ArtMoney, It's just that I don't know ArtMoney well so I assume your way is the only one finding pointers. While in CheatEngine I can add the debugger (like you said) and find the right pointer in no time with almost never restarting the client.

Code: Select all

 HasTarget_addr = 0x01093B28;
 HasTarget_offset = 0x64D;

function LookForTarget()
  HasTarget = memoryReadByte(proc, HasTarget_addr, HasTarget_offset);
The pointer/adress is definitly correct.

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Uhm Offsets Hex -> Dec ?

#4 Post by Administrator » Wed Apr 16, 2008 3:23 pm

Correct you are. memoryReadByte is for reading the value directly. memoryReadBytePtr is what you're looking for: it reads the value from the address pointed to.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Uhm Offsets Hex -> Dec ?

#5 Post by 3cmSailorfuku » Wed Apr 16, 2008 5:14 pm

elverion wrote:Correct you are. memoryReadByte is for reading the value directly. memoryReadBytePtr is what you're looking for: it reads the value from the address pointed to.
Well, that solved it. Now it's just pointing to a different value. Even as 0x0 format or in dec.

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Uhm Offsets Hex -> Dec ?

#6 Post by Administrator » Wed Apr 16, 2008 9:19 pm

What do you mean it's pointing to a "different" value? Do you mean you are reading the wrong thing (ie. getting the wrong value returned)?

First, what is it you are trying to read? Are you sure it fits the size of a byte (what is the possible range of the expected value? 0 to 255, 0 to 65,535, 0 to 4,294,967,295?)? Is it even an integer (or character) you are trying to read, or could it be a float/double?

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Uhm Offsets Hex -> Dec ?

#7 Post by 3cmSailorfuku » Thu Apr 17, 2008 10:04 am

elverion wrote:What do you mean it's pointing to a "different" value? Do you mean you are reading the wrong thing (ie. getting the wrong value returned)?

First, what is it you are trying to read? Are you sure it fits the size of a byte (what is the possible range of the expected value? 0 to 255, 0 to 65,535, 0 to 4,294,967,295?)? Is it even an integer (or character) you are trying to read, or could it be a float/double?
Yes, I'm checking a 1 byte adress for a value between 1 - 60. I'm using print to display the value and it displays that the current value is 12 while in Cheat Engine its 0.

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Uhm Offsets Hex -> Dec ?

#8 Post by Administrator » Thu Apr 17, 2008 10:57 am

Well, that's odd. Endianness couldn't be the issue, then. Can you show more code? And what game is this for?

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Uhm Offsets Hex -> Dec ?

#9 Post by 3cmSailorfuku » Thu Apr 17, 2008 3:33 pm

elverion wrote:Well, that's odd. Endianness couldn't be the issue, then. Can you show more code? And what game is this for?
I just noticed that I were using a Float of course, silly me.

Code: Select all

 HasTarget_addr = 0x04A40A3B;
 PrimaryRange_addr = 0x120789C8;
 PrimaryRange_offset = 0x630;

function LookForTarget()
   HasTarget = memoryReadByte(proc, HasTarget_addr);
   PrimaryRange = memoryReadFloatPtr(proc, PrimaryRange_addr, PrimaryRange_offset);
    if( HasTarget == 0 ) then
     -- Looking For Target
     keyboardPress( key.VK_TAB );
     keyboardPress( key.VK_D );
    end
	if ( PrimaryRange < 45 ) then
	 -- Adjust View Angle To Target
	 keyboardPress( key.VK_Q );
	 keyboardPress( key.VK_E );
	 -- Use Weapons
	 rest(2);
	 keyboardPress( key.VK_1 );
	 rest(2);
	else
	 keyboardPress( key.VK_TAB );
     keyboardPress( key.VK_D );
	end
end

function main()
  attach( findWindow("AGE OF ARMOR") );
  proc = openProcess( findProcess("AGE OF ARMOR") );
  setPriority(PRIORITY_HIGH);

  while(true) do
    LookForTarget();
    rest(2);
  end
end
Not so sexy.

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Uhm Offsets Hex -> Dec ?

#10 Post by Administrator » Fri Apr 18, 2008 12:18 am

I just noticed that I were using a Float of course, silly me.
So it works now? I've never heard of Age of Armor, but it sounds interesting. How long has it been out? Is it actually worth playing?

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Uhm Offsets Hex -> Dec ?

#11 Post by 3cmSailorfuku » Fri Apr 18, 2008 9:10 am

elverion wrote:
I just noticed that I were using a Float of course, silly me.
So it works now? I've never heard of Age of Armor, but it sounds interesting. How long has it been out? Is it actually worth playing?
Nah it doesn't, just that it is a 1 byte adress etc was false.

Not sure, depending on the levels I see.. Maybe 2-3 months? It's still open beta. And I don't think its worth playing, but I still do it.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests