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 


Call mono method from class

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Xanathos
How do I cheat?
Reputation: 0

Joined: 13 Mar 2021
Posts: 4

PostPosted: Wed Mar 17, 2021 6:44 pm    Post subject: Call mono method from class Reply with quote

Hello everyone,
I'm very new to mono, and seems like very powerful.
I'm grateful to Dark Byte for bringing CE bunch of features (used CE like 15 years ago for basic stuffs...).

If I understand well, you can call a method from a class using mono, basically in my DLL, there is bunch of interesting stuffs, and wanted to try something quite simple but complicated for me, any guidance or example would be appreciated.

There is a class named "Blis Common CmdHeal", under methods it has one "Blis Common CmdHeal Action", if I understand correctly it is used to heal yourself parsed in parameters of the method as Blis Client LocalCharacter ?

How would I execute that method in game?

Thank you.



mono.png
 Description:
 Filesize:  86.86 KB
 Viewed:  3921 Time(s)

mono.png


Back to top
View user's profile Send private message
Xanathos
How do I cheat?
Reputation: 0

Joined: 13 Mar 2021
Posts: 4

PostPosted: Wed Mar 24, 2021 9:02 am    Post subject: Reply with quote

No help? Sad
Back to top
View user's profile Send private message
Oxijen
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Wed Mar 24, 2021 9:22 am    Post subject: Reply with quote

i know 2 ways to call methods in a unity (il2cpp) game, one of the is using melon loader (c#) (for mono and il2cpp) and the other is using Il2cpp Inspector (c++) if you know any of these languages i recommend using those tools
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Wed Mar 24, 2021 12:30 pm    Post subject: Reply with quote

find the instance to a Blis.Command.CmdHeal
an instance to a Clientservice, and an instance to a LocalCharacter

then you can use mono_invoke_method to execute that method.

But perhaps you can find another function somewhere else to do what you wish. E.g a method inside the Character itself

_________________
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
View user's profile Send private message MSN Messenger
Xanathos
How do I cheat?
Reputation: 0

Joined: 13 Mar 2021
Posts: 4

PostPosted: Wed Mar 24, 2021 2:07 pm    Post subject: Reply with quote

Dark Byte wrote:
find the instance to a Blis Command CmdHeal
an instance to a Clientservice, and an instance to a LocalCharacter

then you can use mono_invoke_method to execute that method.

But perhaps you can find another function somewhere else to do what you wish. E.g a method inside the Character itself


Problem is, that I have so many instances.
I guess the Character is the objectId.

I also followed your recommendations, found Character heal info.
Whenever I try to invoke, and put a value to hp or sp fields, I get the following error "Error:C:\Program Files\Cheat Engine 7.2\autorun\monoscript.lua:1887: attempt to index a nil value (global 'monopipe')"



2021-03-24 21_33_54-Cheat Engine 7.2.png
 Description:
 Filesize:  251.87 KB
 Viewed:  3816 Time(s)

2021-03-24 21_33_54-Cheat Engine 7.2.png



2021-03-24 21_01_09-Instances of CmdHeal.png
 Description:
 Filesize:  22.41 KB
 Viewed:  3825 Time(s)

2021-03-24 21_01_09-Instances of CmdHeal.png


Back to top
View user's profile Send private message
blankTM
Cheater
Reputation: 0

Joined: 03 May 2020
Posts: 49

PostPosted: Thu Mar 25, 2021 10:16 am    Post subject: Re: Call mono method from class Reply with quote

Maybe monoTypeToVartypeLookup error
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 Lua Scripting 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