| View previous topic :: View next topic |
| Author |
Message |
Varstal Newbie cheater
Reputation: 0
Joined: 14 Jun 2014 Posts: 20
|
Posted: Sat Jun 21, 2014 12:43 pm Post subject: How do you make a customizable value in a script? |
|
|
| So, I swear I saw something about this when I was doing research on how to do health and stamina but I can't seem to find it. I'm trying to set up a script that uses aob scans to locate the pointer for my inventory toolbar so that I can change the value. However, I don't want to have to go into the script every time to change one value so I'm wondering if there's a way to set up a value that I can change with hotkeys of my choice. I'd also like to take a moment to thank Methos++ for helping me thus far. All the information you've provided helped me create an unlimited Health and Stamina cheat, I have been testing it the past couple days to make sure the compare id I'm using is stable.
|
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Sat Jun 21, 2014 1:47 pm Post subject: |
|
|
Modify and execute this in lua script window.
| Code: | createHotkey(function () writeInteger('address', readInteger('address') + 1); end;, VK_F2); -- Increase by 1;
createHotkey(function () writeInteger('address', 0); end;, VK_F3); -- Reset to 0; |
_________________
I'm rusty and getting older, help me re-learn lua. |
|
| Back to top |
|
 |
Varstal Newbie cheater
Reputation: 0
Joined: 14 Jun 2014 Posts: 20
|
Posted: Sat Jun 21, 2014 2:06 pm Post subject: |
|
|
I'm not sure if I'm just not understanding or if I didn't explain it right so I'm going to post my code and put //comment next to what I'm trying to set as custom value
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(exit)
label(aob)
aobscan(inv,48 8D 44 C8 20 48 8B 00 48 63 40 4C EB 02)
registersymbol(aob)
newmem:
mov rax,[rax]
mov dword ptr [rax+4C],#10 //So right here instead of just changing to 10 I want to have a custom value that I can set hotkeys with 10 and 100 and it changes that value to that integer.
exit:
jmp returnhere
inv+5:
aob:
jmp newmem
nop
nop
returnhere:
[DISABLE]
aob:
db 48 8B 00
db 48 63 40 4C
//code from here till the end of the code will be used to disable the cheat
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Sat Jun 21, 2014 2:16 pm Post subject: |
|
|
| Code: |
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
alloc(currentvalue,4)
label(returnhere)
label(exit)
label(aob)
aobscan(inv,48 8D 44 C8 20 48 8B 00 48 63 40 4C EB 02)
registersymbol(aob)
registersymbol(currentvalue)
newmem:
mov rax,[rax]
push rbx
mov ebx,[currentvalue]
mov dword ptr [rax+4C],ebx
pop rbx
exit:
jmp returnhere
inv+5:
aob:
jmp newmem
nop
nop
returnhere:
[DISABLE]
aob:
db 48 8B 00
db 48 63 40 4C
//code from here till the end of the code will be used to disable the cheat
|
With this script just add a new entry with as address "currentvalue" (without the quotes)
then assign that entry two hotkeys. One sets the value to 10, and the other sets the value to 100
_________________
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 |
|
 |
Varstal Newbie cheater
Reputation: 0
Joined: 14 Jun 2014 Posts: 20
|
Posted: Sat Jun 21, 2014 2:20 pm Post subject: |
|
|
| Thank you
|
|
| Back to top |
|
 |
|