 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
korbealad How do I cheat?
Reputation: 0
Joined: 14 Jun 2023 Posts: 2
|
Posted: Wed Jun 14, 2023 3:55 am Post subject: How to Jit and invoke a method in auto assembler? |
|
|
Hello. I have a game where I always find a given method using mono dissector, JIT it and then invoke the method with a boolean parameter. I'd like to automate this process in an AA script. You can see where the method is in the attachment.
Now I assume that I should first call
Code: | LaunchMonoDataCollector() |
then in order to Jit the methond I need to call
Code: | address=mono_compile_method(methodId) |
So I need to find Method ID, presumably by calling
Code: | methodId=mono_class_findMethod(classId, "set_RunInBackground") |
But to do that I need to get classID, which I can probably obtain by calling
Code: | classId=mono_findClass(namespace, "UnityEngine.Application") |
Here i run into a problem, because I am not sure what namespace should be. is it the "UnityEngine.CoreModule" in the image? If it isn't, where do I get it?
In the end I would like to call Code: | mono_invoke_method(domainId, methodId, address, args...) |
Where I am not sure how to get the domainId argument and how to set up the "args" in order to pass one true boolean value (I am new at lua, but I believe I can eventually figure out the latter. Though I am at loss with the domainId).
So I would like to ask how to get namespace, domainId and properly set up the args A pointer to a suitable tutorial would also be appreciated!
Description: |
|
Filesize: |
6.11 KB |
Viewed: |
2662 Time(s) |

|
|
|
Back to top |
|
 |
YoucefHam Cheater
Reputation: 5
Joined: 19 Mar 2015 Posts: 39 Location: Algeria
|
Posted: Wed Jun 14, 2023 3:37 pm Post subject: Re: How to Jit and invoke a method in auto assembler? |
|
|
See this code, from JohnFK
Code: |
{$lua}
[ENABLE]
if syntaxcheck then return end
if not monopipe then if LaunchMonoDataCollector() == 0 then error(MessageDialog('Failed to Launch Mono Data Collector', mtError, mbClose)) end end
local method = mono_findMethod('UnityEngine', 'Application', 'set_runInBackground')
local domain = mono_enumDomains()[1]
local args={}
args[1]={}
args[1].type=vtByte
args[1].value=1
mono_invoke_method(domain, method, 0, args)
[DISABLE]
local method = mono_findMethod('UnityEngine', 'Application', 'set_runInBackground')
local domain = mono_enumDomains()[1]
local args={}
args[1]={}
args[1].type=vtByte
args[1].value=0
mono_invoke_method(domain, method, 0, args)
--https://fearlessrevolution.com/viewtopic.php?p=114720#p114720
|
|
|
Back to top |
|
 |
korbealad How do I cheat?
Reputation: 0
Joined: 14 Jun 2023 Posts: 2
|
Posted: Wed Jun 14, 2023 4:51 pm Post subject: |
|
|
Thank you so much! I tried searching before of course but didn't find the particular linked post. The code answered all of my questions
|
|
Back to top |
|
 |
|
|
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
|
|