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 


How to scan AOB with timer in checkbox

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

Joined: 27 Jul 2016
Posts: 123

PostPosted: Tue Jun 19, 2018 9:48 am    Post subject: How to scan AOB with timer in checkbox Reply with quote

Hello guys Very Happy
After a while I posted the article, but did not receive any support.
I have researched and generated my code as below. Very Happy
Code:

function openhackClick(sender)
local form = createForm( true );
control_setCaption(form, [[Hack it ! ! !]])

checkBoxes = createCheckBox( form );



    control_setCaption( checkBoxes, "Hack it ");
    control_setPosition( checkBoxes, 10,  20 )


checkbox_onChange(checkBoxes, test1Click)

   local szAOB_Hack1      = "" ----AOB hack 1
   local szAOB_Hack2    = "" ----AOB hack 2
   local szAOB_ScanHack    = "" ----AOB scan hack
   local stringlist=AOBScan(szAOB_ScanHack);
   local firststring = strings_getString(stringlist, 0);


time_inc = 0
time1 = 1 -- 1 second
time2 = 2 -- 2 second


mytimer = mytimer or createTimer(nil, false)
mytimer.Interval = 1000

mytimer.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod1 = math.mod(time_inc,time1)
local time_mod2 = math.mod(time_inc,time2)

if time_mod1 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_Hack1);
end
-- scrip autoAssemble hack 1
if time_mod2 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_Hack2);
    -- scrip autoAssemble hack 2
end

if time_inc > 1000 then time_inc = 0 end

end

function test1Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer.Enabled = sender.Checked
end
end

My question is, how do I create more a check in form?
For example
Code:

   local szAOB_Hack3      = "" ----AOB hack 3
   local szAOB_Hack4    = "" ----AOB hack 4
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Tue Jun 19, 2018 9:57 am    Post subject: Reply with quote

Quote:
how do I create more a check in form?
... um, that's... descriptive.
Code:
-- in form
if more check then
  whatever
end

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 123

PostPosted: Tue Jun 19, 2018 11:08 am    Post subject: Reply with quote

FreeER wrote:
Quote:
how do I create more a check in form?
... um, that's... descriptive.
Code:
-- in form
if more check then
  whatever
end

Does that mean I can add checkbox to the in form?
The following example I tried but failed, if it's wrong, fix it for me Razz
Thank you !
Code:


function openhackClick(sender)
local form = createForm( true );
control_setCaption(form, [[Hack it ! ! !]])

checkBoxes = createCheckBox( form );



    control_setCaption( checkBoxes, "Hack it ");
    control_setCaption( checkBoxes2, "Hack it 2 ");
    control_setPosition( checkBoxes, 10,  20 )
    control_setPosition( checkBoxes2, 10,  30 )


checkbox_onChange(checkBoxes, test1Click)
checkbox_onChange(checkBoxes2, test2Click)

   local szAOB_Hack1      = "" ----AOB hack 1
   local szAOB_Hack2    = "" ----AOB hack 2
   local szAOB_Hack3     = "" ----AOB hack 3
   local szAOB_Hack4    = "" ----AOB hack 4
   local szAOB_ScanHack    = "" ----AOB scan hack
   local stringlist=AOBScan(szAOB_ScanHack);
   local firststring = strings_getString(stringlist, 0);


time_inc = 0
time1 = 1 -- 1 second
time2 = 2 -- 2 second
time3 = 3 -- 3 second
time4 = 4 -- 4 second

------Hack it--------------
mytimer = mytimer or createTimer(nil, false)
mytimer.Interval = 1000

mytimer.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod1 = math.mod(time_inc,time1)
local time_mod2 = math.mod(time_inc,time2)

if time_mod1 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_Hack1);
end
-- scrip autoAssemble hack 1
if time_mod2 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_Hack2);
    -- scrip autoAssemble hack 2
end

if time_inc > 1000 then time_inc = 0 end

end
------Hack it 2------------
mytimer1 = mytimer1 or createTimer(nil, false)
mytimer1.Interval = 1000

mytimer1.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod3 = math.mod(time_inc,time3)
local time_mod4 = math.mod(time_inc,time4)

if time_mod3 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_Hack3);
end
-- scrip autoAssemble hack 3
if time_mod4 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_Hack4);
    -- scrip autoAssemble hack 4
end

