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 


What am I doing wrong with this code?

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

Joined: 26 Jun 2012
Posts: 15

PostPosted: Sat Jun 30, 2012 12:05 pm    Post subject: What am I doing wrong with this code? Reply with quote

Trying to get this to change the HP on tutorial-step 9..

Code:
        SetPrivilege("SetDebugPrivilege", 1)
        #include <NomadMemory.au3>
      #include <memmodulebaddr.au3>

        Global $PID
        Global $sModule = "MemoryMan.dll"
        Global $StaticOffset
        Global $openmem

        $PID = ProcessExists("Tutorial-i386.exe")

   $openmem = _MemoryOpen($PID)

Global $Offset1[3]
$Offset1[0] = 0 ; Is ALWAYS 0.
$Offset1[1] = Dec("49c") ; 2nd offset
$Offset1[2] = Dec("4") ; 1st offset

;Step 2
$StaticOffset = Dec("006903C0")


   $baseADDR = _MemoryModuleGetBaseAddress($PID, $sModule)
   $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)


         $r1 = _MemoryRead($finaladdr,$openmem)
         $r2 = _MemoryRead($r1 + $Offset1[1],$openmem)
         $r3 = _MemoryRead($r2 + $Offset1[2],$openmem)
         $writeTo1 = _MemoryWrite($r3, $openmem, 1000)
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