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 


[HELP] Main + Child Script lua

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Thu Nov 10, 2016 3:09 am    Post subject: [HELP] Main + Child Script lua Reply with quote

so I've made a nice little script which has almost 7 childs that activate when the main one is activated

I wanna know how to put the scripts inside a trainer using lua

Maybe on a button press, it will activate the main script then all the children scripts.

_________________
Another Day, Another Hack.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Nov 10, 2016 5:52 am    Post subject: Reply with quote

so, let's say you have MainScript and ChildScript1, ChildScript2, ChildScript3, ...

And memory record with MainScript also acts as GroupHeader and you set
"Activating this entry activates it's children" and "Deactivating this entry deactivates it's children"


If memory record with MainScript has a description "main script" you can use this Lua script:

Code:

MRmainscript = getTableEntry("main script")

function CEButton1Click(sender)
  MRmainscript.Active = not MRmainscript.Active
end


(I assume you created your own GUI with FormDesigner and created a button with OnClick event)

_________________
Back to top
View user's profile Send private message MSN Messenger
johnkittz
Advanced Cheater
Reputation: 0

Joined: 17 May 2016
Posts: 95
Location: orderandhacks

PostPosted: Thu Nov 10, 2016 11:35 am    Post subject: Reply with quote

mgr.inz.Player wrote:
so, let's say you have MainScript and ChildScript1, ChildScript2, ChildScript3, ...

And memory record with MainScript also acts as GroupHeader and you set
"Activating this entry activates it's children" and "Deactivating this entry deactivates it's children"


If memory record with MainScript has a description "main script" you can use this Lua script:

Code:

MRmainscript = getTableEntry("main script")

function CEButton1Click(sender)
  MRmainscript.Active = not MRmainscript.Active
end


(I assume you created your own GUI with FormDesigner and created a button with OnClick event)


It won't activate I created a OnClick Event for the Button then simply typed out what you said here replacing ("Main Script") with my Script name

_________________
Another Day, Another Hack.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Nov 11, 2016 9:25 am    Post subject: Reply with quote

Attach your CT file here.
_________________
Back to top
View user's profile Send private message MSN Messenger
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