|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
DiamondsBattle How do I cheat? Reputation: 0
Joined: 02 Aug 2022 Posts: 6
|
Posted: Tue Aug 02, 2022 10:20 am Post subject: Trouble executing a game function from the mono dissector |
|
|
Hey,
I have used DNSpy to obtain some method names and I now want to execute them with Cheat Engine but I am running into some trouble. I have pretty much no experience in lua and therefore just want to call methods manually, without needing any script.
First, when I execute a function that requires no arguments and that should return a list of strings, I get a "Method returned: 482464096" text. How can I get the actual output ?
Second, every single time I try to pass arguments to a function, I get the following output :
Code: |
Error:C:\Program Files\Cheat Engine 7.4\autorun\monoscript.lua:2297: attempt to index a nil value (global 'monopipe')
|
Am I doing something wrong, can I not call a function like this and do I need to use a script ?
Thanks
|
|
Back to top |
|
|
Frouk Master Cheater Reputation: 5
Joined: 22 Jun 2021 Posts: 489 Location: mov dword ptr [Ukraine]
|
Posted: Wed Aug 03, 2022 2:57 am Post subject: |
|
|
try to use executeMethod or executeCodeEx
executeMethod is used when game has functions for each entity itself, like using it: Code: | CEntity *player = FindPlayerEntity();
return player->GetHeading(); //first parameter is actually: CEntity *this, but for this case it won't use since we executing function from entity itself |
and also without making player variable: Code: | CEntity::GetHeading(FindPlayerEntity()); //first parameter is: CEntity *this |
_________________
void(__cdecl *Haxing)(HWND hGameWindow) |
|
Back to top |
|
|
DiamondsBattle How do I cheat? Reputation: 0
Joined: 02 Aug 2022 Posts: 6
|
Posted: Thu Aug 04, 2022 9:06 am Post subject: |
|
|
As I said, I do not want to use a script, only the mono dissector which gives me an error.
|
|
Back to top |
|
|
cooleko Grandmaster Cheater Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Thu Aug 04, 2022 12:31 pm Post subject: |
|
|
Just to point out the fallacy here, your question is:
"I want to eat soup with a fork, but the broth keeps falling back into the bowl. I don't want to use a spoon or ladle."
"You really need to use a spoon, the fork's functionality simply cannot meet your requirements, but a spoon's does."
"I told you I don't want to use a spoon, tell me how to make it work with the fork."
Maybe someone knows how to make the fork work, perhaps there is a flap/wrapper that can be used to mimic the spoon well enough, but you have the tools available to do it right and are choosing not to use them.
|
|
Back to top |
|
|
DiamondsBattle How do I cheat? Reputation: 0
Joined: 02 Aug 2022 Posts: 6
|
Posted: Sat Aug 06, 2022 6:45 am Post subject: |
|
|
Except here there's literally an intended functionnality that should make it possible without a script using the mono dissector...
Also, has the software need to have a mono.dll file ? The software only has a Mono.Security.dll file.
Edit : I made a lua script that should do what I want, but I keep getting the same error as in my first post.
Code: | if (syntaxcheck) then return end
if (LaunchMonoDataCollector()==0) then error('no mono') end
local method = mono_findMethod('', 'InventoryService', 'addItem')
local class = mono_method_getClass(method)
local instance = mono_class_findInstanceOfClassListOnly('', class)
local r = mono_invoke_method('', method, instance[#instance], {type=vtString, value='real_medieval_universal_basic_head'},{type=vtDouble, value=1},{type=MONO_TYPE_BOOL, value=false}, {type=MONO_TYPE_BOOL, value=true})
if r then
print(r)
end
|
As I said, I have almost no experience in lua, so it could be a dumb mistake
|
|
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
|
|