if time_inc > 1000 then time_inc = 0 end

end
----------------------------
function test1Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer.Enabled = sender.Checked
end
---------------------------
function test2Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer.Enabled = sender.Checked
end
end
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Tue Jun 19, 2018 11:39 am    Post subject: Reply with quote

Quote:
Does that mean I can add checkbox to the in form?
I don't see a form called "in" but just looking at the first function you could change

Code:
local form = createForm( true );
control_setCaption(form, [[Hack it ! ! !]])

checkBoxes = createCheckBox( form );



    control_setCaption( checkBoxes, "Hack it ");
    control_setCaption( checkBoxes2, "Hack it 2 ");
    control_setPosition( checkBoxes, 10,  20 )
    control_setPosition( checkBoxes2, 10,  30 )
to
Code:
local form = createForm( true );
control_setCaption(form, [[Hack it ! ! !]])

checkBoxes = createCheckBox( form );
checkBoxes2 = createCheckBox( form );

control_setCaption( checkBoxes, "Hack it ");
control_setCaption( checkBoxes2, "Hack it 2 ");

control_setPosition( checkBoxes, 10,  20 )
control_setPosition( checkBoxes2, 10,  20 + control_getHeight(checkBoxes) )
or in the newer syntax
Code:
local form = createForm( true );
form.caption="Hack it ! ! !"

checkBoxes  = createCheckBox( form );
checkBoxes2 = createCheckBox( form );

checkBoxes.Caption  = "Hack it ";
checkBoxes2.Caption = "Hack it 2 ";

checkBoxes.setPosition(10,  20)
checkBoxes2.Left = checkBoxes.Left
checkBoxes2.Top  = checkBoxes.Top + checkBoxes.Height
-- same as v
-- checkBoxes2.setPosition(checkBoxes.Left,  checkBoxes.Top + checkBoxes.Height)
-- get pos from checkBoxes that way if you decide to put it elsewhere
-- you only have to change the first
-- you can do it with the older control_ syntax too but it'd be quite long

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 123

PostPosted: Tue Jun 19, 2018 11:50 am    Post subject: Reply with quote

FreeER wrote:
Quote:
Does that mean I can add checkbox to the in form?
I don't see a form called "in" but just looking at the first function you could change

Code:
local form = createForm( true );
control_setCaption(form, [[Hack it ! ! !]])

checkBoxes = createCheckBox( form );



    control_setCaption( checkBoxes, "Hack it ");
    control_setCaption( checkBoxes2, "Hack it 2 ");
    control_setPosition( checkBoxes, 10,  20 )
    control_setPosition( checkBoxes2, 10,  30 )
to
Code:
local form = createForm( true );
control_setCaption(form, [[Hack it ! ! !]])

checkBoxes = createCheckBox( form );
checkBoxes2 = createCheckBox( form );

control_setCaption( checkBoxes, "Hack it ");
control_setCaption( checkBoxes2, "Hack it 2 ");

control_setPosition( checkBoxes, 10,  20 )
control_setPosition( checkBoxes2, 10,  20 + control_getHeight(checkBoxes) )
or in the newer syntax
Code:
local form = createForm( true );
form.caption="Hack it ! ! !"

checkBoxes  = createCheckBox( form );
checkBoxes2 = createCheckBox( form );

checkBoxes.Caption  = "Hack it ";
checkBoxes2.Caption = "Hack it 2 ";

checkBoxes.setPosition(10,  20)
checkBoxes2.Left = checkBoxes.Left
checkBoxes2.Top  = checkBoxes.Top + checkBoxes.Height
-- same as v
-- checkBoxes2.setPosition(checkBoxes.Left,  checkBoxes.Top + checkBoxes.Height)
-- get pos from checkBoxes that way if you decide to put it elsewhere
-- you only have to change the first
-- you can do it with the older control_ syntax too but it'd be quite long

Would you please help me test the code below
I tried it but it did not work as expected
Code:
   local szAOB_Hack1      = "" ----AOB hack 1
   local szAOB_Hack2    = "" ----AOB hack 2
   local szAOB_Hack3     = "" ----AOB hack 3
   local szAOB_Hack4    = "" ----AOB hack 4
   local szAOB_ScanHack    = "" ----AOB scan hack
   local stringlist=AOBScan(szAOB_ScanHack);
   local firststring = strings_getString(stringlist, 0);


