View previous topic :: View next topic |
Author |
Message |
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Sun Dec 01, 2019 2:02 am Post subject: Hitler please don't ignore |
|
|
I've made a lua script that constantly checks for health and if it is lower than max then it will send a keypress for medicine to use in this case 'Q'
Script is just fine I've tested in lua engine it presses Q automatically when health is low but this doesn't work in game
mouse events work fine but not the vk_codes
What is the problem??
Does anybody else has or had this problem???
EDIT
HERE'S THE SCRIPT
Code: |
{$lua}
[ENABLE]
if syntaxcheck then return end
AutoHealth_thread = createNativeThread(function (thread)
thread.freeOnTerminate(false)
thread.Name = 'AutoHealth_thread'
local health
while not thread.Terminated do
writeInteger('[[[[[[[[[["ACU.exe"+05221638]+64]+00]+78]+100]+00]+A8]+08]+28]+88]+28', 5)
local health = readInteger('[[[[[[[[[["ACU.exe"+0508B548]+18]+28]+48]+188]+00]+10]+148]+10]+68]+10')
if health < 70 then
keyDown('Q')
sleep(10)
keyUp('Q')
end
end
end)
[DISABLE]
if AutoHealth_thread then
AutoHealth_thread.terminate()
AutoHealth_thread.waitfor()
AutoHealth_thread.destroy()
AutoHealth_thread=nil
end
|
_________________
TH3 UND3N14BL3
Last edited by SEKTION on Mon Dec 02, 2019 8:57 am; edited 1 time in total |
|
Back to top |
|
|
Dieguardian How do I cheat? Reputation: 0
Joined: 30 Nov 2019 Posts: 4
|
Posted: Mon Dec 02, 2019 7:51 am Post subject: |
|
|
Huh?
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Dec 02, 2019 8:39 am Post subject: Re: Corroder please don't ignore |
|
|
S3KT10N wrote: | I've made a lua script......
Does anybody else has or had this problem??? |
Post your script here, so peoples able to help you.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Mon Dec 02, 2019 11:59 am Post subject: |
|
|
Use keybd_event function
Code: |
function keybd_event(VK)
assert(type(VK)=='number', 'invalid key');
return ExecuteCodeLocalEx('keybd_event',VK,0,0,0) and ExecuteCodeLocalEx('keybd_event',VK,0,2,0);
end |
_________________
Last edited by DaSpamer on Tue Dec 03, 2019 9:15 am; edited 1 time in total |
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Tue Dec 03, 2019 2:32 am Post subject: |
|
|
DaSpamer wrote: | Use keybd_event function
Code: |
function keybd_event(VK)
assert(type(VK)=='number', 'invalid key');
return ExecuteCodeLocalEx('keybd_event',VK,0,0,0)) and ExecuteCodeLocalEx('keybd_event',VK,0,2,0);
end |
|
so should I use it as is and call the function with key value cuz thats what i did at first and script won't compile saying it expects an end somewhere (also do we need ; in lua??)
then i altered it and somehow got it to compile but cheat engine freezes
and then i read somewhere that for keybd_event you have to define keys manually so i did and call it with keybd_event, script does compile but gives error on activating saying 'attempt to call global nil value'
_________________
TH3 UND3N14BL3 |
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Tue Dec 03, 2019 9:14 am Post subject: |
|
|
Sorry had a typo
Code: |
function keybd_event(VK)
assert(type(VK)=='number', 'invalid key');
return ExecuteCodeLocalEx('keybd_event',VK,0,0,0) and ExecuteCodeLocalEx('keybd_event',VK,0,2,0);
end |
put this outside your native thread function (after syntaxcheck..)
and call it like
Code: |
keybd_event(VK_LWIN) -- Left Window button... opens start menu in windows
|
And for you case replace
Code: |
keyDown('Q')
sleep(10)
keyUp('Q')
|
with
_________________
|
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Tue Dec 03, 2019 3:16 pm Post subject: |
|
|
Perhaps take a look at SendInput
_________________
|
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Wed Dec 04, 2019 11:45 am Post subject: |
|
|
Very thanks for your time
Code: |
local hWndNotepad = findWindow('Notepad');
local hWndChild = getWindow(hWndNotepad, 5); -- Get the child edit control..
sendMessage(hWndChild, 0x0100, 0x48, 0); -- Send WM_KEYDOWN
sendMessage(hWndChild, 0x0101, 0x48, 0); -- Send WM_KEYUP
sendMessage(hWndChild, 0x0102, 0x48, 0); -- Send WM_CHAR
|
I found this in other thread when looking for sendInput but can't find anything useful related to sendInput
I tried this but this also doesn't work
If anybody aware of some other method which is not blocked by game or know about a tut of sendInput in lua,would you be so kind to point me to it?
many thanks!!!
_________________
TH3 UND3N14BL3 |
|
Back to top |
|
|
Lee_Cia_ik How do I cheat? Reputation: 0
Joined: 03 Nov 2008 Posts: 1
|
Posted: Thu Dec 05, 2019 2:55 am Post subject: |
|
|
why there is my id called on the topic. and every signature.
|
|
Back to top |
|
|
atom0s Moderator Reputation: 199
Joined: 25 Jan 2006 Posts: 8518 Location: 127.0.0.1
|
|
Back to top |
|
|
|