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 


Automating a sequence of tasks - how to get started?

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

Joined: 27 Jun 2023
Posts: 3

PostPosted: Tue Jun 27, 2023 2:06 am    Post subject: Automating a sequence of tasks - how to get started? Reply with quote

Hi,

I frequently execute the following steps. I am pretty sure there is a way to automate these with Lua, but I have no idea how to get started. For example, is there a way to record clicks in the UI into a Lua script? If not, how do I find out what Lua function matches which UI element? And once I have the Lua script, how/where do I execute it?

It would be great if someone could help me getting started.

Here's what I want to automate:


- Activate Mono features
- Go to .NetInfo
- Select the "Assembly-CSharp" bundle
- Select the "PlayerData" class
- Write down the address of the one static instance
- Create address table entries matching several of the PlayerData fields for the static instance
- Set them to specific values
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Tue Jun 27, 2023 4:50 am    Post subject: Reply with quote

Check monoscript.lua in the autorun directory of your Cheat Engine installation folder for more information on the Lua functions you could use.

This is all very possible. Once you have the Lua script you can use it in a normal Auto Assembler script within Cheat Engine:
Code:

[ENABLE]
{$LUA}
if syntaxcheck then return end

//-- Your Lua script here
{$ASM}
[DISABLE]
Back to top
View user's profile Send private message
Nikratio
How do I cheat?
Reputation: 0

Joined: 27 Jun 2023
Posts: 3

PostPosted: Tue Jun 27, 2023 6:35 am    Post subject: Reply with quote

Thanks for the quick reply!

I'm still a little lost. I looked at the monoscript.lua file and it indeed contains a lot of code, but unfortunately nothing that would help me find out what a given function does, or how to find a function that does something I need.

Is there maybe a simpler example somewhere, with more comments?


I'm also not sure what "a normal Auto Assember script" is, and how to execute it. Is this perhaps documented somewhere?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Tue Jun 27, 2023 7:06 am    Post subject: Reply with quote

Nikratio wrote:
Thanks for the quick reply!

I'm still a little lost. I looked at the monoscript.lua file and it indeed contains a lot of code, but unfortunately nothing that would help me find out what a given function does, or how to find a function that does something I need.

Is there maybe a simpler example somewhere, with more comments?


I'm also not sure what "a normal Auto Assember script" is, and how to execute it. Is this perhaps documented somewhere?


I would recommend that you learn how to use CE before delving into using Lua and the functions provided by CE. I say that because creating an auto assembler script is incredibly basic and is taught in the normal tutorial within Cheat Engine.

It helps to have some programming experience with Lua to read the code within monoscript. It's a lot to explain in a single post.
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