time_inc = 0
time1 = 1 -- 1 second
time2 = 2 -- 2 second
time3 = 3 -- 3 second
time4 = 4 -- 4 second

------Hack it--------------
mytimer = mytimer or createTimer(nil, false)
mytimer.Interval = 1000

mytimer.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod1 = math.mod(time_inc,time1)
local time_mod2 = math.mod(time_inc,time2)

if time_mod1 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_Hack1);
end
-- scrip autoAssemble hack 1
if time_mod2 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_Hack2);
    -- scrip autoAssemble hack 2
end

if time_inc > 1000 then time_inc = 0 end

end
------Hack it 2------------
mytimer1 = mytimer1 or createTimer(nil, false)
mytimer1.Interval = 1000

mytimer1.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod3 = math.mod(time_inc,time3)
local time_mod4 = math.mod(time_inc,time4)

if time_mod3 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_Hack3);
end
-- scrip autoAssemble hack 3
if time_mod4 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_Hack4);
    -- scrip autoAssemble hack 4
end

if time_inc > 1000 then time_inc = 0 end

end
----------------------------
function test1Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer.Enabled = sender.Checked
end
---------------------------
function test2Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer.Enabled = sender.Checked
end
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Tue Jun 19, 2018 11:56 am    Post subject: Reply with quote

I don't know what you expect it to do... you've never properly explained so how am I supposed to check why it does not do whatever you expect it to??
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 123

PostPosted: Wed Jun 20, 2018 5:41 am    Post subject: Reply with quote

FreeER wrote:
I don't know what you expect it to do... you've never properly explained so how am I supposed to check why it does not do whatever you expect it to??

I want to add aob to checkBoxes2,sorry for my bad english, i can not explain you understand Sad
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Wed Jun 20, 2018 10:09 am    Post subject: Reply with quote

There is nothing wrong with your english so far, just that you are not giving enough information

what aob, and how? AOBSCan("..."), or running an existing aob script in the table (see 1), or build the script in lua then add it to the table (see 2), or build then execute with autoAssemble? If you're building it then what variables are you building it out of and where do they go in the script?

1. AddressList.getMemoryRecordByDescription("...").Active = true
2. local mr=AddressList.createMemoryRecord();mr.Type=vtAutoAssembler; mr.Script = "...built script"


Are you wanting the checkbox to toggle that script on and off? Because that's going to add a bit more code and isn't always the case (though typically you'd use a button and disable it after clicking in that case).

If you just need to know how to do it for any checkbox then keep the example code simple with just one checkbox, it is much easier to guess what you want from looking at the code if it is only trying to do one thing.

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 123

PostPosted: Thu Jun 21, 2018 2:01 am    Post subject: Reply with quote

FreeER wrote:
There is nothing wrong with your english so far, just that you are not giving enough information

what aob, and how? AOBSCan("..."), or running an existing aob script in the table (see 1), or build the script in lua then add it to the table (see 2), or build then execute with autoAssemble? If you're building it then what variables are you building it out of and where do they go in the script?

1. AddressList.getMemoryRecordByDescription("...").Active = true
2. local mr=AddressList.createMemoryRecord();mr.Type=vtAutoAssembler; mr.Script = "...built script"


Are you wanting the checkbox to toggle that script on and off? Because that's going to add a bit more code and isn't always the case (though typically you'd use a button and disable it after clicking in that case).

If you just need to know how to do it for any checkbox then keep the example code simple with just one checkbox, it is much easier to guess what you want from looking at the code if it is only trying to do one thing.

Thank you very much for your support, I appreciate this, thank you.
And this is the code I finished yesterday
Code:
function HackITClick(sender)
local form = createForm( true );
form.caption="Hack IT !!!!"

checkBoxes  = createCheckBox( form );
checkBoxes2 = createCheckBox( form );

checkBoxes.Caption  = "One Hit";
checkBoxes2.Caption = "Full Mana";

checkBoxes.setPosition(10,  20)
checkBoxes2.Left = checkBoxes.Left
checkBoxes2.Top  = checkBoxes.Top + checkBoxes.Height
----Scan hack--------------
   local szAOB_ScanHack    = ""---AOB Scan tool
   local stringlist=AOBScan(szAOB_ScanHack);
   local firststring = strings_getString(stringlist, 0);
   local szAOB_OnHack   = ""---AOB On hack
   local szAOB_OffHack    = ""--AOB Off hack
   local szAOB_OnHack1   = ""---AOB On hack1
   local szAOB_OffHack1   = ""--AOB Off hack1
------Checkbox1---------------------------------------
checkbox_onChange(checkBoxes, test1Click)
time_inc = 0
time1 = 1 -- 1second
time2 = 2 -- 2second
mytimer = mytimer or createTimer(nil, false)
mytimer.Interval = 1000

mytimer.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod1 = math.mod(time_inc,time1)
local time_mod2 = math.mod(time_inc,time2)

if time_mod1 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_OnHack);
end
if time_mod2 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_OffHack);
end

