View previous topic :: View next topic |
Author |
Message |
vil33 Cheater
Reputation: 0
Joined: 29 Jul 2020 Posts: 34
|
Posted: Sun Aug 23, 2020 11:02 pm Post subject: [ HELP ] lua script release button |
|
|
hello master...
let me ask something hehe
i want to make button in my trainer auto press space bar.
when i click that button it press " SPACE " and when i click again it stop press " space "
Thank you master.
Have a nice day
|
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Mon Aug 24, 2020 12:42 am Post subject: |
|
|
I don't know what I've done!!
Code: | if f then f.destroy() end
f = createForm()
f.width = 100
f.height = 70
f.Position = 'poScreenCenter'
tb = createToggleBox(f)
tb.top = 10
tb.left = 10
tb.width = 105
tb.height = 50
tb.Caption = 'OFF'
function tbChange(sender)
if (checkbox_getState(tb) == 1) then
tb.Caption = 'ON'
timer2.Enabled=true
doKeyPress(VK_SPACE)
print('Space key is down')
else
print('Space key is up')
tb.Caption = 'OFF'
timer2.Enabled=false
end
end
function stop()
timer2.Enabled=false
timer2.Destroy()
end
timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=tbChange
f.show()
tb.onChange = tbChange
f.onClose = stop |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
vil33 Cheater
Reputation: 0
Joined: 29 Jul 2020 Posts: 34
|
Posted: Mon Aug 24, 2020 11:17 pm Post subject: |
|
|
Corroder wrote: | I don't know what I've done!!
Code: | if f then f.destroy() end
f = createForm()
f.width = 100
f.height = 70
f.Position = 'poScreenCenter'
tb = createToggleBox(f)
tb.top = 10
tb.left = 10
tb.width = 105
tb.height = 50
tb.Caption = 'OFF'
function tbChange(sender)
if (checkbox_getState(tb) == 1) then
tb.Caption = 'ON'
timer2.Enabled=true
doKeyPress(VK_SPACE)
print('Space key is down')
else
print('Space key is up')
tb.Caption = 'OFF'
timer2.Enabled=false
end
end
function stop()
timer2.Enabled=false
timer2.Destroy()
end
timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=tbChange
f.show()
tb.onChange = tbChange
f.onClose = stop |
|
finally it work master thanks for your helping
but,it make new trainer ,i mean i want to add to my button trainer
Description: |
|
Filesize: |
118.25 KB |
Viewed: |
2501 Time(s) |

|
|
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Aug 25, 2020 12:52 am Post subject: |
|
|
Easy way, just change your CEButton to CEToggleBox.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
vil33 Cheater
Reputation: 0
Joined: 29 Jul 2020 Posts: 34
|
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Aug 25, 2020 4:23 am Post subject: |
|
|
Please check what is your trainer components/classes name and make sure you use correct name for the components.
In your case:
Code: | function CETrainer_CECheckbox1Change(sender)
if CETrainer.CECheckbox1.State == 1 then
CETrainer.CECheckbox1.Caption = 'AUTOLOOT IS ON'
timer2.Enabled=true
doKeyPress(VK_SPACE)
print('Space key is down')
else
print('Space key is up')
CETrainer.CECheckbox1.Caption = 'AUTOLOOT IS OFF'
timer2.Enabled=false
end
end
timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=CETrainer_CECheckbox1Change
CETrainer.Show() |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
vil33 Cheater
Reputation: 0
Joined: 29 Jul 2020 Posts: 34
|
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Aug 25, 2020 7:25 am Post subject: |
|
|
Just DELETE this line from the function.
Code: | print('Space key is down') |
and
Code: | print('Space key is up') |
or change the script to what you want to do.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
vil33 Cheater
Reputation: 0
Joined: 29 Jul 2020 Posts: 34
|
Posted: Tue Aug 25, 2020 10:56 am Post subject: |
|
|
Corroder wrote: | Just DELETE this line from the function.
Code: | print('Space key is down') |
and
Code: | print('Space key is up') |
or change the script to what you want to do. |
it not work master, i've try...
The program show but when i delete that function
"auto loot" not runing correctly
|
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Tue Aug 25, 2020 12:25 pm Post subject: |
|
|
I am not say to delete the function, I am say to delete the LINE on the function with say "print('Space key is down')" and print('Space key is up) ". Delete those lines only not all the function.
And I say "or change the script to what you want to do".
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
vil33 Cheater
Reputation: 0
Joined: 29 Jul 2020 Posts: 34
|
Posted: Tue Aug 25, 2020 3:00 pm Post subject: |
|
|
Corroder wrote: | I am not say to delete the function, I am say to delete the LINE on the function with say "print('Space key is down')" and print('Space key is up) ". Delete those lines only not all the function.
And I say "or change the script to what you want to do". |
finally it work master
i just fill this code
Code: | function CETrainer_CECheckbox1Change(sender)
if CETrainer.CECheckbox1.State == 1 then
CETrainer.CECheckbox1.Caption = 'AUTOLOOT IS ON'
timer2.Enabled=true
doKeyPress(VK_SPACE)
else
timer2.Enabled=false
doKeyPress(VK_SPACE)
end
end
timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=CETrainer_CECheckbox1Change
CETrainer.Show() |
Thank you so much for you support/helping master
You'are so kind
Have a nice day master
|
|
Back to top |
|
 |
|