Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Autoit Pointer Help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Gestalt
Newbie cheater
Reputation: 0

Joined: 08 Sep 2011
Posts: 21

PostPosted: Mon Feb 27, 2012 10:44 pm    Post subject: Autoit Pointer Help Reply with quote

Hi, Usually I use Cheat Engine as it is, but I have now come to a point where I need to use a database. I know autoit pretty well and making the script I need would be easy, besides one thing. I can't get the value.
This is the critical part of the code, I don't post all the code so it will be esier to read. If you would need more I could post that to of course.

Code:
#RequireAdmin
SetPrivilege("SeDebugPrivilege", 1)
#include <NomadMemory.au3>

$hMemory = _MemoryOpen(ProcessExists("daorigins.exe"))
$baseADDR = _MemoryGetBaseAddress($hMemory, 1)
$StaticOffset = Dec("80414C")
$finalADDR = "0x" & Hex($baseADDR + $StaticOffset)

$Offset[6] = ["0", Dec("25C"), Dec("34"), Dec("1C"), Dec("8"), Dec("10C")]

$Value = _MemoryPointerRead($finalADDR, $hMemory, $Offset, "float")

MsgBox(0, "Show", $Value[1])


$Value[1] allways shows 0 and $Value[0] shows different addresses that makes no sense. I have tried different vesrions of autoit and NomadMemory.
The static address is daorigins.exe+0080414C and offsets like in the code.

I hope soemone can see the problem. This would help me much as I know only the basics of C++ and can't accomplish the project as of now.
Thank you!
Back to top
View user's profile Send private message
Gestalt
Newbie cheater
Reputation: 0

Joined: 08 Sep 2011
Posts: 21

PostPosted: Tue Feb 28, 2012 1:01 pm    Post subject: Reply with quote

I now know what is wrong. The _MemoryPointerRead function is calculating the address wrong. I should get 0x0177A290 But instead gets 0x000000000177A290. I don't know how to fix this though Sad
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Wed Feb 29, 2012 1:51 am    Post subject: Reply with quote

Gestalt wrote:
I now know what is wrong. The _MemoryPointerRead function is calculating the address wrong. I should get 0x0177A290 But instead gets 0x000000000177A290. I don't know how to fix this though Sad


0x0177A290 == 0x000000000177A290
Back to top
View user's profile Send private message
Junk_autoit
How do I cheat?
Reputation: 0

Joined: 24 Apr 2012
Posts: 4

PostPosted: Tue Jun 05, 2012 8:24 am    Post subject: Reply with quote

Code:
$finalADDR = "0x" & Hex($baseADDR + $StaticOffset, 8)


; address in hexadecimal in format 0x #### #### (8 numbers)


Last edited by Junk_autoit on Thu Jun 07, 2012 11:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Wed Jun 06, 2012 12:25 am    Post subject: Reply with quote

Hey,
since it seems that you are from germany (because of your name) you can watch one of my "tutorials" regarding pointers and AutoIt.

http://homeofgamehacking.de/showthread.php?tid=836
Back to top
View user's profile Send private message
Rawrbotz
How do I cheat?
Reputation: 0

Joined: 19 Sep 2013
Posts: 1

PostPosted: Thu Sep 19, 2013 5:20 pm    Post subject: Reply with quote

Okay, so this thread is pretty old by now but I just wracked my brain for a while with the same problem and I came to a solution.

I was also having the problem where I wanted _MemoryPointerRead to Return me 0x01D2FBA0, but instead I was getting 0x0000000001D2FBA0.

Which is only a problem because after you get that return , in autoit you want to be able to use what it returns to you later on in your script. Mainly, I couldn't just jot down the address because it's not a static address for me.

Anyways, on to the solution. In the NomadMemory.au3 UDF, under the _MemoryPointerRead function you will find this line:

$iv_Address = '0x' & Hex($iv_Data[1] + $av_Offset[$i])

change it to:

$iv_Address = '0x' & Hex($iv_Data[1] + $av_Offset[$i], 8 )

There is another identical line further down in the function, after the Else. But you do not want to change this one or it will start Returning your Offsets.

Hope this helps other people who come across this issue, Cheers! Cool
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites