| View previous topic :: View next topic |
| Author |
Message |
vegettadbz Cheater
Reputation: 0
Joined: 01 Dec 2010 Posts: 28
|
Posted: Sun Jun 16, 2013 1:54 pm Post subject: Cheat Engine Hotkeys |
|
|
Hey guys!
I have created a couple of cheats for a game an I am trying to create a trainer. I would to make my own interface (buttons, images etc), but I have some problems. I want to put some 'buttons' which I want to connet them with the hotkeys that I have created for the cheats. For some reason I can't find a way to do it. Can you please help me? I have looked in the Button 'Object Inspector' but nothing helped me...
P.S. I use cheat engine 6.2 |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Sun Jun 16, 2013 1:59 pm Post subject: |
|
|
You need to put some code outside of the automated trainer generator code
createHotkey(samefunctionastheonclickofthebutton, key1, key2,...)
look up defines.lua to see the VK_ defines for the keys _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
vegettadbz Cheater
Reputation: 0
Joined: 01 Dec 2010 Posts: 28
|
Posted: Sun Jun 16, 2013 2:08 pm Post subject: |
|
|
Where can i find the defines.lua and how do I put code outside the generater? :/.
I know, I am still noob  |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 16, 2013 2:14 pm Post subject: |
|
|
Menu, Table, Show Cheat Table Lua Script. Auto-generated Lua script should be between these lines:
| Code: | | --TRAINERGENERATORSTART-- |
and
| Code: | | --TRAINERGENERATORSTOP-- |
(of course only if you used that CE feature)
defines.lua - Inside CheatEngine dir.
So, you added buttons, and you use onClick functions:
| Code: | function CEButton1Click(sender)
-- your code here
end |
To add hotkey, In this example we added ALT+F2 hotkey, use this:
| Code: | | createHotkey(CEButton1Click, VK_MENU,VK_F2) |
Did you even use "generate generic trainer lua script from table"?
Edit:
If you don't want to use "generate generic trainer ......."
You have memoryrecord (memoryrecord can be an: address, pointer, script, header) with hotkey, called "godmode". OK.
Create new Form, add Button, use object inspector and create new onClick function event.
You can use something like this:
| Code: | addresslist=getAddressList()
memrecGodmode=addresslist_getMemoryRecordByDescription(addresslist,'godmode')
function CEButton1Click(sender) -- onClick event
local hotkey = memoryrecord_getHotkeyByID(memrecGodmode,0)
memoryrecordhotkey_doHotkey(hotkey)
end |
_________________
Last edited by mgr.inz.Player on Sun Jun 16, 2013 2:50 pm; edited 1 time in total |
|
| Back to top |
|
 |
vegettadbz Cheater
Reputation: 0
Joined: 01 Dec 2010 Posts: 28
|
Posted: Sun Jun 16, 2013 2:43 pm Post subject: |
|
|
| mgr.inz.Player wrote: | Menu, Table, Show Cheat Table Lua Script. Auto-generated Lua script should be between these lines:
| Code: | | --TRAINERGENERATORSTART-- |
and
| Code: | | --TRAINERGENERATORSTOP-- |
(of course only if you used that CE feature)
defines.lua - Inside CheatEngine dir.
So, you added buttons, and you use onClick functions:
| Code: | function CEButton1Click(sender)
-- your code here
end |
To add hotkey, use this:
| Code: | | createHotkey(CEButton1Click, VK_MENU,VK_F2) |
In this example, we added ALT+F2 hotkey.
Did you even use "generate generic trainer lua script from table"?
|
I think I lost it...
The ''Show Cheat Table Lua Script'' doesn't show anything. Is it supposed to pop-up a new window? I created the cheats, I made some scripts and then I go to "generate generic trainer lua script from table". There I have the problem. I added some hotkeys and then I have tried to connect the hotkeys with the buttons of the userinterface. |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 16, 2013 2:47 pm Post subject: |
|
|
Please, use "quickreply" or "postreply" buttons.

