Since I saw that the top thread in here was a request for help for making a trainer in Cheat Engine I decided to share my
knowledge which I gathered in the last few years. Thanks to MPGH at this point.
Originally Posted by
ZleMyzteX
So, I want to start doing some trainers for games. I know how to save values and stuff on cheat engine, but i really don't know what to do to get it into a nice looking trainer. Would love to get a link to a tutorial or something, thanks in advance :)
Thread: https://www.mpgh.net/forum/showthread.php?t=1291262
Cheat Engine Trainer - Tutorial
Here we go. I will tell you how to make a Checkbox which, if you check it, enables the Ban Bypass for Memory Editing for Growtopia 2.990.
This can be used to make professional looking trainers with an user interface or whatever you want.
First of all. Open Cheat Engine. Navigate to "File" > "Generate generic trainer Lua script from table". It will open up the dialog to make a trainer.
By clicking on "Design userinterface manually" you can design the trainer yourself.
Place a Checkbox into you trainer design. Change the properties to your desires. Navigate to the "Events" Tab and Double-click on the Event "OnChange". It will create a new function inside your main lua script for your trainer. Paste this code into that function:
Code:
if CETrainer.REPLACE_WITH_YOUR_CHECKBOX_NAME.State == cbChecked then
autoAssemble[[
// Here you can put your script for the memory editing
// You won't need the "Prefixes" [Enable] & [Disable]
// Inside here comes the [Enable] Part
]]
else
autoAssemble[[
// Here you can put your script for the memory editing
// You won't need the "Prefixes" [Enable] & [Disable]
// Inside here comes the [Disable] Part
]]
end
What it does is simple. If the Checkbox is checked (cbChecked - is the attribute for that state) it runs the Auto Assemble Part which is defined by this "Prefix" autoAssemble[[Your_Script_into_here]]. And if the Checkbox is not checked it will run the Assemble Part inside the else. Shouldn't be too complicated. If you can code in Cheat Engine's LUA - you get it. There are harder ways to do it. But this one is the most simplest one I've seen while working with Cheat Engine.
Same can be used with Buttons. But in that case you don't use the OnChange Event but the OnClick one! Now you use the "Prefix" for it again (autoAssemble[[Your_Script_into_here]]). Then put your Script inside the Brackets and you are done. You will need to use 2 Buttons. One to enable and one to disable a "Cheat" as example. Or you use a really complicated way to use bools inside CE's LUA.
If there's still something you want to know. Ask it in here. I will adjust the thread then. This will then help even more in total.
I could technically add Screenshots. Add a Tutorial on how to make Script or make a list of operation codes and their bytes value, changes between two different ones, etc.
If you need a Tutorial for this in C# - I can help you out too.
And if this helped you - Don't mind to let me know! :)
- D.