View previous topic :: View next topic |
Author |
Message |
bosman88 How do I cheat?
Reputation: 0
Joined: 06 Oct 2015 Posts: 9
|
Posted: Tue Oct 06, 2015 6:09 pm Post subject: Hello :) I need small help ;) |
|
|
Hello everyone
I'd like to get small help in Lua scripting
I need 2 things,
1st. Add hotkeys for my cheatboxes
for example this is my function for one cheatbox and just I would like to turn on/off by same hotkey, for button I used createHotkey(WallhackClick, VK_PRIOR) but for my cheatbox it doesn't work.
Code: | function MyExample(sender)
memrec=addresslist_getMemoryRecordByDescription(getAddressList(), "ExampleAddress")
if checkbox_getState(sender)== 1 then
memoryrecord_setValue(memrec, 850)
else
memoryrecord_setValue(memrec, memoryrecord_getValue(addresslist_getMemoryRecordByDescription(getAddressList(), "2ndAddress")))
end
end |
and 2nd thing is...
Original cheat engine Freeze interval is 100, we can change it to 1 but I need much faster,
Is able to use Lua script to make faster freeze Interval for one address from cheat table? Or use freeze interval based on max CPU's speed? I just need script for enable one address with the best freeze interval which I can get.
Thank you for helping
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Oct 06, 2015 6:56 pm Post subject: |
|
|
It sounds like your createHotkey is simply executing WallhackClick.
It does not actually check the box. You would need to do something like:
Code: | checkboxname.Checked = not checkboxname.Checked |
As for faster freezing than 1 millisecond...
You can try creating multiple timers and having each one of them updating your value.
Although I don't know if CE actually uses a thread for each one. So multiples may not help.
/shrug
|
|
Back to top |
|
 |
bosman88 How do I cheat?
Reputation: 0
Joined: 06 Oct 2015 Posts: 9
|
Posted: Wed Oct 07, 2015 10:18 am Post subject: |
|
|
Zanzer wrote: | It sounds like your createHotkey is simply executing WallhackClick.
It does not actually check the box. You would need to do something like:
Code: | checkboxname.Checked = not checkboxname.Checked |
As for faster freezing than 1 millisecond...
You can try creating multiple timers and having each one of them updating your value.
Although I don't know if CE actually uses a thread for each one. So multiples may not help.
/shrug |
Well, I made new funtion for cheatbox of "GateHack" and named GateKey added change state of that cheatbox to enable when click hotkey
and my cheatbox got enabled but didn't do his function,
I made this script
Code: | function GateKey(sender)
setProperty(MyForm_GateHack,"State",1)
end
createHotkey(GateKey, VK_HOME) |
Multiples ofc should work but I'm wondering if is any script to use max freezeinterval as my PC can do.
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Oct 07, 2015 6:15 pm Post subject: |
|
|
Code: | function GateHackOnClick()
local memrec=addresslist_getMemoryRecordByDescription(getAddressList(), "ExampleAddress")
local value = 850
if checkbox_getState(MyForm_GateHack) ~= 1 then
value = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(getAddressList(), "2ndAddress"))
end
memoryrecord_setValue(memrec, value)
end
function GateKey(sender)
MyForm_GateHack.Checked = not MyForm_GateHack.Checked
GateHackOnClick()
end
createHotkey(GateKey, VK_HOME) |
|
|
Back to top |
|
 |
bosman88 How do I cheat?
Reputation: 0
Joined: 06 Oct 2015 Posts: 9
|
Posted: Thu Oct 08, 2015 9:55 am Post subject: |
|
|
Zanzer wrote: | Code: | function GateHackOnClick()
local memrec=addresslist_getMemoryRecordByDescription(getAddressList(), "ExampleAddress")
local value = 850
if checkbox_getState(MyForm_GateHack) ~= 1 then
value = memoryrecord_getValue(addresslist_getMemoryRecordByDescription(getAddressList(), "2ndAddress"))
end
memoryrecord_setValue(memrec, value)
end
function GateKey(sender)
MyForm_GateHack.Checked = not MyForm_GateHack.Checked
GateHackOnClick()
end
createHotkey(GateKey, VK_HOME) |
|
Thank you, it works Now I can add hotkeys hehe Thank you again
|
|
Back to top |
|
 |
|