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 


Referencing found location of Aobscan in LUA

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

Joined: 29 Mar 2009
Posts: 16

PostPosted: Thu Dec 27, 2012 11:39 am    Post subject: Referencing found location of Aobscan in LUA Reply with quote

Hello,

basically I have a Lua script that uses Autoassemble to find some code and make changes in the assembly. But later I want to undo them. If I registerSymbol on "code" it breaks the code. Should I just add another label under "code" like "codeLocation" and then reference that (will it work)?

Thanks
Code:

function doStuff()
   autoAssemble([[
      AOBScan(code, stuff)

      code:
         do stuff
         returnStatReader:
   ]])
end

function unDoStuff()
    autoAssemble([[
        How to access "code" here to undo
    ]])
end
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Dec 27, 2012 12:10 pm    Post subject: Reply with quote

Code:
function doStuff()
   autoAssemble([[
      aobscan(code,00 11 22 33 44 55 66)
      label(codeRegisteredSymbol)
      registersymbol(codeRegisteredSymbol)

      code:
      codeRegisteredSymbol:

         do stuff
         returnStatReader:
   ]])
end

function unDoStuff()
   autoAssemble([[
      codeRegisteredSymbol:
      db 00 11 22 33 44 55 66
   ]])
end

_________________
Back to top
View user's profile Send private message MSN Messenger
Phenax
Newbie cheater
Reputation: 0

Joined: 29 Mar 2009
Posts: 16

PostPosted: Thu Dec 27, 2012 12:26 pm    Post subject: Reply with quote

Thank you, seems to work..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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