| View previous topic :: View next topic |
| Author |
Message |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Sun Jul 14, 2013 6:56 am Post subject: CE Hotkeys |
|
|
I was just wondering if there is a way to make a hotkey, that would go thru and change some of my hex values?
Lets say i had 1 address and 5 random values like
1.AA AA AA
2.BB BB BB
3.CC CC CC
4.DD DD DD
5.EE EE EE
And every time i pushed a button it would change to 1. then 2. then 3, and so on?
Right now i am using normal CE hotkeys, but i need 5 buttons to change 5 values, would be nice if there was a way to do that with 1 button.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Sun Jul 14, 2013 7:32 am Post subject: |
|
|
execute this lua script: (you can add it to the lua script in the table and launch it automatically each time the table is loaded)
| Code: |
selector=0
values={}
values[0]="aa aa aa"
values[1]="bb bb bb"
values[2]="cc cc cc"
values[3]="dd dd dd"
values[4]="ee ee ee"
function getNextValue()
local v=values[selector]
selector=(selector + 1) % 5
return v
end
|
then add a hotkey to the entry that when executed sets the value to
_________________
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 |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Sun Jul 14, 2013 7:54 am Post subject: |
|
|
| Dark Byte wrote: | execute this lua script: (you can add it to the lua script in the table and launch it automatically each time the table is loaded)
| Code: |
selector=0
values={}
values[0]="aa aa aa"
values[1]="bb bb bb"
values[2]="cc cc cc"
values[3]="dd dd dd"
values[4]="ee ee ee"
function getNextValue()
local v=values[selector]
selector=(selector + 1) % 5
return v
end
|
then add a hotkey to the entry that when executed sets the value to
|
Am i doing it right?
ctrl+alt+L > paste your script > set my hotkey to change the value to [getNextValue()]
When i press my hotkey nothing happens.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Sun Jul 14, 2013 8:14 am Post subject: |
|
|
hmm, this doesn't seem to work properly with array of byte types
I think you'll have to go with the createHotkey method then and use writeBytes to set the values (more complex)
e.g: This adds a CTRL+F1 hotkey that sets the values
| Code: |
selector=0
values={}
values[0]="aa aa aa"
values[1]="bb bb bb"
values[2]="cc cc cc"
values[3]="dd dd dd"
values[4]="ee ee ee"
function SetNextValue()
getAddressList().getMemoryRecordByDescription('something').value=values[selector]
selector=(selector + 1) % 5
return v
end
createHotkey(SetNextValue, VK_CONTROL, VK_F1)
|
replace something with the description of your cheat entry
_________________
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 |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Sun Jul 14, 2013 9:00 am Post subject: |
|
|
| Dark Byte wrote: | hmm, this doesn't seem to work properly with array of byte types
I think you'll have to go with the createHotkey method then and use writeBytes to set the values (more complex)
e.g: This adds a CTRL+F1 hotkey that sets the values
| Code: |
selector=0
values={}
values[0]="aa aa aa"
values[1]="bb bb bb"
values[2]="cc cc cc"
values[3]="dd dd dd"
values[4]="ee ee ee"
function SetNextValue()
getAddressList().getMemoryRecordByDescription('something').value=values[selector]
selector=(selector + 1) % 5
return v
end
createHotkey(SetNextValue, VK_CONTROL, VK_F1)
|
replace something with the description of your cheat entry |
It works, thank you so much!
I don't need to change anything to add more addresses right?(except the values[x]"x" ofcourse)
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Sun Jul 14, 2013 9:29 am Post subject: |
|
|
the values and selector may need unique names if the other addresses need other values.
but if they need the same value, this'll work
_________________
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 |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Sun Jul 14, 2013 10:09 am Post subject: |
|
|
| Dark Byte wrote: | the values and selector may need unique names if the other addresses need other values.
but if they need the same value, this'll work |
function SetNextValue()
getAddressList().getMemoryRecordByDescription('Pilnas').value=values[selector]
selector=(selector + 1) % 5
return v
end
function SetBackValue()
getAddressList().getMemoryRecordByDescription('Pilnas').value=values[selector]
selector=(selector - 1) % 5
return v
end
createHotkey(SetNextValue, VK_NUMPAD1)
createHotkey(SetBackValue, VK_NUMPAD2)
Last question, would this work to go back and forth between addresses?
Also, How do i remove the hotkeys created by the script?
right now i got ctrl+f1(yours) num1 and num2 changing the values:S
EDIT: I think i figured everything out by myself, thanks again!
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Mon Jul 15, 2013 6:18 am Post subject: |
|
|
for those wondering:
createHotkey() returns a GenericHotkey class object
you can call the destroy() method to remove it.
e.g:
| Code: |
globalhk1=createHotkey(SetNextValue, VK_CONTROL, VK_F1)
|
and when done with it:
| Code: |
globalhk1.destroy()
|
_________________
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 |
|
 |
|