View previous topic :: View next topic |
Author |
Message |
satanrules666 Advanced Cheater Reputation: 0
Joined: 31 Oct 2010 Posts: 70 Location: New Zealand
|
Posted: Thu Sep 01, 2016 9:47 pm Post subject: Requesting a Tutorial... |
|
|
So Lately with cheat engine trainer maker I have been trying to insert a timer to my trainer that will look for the process and then if change a label to say game found or game not found(if game is not running).
So I've looked around here and all the code I tried every time It executes I get Lua going nuts saying error attempting to use a nil value or something even though the game was attached.
If someone could write up a nice tutorial show how to do this it would be helpful to everyone. I sort of wish there was a automated process but that would require some magic and a cheat engine update.
The only other way Is I found a tutorial for making a trainer in C# but the guy doing it only uses addresses plus pointers. So id need to find how to write to process memory and read it in C#.
Also this would teach people LUA so far I'm not a very big fan of it. Plus all over Youtube the only tutorials for making trainers are in C# or C++.
_________________
|
|
Back to top |
|
|
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Fri Sep 02, 2016 8:27 am Post subject: Re: Requesting a Tutorial... |
|
|
It is a game for only one process ?, ie it is not browser
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Sep 02, 2016 11:28 am Post subject: |
|
|
Code: | if mytimer == nil then
mytimer = createTimer(nil, false)
end
mytimer.Interval = 1000
mytimer.OnTimer = function(timer)
if readInteger("game.exe") == nil then
UDF1.CELabel1.Caption = "Game Not Found"
else
UDF1.CELabel1.Caption = "Game Found"
end
end
mytimer.Enabled = true |
|
|
Back to top |
|
|
satanrules666 Advanced Cheater Reputation: 0
Joined: 31 Oct 2010 Posts: 70 Location: New Zealand
|
Posted: Fri Sep 02, 2016 2:21 pm Post subject: |
|
|
Quote: |
Filipe_Br
It is a game for only one process ?, ie it is not browser
|
Yes
Quote: |
if mytimer == nil then
mytimer = createTimer(nil, false)
end
mytimer.Interval = 1000
mytimer.OnTimer = function(timer)
if readInteger("game.exe") == nil then
UDF1.CELabel1.Caption = "Game Not Found"
else
UDF1.CELabel1.Caption = "Game Found"
end
end
mytimer.Enabled = true
|
Thanks Zanzer Ill try this in the LUA script does this go anywhere or does it go within a timers function if you add one..
also do you need to change game.exe to the process exe.
Edit I tried this code though it says something about indexing a Nil value or something.
I've never used one of these before so any sort of explanation as to how this works and what I need to change if anything would be good.
_________________
Last edited by satanrules666 on Fri Sep 02, 2016 2:39 pm; edited 1 time in total |
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Sep 02, 2016 2:34 pm Post subject: |
|
|
If you're inserting a timer object in the form, then just add the OnTimer event and populate the function it generates.
Yes, you'll need to change game.exe to your process name. Just like you need to change the form and label names to match your trainer.
Code: | function CETimer1Timer(sender)
if readInteger("game.exe") == nil then
UDF1.CELabel1.Caption = "Game Not Found"
else
UDF1.CELabel1.Caption = "Game Found"
end
end |
|
|
Back to top |
|
|
satanrules666 Advanced Cheater Reputation: 0
Joined: 31 Oct 2010 Posts: 70 Location: New Zealand
|
Posted: Fri Sep 02, 2016 3:01 pm Post subject: |
|
|
Zanzer
You legend...
Done it after messing around for a bit
Just added it to my CEListView1Data
Code: |
if mytimer == nil then --Leave this
mytimer = createTimer(nil, false) --Leave this
end --Leave this
mytimer.Interval = 1000 --Leave this
mytimer.OnTimer = function(timer) --Leave this
if readInteger("farcry3_d3d11.exe") == nil then --change ("whateverishere to your games name")
CETrainer.lbl_process.Caption = "Game Not Found" --Change CETrainer to the name of your first form default is this. CETrainer its the form right at the top of the Components list. change lbl_process to the name you have given your Label not its caption its name.
else --Leave this
CETrainer.lbl_process.Caption = "Game Found" -- same as above
end --Leave this
end -- Leave this
mytimer.Enabled = true --Leave this.
You know tonight as I can stay up I was half way through a tutorial on coding a DLL injector and making a trainer for it in C++ following a tutorial on Youtube. Coding up all the cheat is time consuming when Cheat engine blissfully does it for you.
Though ill prob still go though with the tutorial I was following later as learning a programing language is good.
|
_________________
|
|
Back to top |
|
|
|