Posted: Mon May 25, 2020 9:45 pm Post subject: Using mouse left click down and up as hotkey
Hello,
I want to create a script that uses mouse left click down and up as hotkey. I have the cheat addresses for the game already. Basically, I want to make a script that changes the float value of the address whenever left click down is pressed. It then reverts back to the original value when the left click gets released (left click up).
Joined: 09 May 2003 Posts: 25823 Location: The netherlands
Posted: Tue May 26, 2020 1:39 am Post subject:
Code:
local address=0x00400500
local newvalue=200
if leftclickthread then
leftclickthread.destroy()
leftclickthread=nil
end
leftclickthread=createThread(function(x)
local originalvalue=nil
while not x.Terminated do
if originalvalue then --leftbutton was down last time we checked
if isKeyPressed(VK_LBUTTON)==false then
writeFloat(address, originalvalue)
originalvalue=nil
end
else
if isKeyPressed(VK_LBUTTON) then
originalvalue=readFloat(address)
writeFloat(address, newvalue)
end
end
sleep(100)
end
end)
_________________
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
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum