View previous topic :: View next topic |
Author |
Message |
mindoff Advanced Cheater Reputation: 0
Joined: 12 Jun 2016 Posts: 96
|
Posted: Tue Jul 04, 2017 6:52 am Post subject: How to get App multi address in LUA |
|
|
Cheat Table can save some green pointer address like
"aa.exe"+00A935C8
with offset 21E1c
the offset address is const
say it's a position variable,how can I use this address in LUA?
I need to read and write this value automatic.
Right now I just hard code the address every time,because I don't know how to load this address in LUA
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Tue Jul 04, 2017 8:10 am Post subject: |
|
|
Code: | address = "[aa.exe+00A935C8]+21E1c" |
Yes, it's really that simple
|
|
Back to top |
|
|
mindoff Advanced Cheater Reputation: 0
Joined: 12 Jun 2016 Posts: 96
|
Posted: Tue Jul 04, 2017 9:47 am Post subject: |
|
|
FreeER wrote: | Code: | address = "[aa.exe+00A935C8]+21E1c" |
Yes, it's really that simple |
Isn't this a string?And try other combination,not working...
OK,got it.Thank you very much.
test = getAddress("[aa.exe+00A935C8]+21E10")
print(test)
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Tue Jul 04, 2017 10:58 am Post subject: |
|
|
Yes that's a string, any CE function that wants an address can take it as a string and it'll do the translations to figure out what the real numeric address is, that way you can use registerSymbol to register say, "playerbase" as a symbol that represents the real address in memory and use "[playerbase+4]" as the address of the health for example or simply the module name plus an offset like "aa.exe+00A935C8"
Yes, you can use getAddress to have CE return the numeric address to you so that you can do typical lua math with it, do note that if that address does not exist for some reason getAddress will call the error function causing the script to stop if you haven't set the errorOnLookupFailure to false (in which case it returns 0) or used pcall. In CE 6.7 you can use GetAddressSafe which simply returns nil if the translation fails.
|
|
Back to top |
|
|
mindoff Advanced Cheater Reputation: 0
Joined: 12 Jun 2016 Posts: 96
|
Posted: Tue Jul 04, 2017 9:28 pm Post subject: |
|
|
thank you again,I will add error handle right now.
|
|
Back to top |
|
|
|