View previous topic :: View next topic |
Author |
Message |
johnny_m90 How do I cheat? Reputation: 0
Joined: 06 Oct 2017 Posts: 8
|
Posted: Tue Oct 10, 2017 10:21 am Post subject: help with pointers in lua |
|
|
Hey!
Been trying to get a pointer to work in lua and it simply isnt working for me. This is the code i'm using to get the value of the pointer:
local value = readInteger("[[[[trove.exe+00D3B680] +1C] +3C] +1F4] +134")
print(value)
It prints nothing back, i've tried lots of things so i would really appreciate the help.
I made it work, but now i've come to another problem! So i'm trying to make the script press Q when the hp goes below 6k. It does write Q when i'm in the script itself but when i change to the game it does nothing.
Here's the lua code:
Code: | function HPcheck()
hp = readInteger("[[[[trove.exe+00D3B680] +1C] +3C] +1F4] +134")
if hp < 6000 then
doKeyPress(VK_KEY_Q)
end
end
timer1 = createTimer()
timer_setInterval(timer1, 100)
timer_onTimer(timer1, HPcheck)
timer_setEnabled(timer1, true) |
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Tue Oct 10, 2017 1:01 pm Post subject: |
|
|
Try VK_Q I don't believe VK_KEY_Q is defined (VK stands for Virtual Key after all so VK_KEY would be Virtual Key Key...).
|
|
Back to top |
|
|
johnny_m90 How do I cheat? Reputation: 0
Joined: 06 Oct 2017 Posts: 8
|
Posted: Tue Oct 10, 2017 1:05 pm Post subject: |
|
|
FreeER wrote: | Try VK_Q I don't believe VK_KEY_Q is defined (VK stands for Virtual Key after all so VK_KEY would be Virtual Key Key...). |
It does the exact same thing, thanks for the answer though
I also tried doPressKey("Q") with the same result
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Tue Oct 10, 2017 1:19 pm Post subject: |
|
|
This code prints Q's constantly, so that works
Code: |
function HPcheck()
hp = 5999
if hp < 6000 then
doKeyPress(VK_Q)
end
end
timer1 = createTimer()
timer1.Interval=100
timer1.Timer=HPcheck
timer1.Enabled=true
|
Perhaps the game doesn't handle the keyboard input like this.
Or the hp pointer is never < 6000
_________________
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 |
|
|
johnny_m90 How do I cheat? Reputation: 0
Joined: 06 Oct 2017 Posts: 8
|
Posted: Tue Oct 10, 2017 1:22 pm Post subject: |
|
|
Dark Byte wrote: | This code prints Q's constantly, so that works
Code: |
function HPcheck()
hp = 5999
if hp < 6000 then
doKeyPress(VK_Q)
end
end
timer1 = createTimer()
timer1.Interval=100
timer1.Timer=HPcheck
timer1.Enabled=true
|
Perhaps the game doesn't handle the keyboard input like this.
Or the hp pointer is never < 6000 |
It only writes Q's when the hp is under 6k but it does not use the potion which is on the Q button in-game. I've tried it in windowed and fullscreen in case it made any difference, but it didnt.
is there any way to trigger the event of using a potion using the assembly?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Tue Oct 10, 2017 2:01 pm Post subject: |
|
|
try
Code: |
keyDown(VK_Q)
sleep(1000)
keyUp(VK_Q)
|
_________________
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 |
|
|
johnny_m90 How do I cheat? Reputation: 0
Joined: 06 Oct 2017 Posts: 8
|
Posted: Wed Oct 11, 2017 8:09 am Post subject: |
|
|
Dark Byte wrote: | try
Code: |
keyDown(VK_Q)
sleep(1000)
keyUp(VK_Q)
|
|
Havent tried it, but i noticed the pointer isnt trustworthy. Gonna go back to getting a stable pointer for now.
Thanks for the help!
|
|
Back to top |
|
|
|