Because I managed to edit my post before your reply  _________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Sun Jun 16, 2013 2:50 pm Post subject: |
|
|
Close cheat engine and run the reset settings program from cheat engine in the start menu, that will fix the lua window from not popping up
Also,after configuring your trainer choose generate trainer script only, and go from there _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
vegettadbz Cheater
Reputation: 0
Joined: 01 Dec 2010 Posts: 28
|
Posted: Sun Jun 16, 2013 3:05 pm Post subject: |
|
|
@Dark Byte.
Done it. Reset settings. Show Cheat Table Lua Script is blank. I suppose I haven't used lua script. . How do I choose generate trainer script only?
@mgr.inz.Player. Where do I put the code:
addresslist=getAddressList()
memrecGodmode=addresslist_getMemoryRecordByDescription(addresslist,'godmode')
function CEButton1Click(sender) -- onClick event
local hotkey = memoryrecord_getHotkeyByID(memrecGodmode,0)
memoryrecordhotkey_doHotkey(hotkey)
end |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 16, 2013 3:08 pm Post subject: |
|
|
"How do I choose generate trainer script only?"
Menu File, the second to last option.
"Where do I put the code"
Cheat Table Lua Script window _________________
|
|
| Back to top |
|
 |
vegettadbz Cheater
Reputation: 0
Joined: 01 Dec 2010 Posts: 28
|
Posted: Sun Jun 16, 2013 3:18 pm Post subject: |
|
|
@mgr.inz.Player.
That's I have chosen. Menu File, the second to last option (generate generic trainer lua script from table.)
See image for the menu of the trainer generator.
This is were I am trying to add the cheats, hotkeys and connect them using buttons (using the 'desing userinterface manually') |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 16, 2013 3:41 pm Post subject: |
|
|
Tip. Assign hotkeys before "auto genereate",
highlight each memoryrecord, press CTRL+H (or choose option from context menu), click create hotkey, set hotkey... , click Apply, then click OK
Then save your work.
After that you can play with "trainer generator".
| Quote: | | cheats, hotkeys and connect them using buttons (using the 'desing userinterface manually') |
Yes. You have to add buttons, and create new event functions for them (in object inspector, events tab, OnClick, click button with three dots "..."). _________________
|
|
| Back to top |
|
 |
papariba How do I cheat?
Reputation: 0
Joined: 08 Mar 2015 Posts: 4
|
Posted: Sun Mar 08, 2015 5:21 am Post subject: same issue |
|
|
hey,sorry for bringing up a 2 years old issue again but i have the same problem
at first,i thought i'd make a button with the function to change the base address' current value to an array of bytes.
but then i stumbled across this thread,and the idea to link the hotkeys with the butons seems easier (espeically for beginners )
so i created my button,but which function do i write to make it use the hotkey ALT+F2? (linking)
if there is an even easier method,please let me know
i'd appreicate any help
regards,
riba |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Sun Mar 08, 2015 5:46 am Post subject: |
|
|
i don't know which hotkey is responsibly for alt+f2 but you can use something like:
memrec6_hotkey0.doHotkey() _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
papariba How do I cheat?
Reputation: 0
Joined: 08 Mar 2015 Posts: 4
|
Posted: Sun Mar 08, 2015 6:00 am Post subject: |
|
|
| Dark Byte wrote: | i don't know which hotkey is responsibly for alt+f2 but you can use something like:
memrec6_hotkey0.doHotkey() |
so with this function the button is assigned to that hotkey 0?
what do i write into ()? and how i find out which hotkey is responsible for x?
Edit: issue solved,I looked into another thread and found the solution:
| Code: | Code:
function Button1Click(sender)
hotkey=memoryrecord_getHotkeyByID(memrec0,0)
memoryrecordhotkey_doHotkey(hotkey)
end
control_onClick(CETrainer_Button1, Button1Click) |
But you must know which memrec (memrec0, memrec1, memrec2, etc) and you must know which hotkey ID.
I used memrec0 and hotkeyID = 0.
thanks @mgr.inz.Player and dark byte for helping. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Sun Mar 08, 2015 7:15 am Post subject: |
|
|
you don't write anything into () , it's just ()
as for finding it out, check the script. Perhaps experiment with it.
Check the ID of the memoryrecord and the hotkeyid of the hotkey, and then read the script to find out where that specific memrecid and hotkeyid are used to assign to a memrex#_hotkey# _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|