View previous topic :: View next topic |
Author |
Message |
Bit Byte Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 62
|
Posted: Mon Aug 28, 2023 5:21 am Post subject: AllMemoryRecords.active = false Before CETrainer.close() |
|
|
How can I access the onclick for the X close button on CETrainer ?
I want that all memory records execute their [DISABALE] part and become active = false before the trainer closes.
Anyone can please help me with this?
|
|
Back to top |
|
 |
Autem Expert Cheater
Reputation: 1
Joined: 30 Jan 2023 Posts: 156
|
Posted: Mon Aug 28, 2023 8:55 am Post subject: |
|
|
Hi, I just have to ask finally after seeing so many different threads all for your trainer, all based around locking down your users and disabling their functions and deleting their copies, etc... How much are you trying to charge people for this once the people here finish making it for you? I'm genuinely curious because I might also want to get into selling trainers although I previously assumed my not knowing how to make them would stop me. You seem to be having luck getting the others to piece these issues together for you, which you will then profit from, so I might as well also try that in the near future too. Also what game is this one for? How can I become a customer of yours, and for what other games too? You've stimulated my interest!
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4703
|
Posted: Mon Aug 28, 2023 10:18 am Post subject: |
|
|
I'd try to hook the OnClose property of the main form. Make sure you save and execute the original one (if it exists).
For disabling memory records, loop through all the memory records in the address list and set the Active property to false. See documentation on the AddressList class for more information.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1522
|
Posted: Mon Aug 28, 2023 12:31 pm Post subject: |
|
|
Autem wrote: | Hi, I just have to ask finally after seeing so many different threads all for your trainer, all based around locking down your users and disabling their functions and deleting their copies, etc... ... |
When I first started, I had the same kind of help requests.
Every solution code given got me a little bit closer to Lua.
I see you right.
But don't let the ignorance of enthusiastic people limit their ideas.
In this direction, please try to help those who have time.
----################-----
Ex Code;
Code: | CETrainer.OnClose=function()
alist=getAddressList()
for i=0, alist.Count-1 do
alist[i].Active=false
end
showMessage("Trainer Closed!")
sleep(1200)
closeCE()
return cafree
end
|
_________________
|
|
Back to top |
|
 |
Bit Byte Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 62
|
Posted: Mon Aug 28, 2023 1:55 pm Post subject: |
|
|
@Autem
I dont ask the questions so that people here finish making it for me.
I'm a newbie to CE and Lua, recently interest on it has grown on me.
The people here answering are more experienced say like a Mentor/Teacher.
I'm like the student, and obviously when a student gets stuck on something or doesn't know something he/she asks question to the teacher to learn. Same with me I ask to learn how something is done when I get stuck.
AylinCE said it nicely, Every solution code given to me a makes my interest for CE and Lua grow even more.
Without the mentors answering the questions here people would lose interest.
The trainer I'm trying to make is actually a anti-cheater trainer to fight off cheaters. That is the reason for my locking down users , disabling functions and deleting their copies, etc... I dont want it to be misused in the wrong hands.
I am not charging anything so no profit. Just me and 2 other in game friends testing to see if we can fight off cheaters.
Like I said only recently so not for any other games just one.
@ParkourPenguin
I dont know how to hook the OnClose property of the main form.
I'll look at the documentation on the AddressList class
@AylinCE Thank you. I will try that snippet.
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4703
|
Posted: Mon Aug 28, 2023 7:59 pm Post subject: |
|
|
Code: | local oldOnClose = MainForm.OnClose
MainForm.OnClose = function(sender, closeaction)
if oldOnClose then
closeaction = oldOnClose(sender, closeaction)
end
if closeaction == caFree then
-- deactivate memory records
end
return closeaction
end
|
Deactivating memory records might be weird if you need to do them in a certain order (e.g. child records first)
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
Bit Byte Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 62
|
Posted: Tue Aug 29, 2023 4:11 am Post subject: |
|
|
I used a different method now.
I hadn't noticed before, but while poking around found that there is already a readymade FormClose function.
CE->Table->"Your trainer Form"->Edit->Object Inspector(Events Tab)->OnClose
So mines looks like this now:
Code: | function CETrainer_FormClose(sender)
MemoryRecordList=getAddressList()
for i=0, MemoryRecordList.Count-1 do
MemoryRecordList[i].Active=false
end
showMessage("Trainer Closing!")
return caFree
end |
The loop works nicely. Thanks @ParkourPenguin & @AylinCE again for the point outs.
I have looked in the forum and found that there is this:
AddressList.disableAllWithoutExecute()
mentioned by Dark Byte here:
https://www.cheatengine.org/forum/viewtopic.php?t=610216
https://www.cheatengine.org/forum/viewtopic.php?t=609626
This disables the memory records without executing their [Disable] section I believe..
Is there such a thing as AddressList.disableAllWithtExecute()
Changing it to "With" in place of "Without" to make it so that [Disable] section is executed when disabled?
|
|
Back to top |
|
 |
|