if time_inc > 1000 then time_inc = 0 end

end
---------------Checkbox2-----------------
checkbox_onChange(checkBoxes2, test2Click)
time_inc = 0
time3 = 3 -- 3second
time4 = 4 -- 4second
mytimer1 = mytimer1 or createTimer(nil, false)
mytimer1.Interval = 1000

mytimer1.OnTimer = function(timer)

time_inc = time_inc + 1

local time_mod3 = math.mod(time_inc,time3)
local time_mod4 = math.mod(time_inc,time4)

if time_mod3 == 0 then
      autoAssemble(firststring..":\ndb "..szAOB_OnHack1);
end
if time_mod4 == 0 then
      autoAssemble( firststring..":\ndb " ..szAOB_OffHack1);
end

if time_inc > 1000 then time_inc = 0 end

end
------------=======================------------------------
function test1Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer.Enabled = sender.Checked
end
function test2Click(sender)
if sender.Checked == true then
  showMessage("on hack.")
else
    showMessage("off hack")
      autoAssemble(firststring..":\ndb "..szAOB_ScanHack);
end
 mytimer1.Enabled = sender.Checked
end
end

I checked carefully and it did not work as expected, two checkBoxes and checkBoxes2 and it only works a function.
Code:
   local szAOB_OnHack1   = ""---AOB On hack1
   local szAOB_OffHack1   = ""--AOB Off hack1

When I delete
Code:
   local szAOB_OnHack1   = ""---AOB On hack1
   local szAOB_OffHack1   = ""--AOB Off hack1
and checkBoxes function normally.
Hope you support me again, again thank you very much. Very Happy
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Thu Jun 21, 2018 12:01 pm    Post subject: This post has 1 review(s) Reply with quote

Quote:
it did not work as expected
I still have no clue as to what you expected...

executing the code as given does nothing which is what I would expect because it is in a function that does not get called. Calling the function creates a form with two check boxes that can be checked and unchecked which is what I'd expect from a form with two checkboxes.

Nothing happens when i check them but I have no idea what to expect when I check them, they could be programmed to do literally anything when clicked from shutting down the computer, to playing a happy birthday song, to sending a signal to a nuclear silo to launch a missile to the location obtained from my IP (ok ok, you probably can not launch those without having someone on the inside to physically do something but).

As far as the click functions the szAOBs are all empty strings so there are no actual array of bytes, and I am not attached to any process even if those were because I do not know what I could/should attach to and expect it to work or at least not crash, the firststring variable used in the autoAssemble is defined to be the first result in an AOBScan which means it's always going to fail because of the previous two issues.


You can paste your code a thousand times but if you do not explain what exactly you are trying to do and how no one can hep you. If you can actually explain what you want to have happen we do not even need your code because we could give you code to do it, probably better code, but we have to know what you are trying to do and maybe to an extent why because most people tell what code they are trying to use not what they are trying to solve with that code.


Here's some basic code to change the sub on step 2 of the tutorial to an add

Code:
script = [[[ENABLE]
aobscanmodule(INJECT,Tutorial-i386.exe,29 D0 89 83 * * * * 8D 55 *)
INJECT:
  db 01
registersymbol(INJECT)
[DISABLE]
INJECT:
  db 29
unregistersymbol(INJECT)]]
success, disableinfo = nil
form = createForm()
cb = createCheckBox(form)
cb.Caption = 'Hack'
cb.onClick = function(sender)
  if sender.clicked then -- if being enabled run the script without disableinfo
    success, disableinfo = autoAssemble(script)
  else -- otherwise it's being disabled so run with disableinfo
    success, disableinfo = autoAssemble(script, disableinfo)
  end
  if not success then -- don't change state when it failed.
    sender.State = sender.State==0 and 1 or 0
  end
  --print(tostring(success), serpent.block(disableinfo))
  -- serpent.block is an third party library not included with CE
