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 


[SOLVED] Delaying functions in auto assembler

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
dslgee
Newbie cheater
Reputation: 0

Joined: 16 Jul 2009
Posts: 10

PostPosted: Sun Jan 06, 2013 8:03 am    Post subject: [SOLVED] Delaying functions in auto assembler Reply with quote

Does anyone know how to delay an auto assembler script?
(i.e. i want to enable script A after a period when i triggered the script, say 30 sec)


Last edited by dslgee on Sun Jan 06, 2013 10:01 am; edited 1 time in total
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jan 06, 2013 8:07 am    Post subject: Reply with quote

Use LUA and timers.
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dslgee
Newbie cheater
Reputation: 0

Joined: 16 Jul 2009
Posts: 10

PostPosted: Sun Jan 06, 2013 8:11 am    Post subject: Reply with quote

DaSpamer wrote:
Use LUA and timers.

Usually i generate trainers for the game using Cheat Engine (trainers are undetected), how could I generate trainers with these functions??

(many thanks for your help, im new to the functions in cheat engine)
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jan 06, 2013 8:43 am    Post subject: Reply with quote

You want, like enable 1 script and after 30 sec enable like other or disable it?
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dslgee
Newbie cheater
Reputation: 0

Joined: 16 Jul 2009
Posts: 10

PostPosted: Sun Jan 06, 2013 8:46 am    Post subject: Reply with quote

DaSpamer wrote:
You want, like enable 1 script and after 30 sec enable like other or disable it?

enable 1 script and after 30 sec enable other
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jan 06, 2013 8:58 am    Post subject: Reply with quote

Alright change your AA scripts to AA1 (the first to enable) and AA2 (the second) or edit the name in the script..
Then add a button or something that will call the function (I'd recomend a button)
then add this to LUA (Ctrl+Alt+L)

Code:
function AA1()
local AA1= addresslist_getMemoryRecordByDescription(getAddressList(), "AA1")
memoryrecord_freeze(AA1)
Timer()
end

function Timer(timer)
t=createTimer(nil);
timer_setInterval(t,30000)
timer_onTimer(t,AA2)
end

function AA2()
timer_setEnabled(t,false)
local AA2= addresslist_getMemoryRecordByDescription(getAddressList(), "AA2")
memoryrecord_freeze(AA2)
end

Then edit the button.. (text what you want..) and press on events, after that press "onClick" and pick the AA1.. and test..

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dslgee
Newbie cheater
Reputation: 0

Joined: 16 Jul 2009
Posts: 10

PostPosted: Sun Jan 06, 2013 9:27 am    Post subject: Reply with quote

DaSpamer wrote:
Alright change your AA scripts to AA1 (the first to enable) and AA2 (the second) or edit the name in the script..
Then add a button or something that will call the function (I'd recomend a button)
then add this to LUA (Ctrl+Alt+L)

Code:
function AA1()
local AA1= addresslist_getMemoryRecordByDescription(getAddressList(), "AA1")
memoryrecord_freeze(AA1)
Timer()
end

function Timer(timer)
t=createTimer(nil);
timer_setInterval(t,30000)
timer_onTimer(t,AA2)
end

function AA2()
timer_setEnabled(t,false)
local AA2= addresslist_getMemoryRecordByDescription(getAddressList(), "AA2")
memoryrecord_freeze(AA2)
end

Then edit the button.. (text what you want..) and press on events, after that press "onClick" and pick the AA1.. and test..

How should I do if I am using hotkey??
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jan 06, 2013 9:39 am    Post subject: Reply with quote

Code:
function AA1()
local AA1= addresslist_getMemoryRecordByDescription(getAddressList(), "AA1")
memoryrecord_freeze(AA1)
Timer()
end
createHotkey(AA1, VK_1) --the button 1 will call AA1, change it to what you want...

function Timer(timer)
t=createTimer(nil);
timer_setInterval(t,30000)
timer_onTimer(t,AA2)
end

function AA2()
timer_setEnabled(t,false)
local AA2= addresslist_getMemoryRecordByDescription(getAddressList(), "AA2")
memoryrecord_freeze(AA2)
end

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dslgee
Newbie cheater
Reputation: 0

Joined: 16 Jul 2009
Posts: 10

PostPosted: Sun Jan 06, 2013 9:44 am    Post subject: Reply with quote

DaSpamer wrote:
Code:
function AA1()
local AA1= addresslist_getMemoryRecordByDescription(getAddressList(), "AA1")
memoryrecord_freeze(AA1)
Timer()
end
createHotkey(AA1, VK_1) --the button 1 will call AA1, change it to what you want...

function Timer(timer)
t=createTimer(nil);
timer_setInterval(t,30000)
timer_onTimer(t,AA2)
end

function AA2()
timer_setEnabled(t,false)
local AA2= addresslist_getMemoryRecordByDescription(getAddressList(), "AA2")
memoryrecord_freeze(AA2)
end

ive test the code once, it is working but in the end AA2 is being freezed permanently...can it be replaced by just toggling the assembler scripts?
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jan 06, 2013 9:54 am    Post subject: Reply with quote

Main reason why I don't like creating items in the form..`.. Razz
Anyway heres a .CT



example.CT
 Description:

Download
 Filename:  example.CT
 Filesize:  1.78 KB
 Downloaded:  610 Time(s)


_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dslgee
Newbie cheater
Reputation: 0

Joined: 16 Jul 2009
Posts: 10

PostPosted: Sun Jan 06, 2013 10:01 am    Post subject: Reply with quote

DaSpamer wrote:
Main reason why I don't like creating items in the form..`.. Razz
Anyway heres a .CT

That is what i want Exclamation Exclamation
Thanks for your help! Very Happy Very Happy
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 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