Page 1 of 1

Uhm Offsets Hex -> Dec ?

Posted: Wed Apr 16, 2008 8:09 am
by 3cmSailorfuku
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 :(

Re: Uhm Offsets Hex -> Dec ?

Posted: Wed Apr 16, 2008 12:26 pm
by Administrator
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.

Re: Uhm Offsets Hex -> Dec ?

Posted: Wed Apr 16, 2008 3:11 pm
by 3cmSailorfuku
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.

Re: Uhm Offsets Hex -> Dec ?

Posted: Wed Apr 16, 2008 3:23 pm
by Administrator
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.

Re: Uhm Offsets Hex -> Dec ?

Posted: Wed Apr 16, 2008 5:14 pm
by 3cmSailorfuku
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.

Re: Uhm Offsets Hex -> Dec ?

Posted: Wed Apr 16, 2008 9:19 pm
by Administrator
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?

Re: Uhm Offsets Hex -> Dec ?

Posted: Thu Apr 17, 2008 10:04 am
by 3cmSailorfuku
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.

Re: Uhm Offsets Hex -> Dec ?

Posted: Thu Apr 17, 2008 10:57 am
by Administrator
Well, that's odd. Endianness couldn't be the issue, then. Can you show more code? And what game is this for?

Re: Uhm Offsets Hex -> Dec ?

Posted: Thu Apr 17, 2008 3:33 pm
by 3cmSailorfuku
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.

Re: Uhm Offsets Hex -> Dec ?

Posted: Fri Apr 18, 2008 12:18 am
by Administrator
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?

Re: Uhm Offsets Hex -> Dec ?

Posted: Fri Apr 18, 2008 9:10 am
by 3cmSailorfuku
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.