end

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 123

PostPosted: Fri Jun 22, 2018 5:08 am    Post subject: Reply with quote

FreeER wrote:
Quote:
it did not work as expected
I still have no clue as to what you expected...

executing the code as given does nothing which is what I would expect because it is in a function that does not get called. Calling the function creates a form with two check boxes that can be checked and unchecked which is what I'd expect from a form with two checkboxes.

Nothing happens when i check them but I have no idea what to expect when I check them, they could be programmed to do literally anything when clicked from shutting down the computer, to playing a happy birthday song, to sending a signal to a nuclear silo to launch a missile to the location obtained from my IP (ok ok, you probably can not launch those without having someone on the inside to physically do something but).

As far as the click functions the szAOBs are all empty strings so there are no actual array of bytes, and I am not attached to any process even if those were because I do not know what I could/should attach to and expect it to work or at least not crash, the firststring variable used in the autoAssemble is defined to be the first result in an AOBScan which means it's always going to fail because of the previous two issues.


You can paste your code a thousand times but if you do not explain what exactly you are trying to do and how no one can hep you. If you can actually explain what you want to have happen we do not even need your code because we could give you code to do it, probably better code, but we have to know what you are trying to do and maybe to an extent why because most people tell what code they are trying to use not what they are trying to solve with that code.


Here's some basic code to change the sub on step 2 of the tutorial to an add

Code:
script = [[[ENABLE]
aobscanmodule(INJECT,Tutorial-i386.exe,29 D0 89 83 * * * * 8D 55 *)
INJECT:
  db 01
registersymbol(INJECT)
[DISABLE]
INJECT:
  db 29
unregistersymbol(INJECT)]]
success, disableinfo = nil
form = createForm()
cb = createCheckBox(form)
cb.Caption = 'Hack'
cb.onClick = function(sender)
  if sender.clicked then -- if being enabled run the script without disableinfo
    success, disableinfo = autoAssemble(script)
  else -- otherwise it's being disabled so run with disableinfo
    success, disableinfo = autoAssemble(script, disableinfo)
  end
  if not success then -- don't change state when it failed.
    sender.State = sender.State==0 and 1 or 0
  end
  --print(tostring(success), serpent.block(disableinfo))
  -- serpent.block is an third party library not included with CE
end

Which means that my idea mentioned above includes two functions for 2 checkBoxes
Code:

checkBoxes it will run AOB hack 1 in 2 seconds and swap AOB hack 2  after 1 second

checkBoxes2 function is similar to the above
Code:
checkBoxes2 it will run AOB hack 3 in 3 seconds and swap AOB hack 4  after 4 second

When I run the above code, I do not know why two checkBoxes and checkBoxes2 it just runs AOB hack 3 and AOB hack 4, i was thinking about this many days now but no solution.
Please help me pass, once again sincerely thank the supporters enthusiasm and solution.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 42

Joined: 09 Aug 2013
Posts: 1089

PostPosted: Fri Jun 22, 2018 10:06 am    Post subject: Reply with quote

Quote:
checkBoxes it will run AOB hack 1 in 2 seconds and swap AOB hack 2 after 1 second
checkBoxes2 function is similar to the above


well, I finally have some clue as to exactly what you were trying to achieve. I'd probably implement that just as a couple table scripts though if there's not a real reason to do it with autoAssemble

Code:
[ENABLE]
aobscan ....


{$lua}
local t = createTimer()
t.Interval = 2000 -- 2 seconds
t.OnTimer = function(t)
  t.destroy() -- only runs once
  memrec.Active = false -- disable this table script
  AddressList.getMemoryRecordByDescription('next hack').Active = true
  -- ^ copy paste in next script, comment out next hack line for last hack
  -- and in last hack set the checkbox state to 0 to indicate it being off
end
{$asm}
[DISABLE]
...


and if your really wanted your own gui for it then you could start the script with AddressList.getMemoryRecordByDescription('first hack').Active = true when the button/checkbox is clicked, put it in a timer like ^ if you want a delay between clicking and activating.

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 123

PostPosted: Fri Jun 22, 2018 11:52 am    Post subject: Reply with quote

Hello, I do not understand this
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 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