View previous topic :: View next topic |
Author |
Message |
BanCheese Cheater Reputation: 0
Joined: 22 Oct 2014 Posts: 49
|
Posted: Sat Nov 15, 2014 1:41 pm Post subject: Calling Lua from AA with multiple parameters |
|
|
So I'm attempting to call readRegionFromFile in an AA script. I've imported the lua template, but the example call there only uses a single integer variable. Could somebody explain to me how I would make a lua call with two variables, a string and an int? Thanks!
_________________
A guy who likes memory hacking. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Nov 15, 2014 2:12 pm Post subject: |
|
|
Are you asking how to pass parameters to a lua function?
And do you really need to call it from inside the game in a code injection?
If not you do not use the lua template and just use luacall or a {$lua} section
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
Last edited by Dark Byte on Sat Nov 15, 2014 2:15 pm; edited 1 time in total |
|
Back to top |
|
|
BanCheese Cheater Reputation: 0
Joined: 22 Oct 2014 Posts: 49
|
Posted: Sat Nov 15, 2014 2:13 pm Post subject: |
|
|
Yes, I am. I'd assume you'd just push multiple parameters onto the stack, and a string would be a pointer, but in what order?
_________________
A guy who likes memory hacking. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Nov 15, 2014 2:19 pm Post subject: |
|
|
If you insist on using the lua template and want more than 1 parameter, then set asside a block of memory for the parameters (e.g ebp-xxx) and then pass the address of that block to the function. You can then use readInteger and the likes to read the different parameters
But again, are you sure luacall or {$lua} isn't better?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
BanCheese Cheater Reputation: 0
Joined: 22 Oct 2014 Posts: 49
|
Posted: Sat Nov 15, 2014 2:25 pm Post subject: |
|
|
Alright -- I suppose you're right. Where can I find some documentation on luacall? I searched the wiki and did a quick google search, but I couldn't find anything. Or is it simply just lucall(luastuffhere)? Thanks for all of the help, I really appreciate it!
EDIT: I managed to find one of your previous posts, and I think it'll work. Thanks!
_________________
A guy who likes memory hacking. |
|
Back to top |
|
|
|