AFK mode in game [Auto Clicker]

Upload *YOUR* gamehacking tools/helpers here
Post Reply
User avatar
AylinCE
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Jul 26, 2023 7:06 pm
Reputation: 2

AFK mode in game [Auto Clicker]

Post by AylinCE »

A code that allows you to stay as long as you want in many clicker games or games with a timeout error.

Of course on PC and with the option to click the mouse arrow in the game window.
In addition, the option to AFK 2 screens at the same time or automatic click with adjustable click speed.

[Link]

How to use:

Adapt to two screens;
1) Click button 4 (Move Select)
2) Hover over the screen where you want to record the click coordinate.
3) Click the right mouse button on the screen.
4) Coordinate must be written in box 1.
5) Do the same operations for the 2nd screen and the click coordinate will be written in the 2nd box.
6) If boxes 1 and 2 are empty, auto-click will click where the mouse arrow stopped.

Box No. 3;

Click speed setting. It should be written in 1/1000 of a second. In other words, if you write 1000 in the box, it means that the mouse arrow will click every 1 second.

checkbox 5;

If everything is ok, check this box and lock all settings. Uncheck the box to set it up again.
After confirming this box, the "F8" key on your keyboard will be authorized to start and stop automatic clicking.
If the checkbox is cleared, the "F8" key will be invalid and useless.


Here is the code:
(Do I need to say that?)
Copy the code, paste it into the CE >> Table >> Show Cheat Table Lua Script window and click the "Execute" button to start using it.

if autoFrm1 then autoFrm1.Destroy() autoFrm1=nil end
DP1=getScreenDPI()/96
autoFrm1=createForm()
autoFrm1.height=150*DP1 autoFrm1.width=300*DP1 autoFrm1.left=261*DP1 autoFrm1.top=98*DP1
autoFrm1.PopupMode=0 autoFrm1.caption="Auto Click Option"
autoFrm1.Position="poDesktopCenter" autoFrm1.BorderStyle="bsNone" autoFrm1.ShowInTaskBar="stAlways"
autoFrm1.setLayeredAttributes(0x000100, 255, LWA_COLORKEY | LWA_ALPHA )
autoFrm1.Color=0x000100
-------------------------
local autoTbl = {}
----------------------- autoTbl.mnPnl1 ----- 
autoTbl.mnPnl1=createPanel(autoFrm1)
autoTbl.mnPnl1.AutoSize=false
autoTbl.mnPnl1.height=30*DP1 autoTbl.mnPnl1.width=290*DP1 autoTbl.mnPnl1.left=5*DP1 autoTbl.mnPnl1.top=5*DP1
autoTbl.mnPnl1.caption="Auto Click Option"
autoTbl.mnPnl1.Cursor= -22
autoTbl.mnPnl1.Font.Style="fsBold" autoTbl.mnPnl1.Font.Size=0*DP1
autoTbl.mnPnl1.OnMouseDown = function() autoFrm1.DragNow() end
-----------------------
----------------------- autoTbl.mnPnl2 ----- 
autoTbl.mnPnl2=createPanel(autoFrm1)
autoTbl.mnPnl2.AutoSize=false
autoTbl.mnPnl2.height=70*DP1 autoTbl.mnPnl2.width=290*DP1 autoTbl.mnPnl2.left=5*DP1 autoTbl.mnPnl2.top=40*DP1
autoTbl.mnPnl2.Font.Style="fsBold" autoTbl.mnPnl2.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnPnl3 ----- 
autoTbl.mnPnl3=createPanel(autoFrm1)
autoTbl.mnPnl3.AutoSize=false
autoTbl.mnPnl3.height=30*DP1 autoTbl.mnPnl3.width=290*DP1 autoTbl.mnPnl3.left=5*DP1 autoTbl.mnPnl3.top=115*DP1
autoTbl.mnPnl3.Font.Style="fsBold" autoTbl.mnPnl3.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnBtn1 ----- 
autoTbl.mnBtn1=createButton(autoTbl.mnPnl1)
autoTbl.mnBtn1.AutoSize=false
autoTbl.mnBtn1.height=24*DP1 autoTbl.mnBtn1.width=30*DP1 autoTbl.mnBtn1.left=6*DP1 autoTbl.mnBtn1.top=3*DP1
autoTbl.mnBtn1.caption="--"
autoTbl.mnBtn1.Font.Style="fsBold" autoTbl.mnBtn1.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnBtn2 ----- 
autoTbl.mnBtn2=createButton(autoTbl.mnPnl1)
autoTbl.mnBtn2.AutoSize=false
autoTbl.mnBtn2.height=24*DP1 autoTbl.mnBtn2.width=30*DP1 autoTbl.mnBtn2.left=255*DP1 autoTbl.mnBtn2.top=3*DP1
autoTbl.mnBtn2.caption="X"
autoTbl.mnBtn2.Font.Style="fsBold" autoTbl.mnBtn2.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnEdt2 ----- 
autoTbl.mnEdt2=createEdit(autoTbl.mnPnl2)
autoTbl.mnEdt2.AutoSize=false
autoTbl.mnEdt2.height=21*DP1 autoTbl.mnEdt2.width=60*DP1 autoTbl.mnEdt2.left=5*DP1 autoTbl.mnEdt2.top=5*DP1
autoTbl.mnEdt2.text=""
autoTbl.mnEdt2.alignment="taLeftJustify"
autoTbl.mnEdt2.Font.Style="fsBold" autoTbl.mnEdt2.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnEdt3 ----- 
autoTbl.mnEdt3=createEdit(autoTbl.mnPnl2)
autoTbl.mnEdt3.AutoSize=false
autoTbl.mnEdt3.height=21*DP1 autoTbl.mnEdt3.width=60*DP1 autoTbl.mnEdt3.left=225*DP1 autoTbl.mnEdt3.top=5*DP1
autoTbl.mnEdt3.text=""
autoTbl.mnEdt3.alignment="taLeftJustify"
autoTbl.mnEdt3.Font.Style="fsBold" autoTbl.mnEdt3.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnEdt1 ----- 
autoTbl.mnEdt1=createEdit(autoTbl.mnPnl2)
autoTbl.mnEdt1.AutoSize=false
autoTbl.mnEdt1.height=21*DP1 autoTbl.mnEdt1.width=60*DP1 autoTbl.mnEdt1.left=225*DP1 autoTbl.mnEdt1.top=45*DP1
autoTbl.mnEdt1.text="125"
autoTbl.mnEdt1.alignment="taLeftJustify"
autoTbl.mnEdt1.Font.Style="fsBold" autoTbl.mnEdt1.Font.Size=0*DP1
-----------------------
----------------------- autoTbl.mnLbl1 ----- 
autoTbl.mnLbl1=createLabel(autoTbl.mnPnl2)
autoTbl.mnLbl1.AutoSize=false
autoTbl.mnLbl1.height=18*DP1 autoTbl.mnLbl1.width=150*DP1 autoTbl.mnLbl1.left=70*DP1 autoTbl.mnLbl1.top=7*DP1
autoTbl.mnLbl1.caption="<-- Window 1-2 or ' ' -->"
autoTbl.mnLbl1.alignment="taCenter"
autoTbl.mnLbl1.Font.Style="fsBold" autoTbl.mnLbl1.Font.Size=-12*DP1
-----------------------
----------------------- autoTbl.mnLbl2 ----- 
autoTbl.mnLbl2=createLabel(autoTbl.mnPnl2)
autoTbl.mnLbl2.AutoSize=false
autoTbl.mnLbl2.height=18*DP1 autoTbl.mnLbl2.width=150*DP1 autoTbl.mnLbl2.left=70*DP1 autoTbl.mnLbl2.top=25*DP1
autoTbl.mnLbl2.caption="AutoClick: Stoped!"
autoTbl.mnLbl2.alignment="taCenter"
autoTbl.mnLbl2.Font.Style="fsBold" autoTbl.mnLbl2.Font.Size=-14*DP1
-----------------------
----------------------- autoTbl.mnLbl3 ----- 
autoTbl.mnLbl3=createLabel(autoTbl.mnPnl2)
autoTbl.mnLbl3.AutoSize=false
autoTbl.mnLbl3.height=18*DP1 autoTbl.mnLbl3.width=154*DP1 autoTbl.mnLbl3.left=70*DP1 autoTbl.mnLbl3.top=47*DP1
autoTbl.mnLbl3.caption="Click Speed? --->>"
autoTbl.mnLbl3.alignment="taCenter"
autoTbl.mnLbl3.Font.Style="fsBold" autoTbl.mnLbl3.Font.Size=-14*DP1
-----------------------
----------------------- autoTbl.mnBtn3 ----- 
autoTbl.mnBtn3=createButton(autoTbl.mnPnl3)
autoTbl.mnBtn3.AutoSize=false
autoTbl.mnBtn3.height=23*DP1 autoTbl.mnBtn3.width=90*DP1 autoTbl.mnBtn3.left=5*DP1 autoTbl.mnBtn3.top=4*DP1
autoTbl.mnBtn3.caption="Move Select"
autoTbl.mnBtn3.Font.Style="fsBold" autoTbl.mnBtn3.Font.Size=9*DP1
-----------------------
----------------------- autoTbl.mnLbl3 ----- 
autoTbl.mnLbl4=createLabel(autoTbl.mnPnl3)
autoTbl.mnLbl4.AutoSize=false
autoTbl.mnLbl4.height=18*DP1 autoTbl.mnLbl4.width=80*DP1 autoTbl.mnLbl4.left=100*DP1 autoTbl.mnLbl4.top=7*DP1
autoTbl.mnLbl4.caption="0--0"
autoTbl.mnLbl4.alignment="taCenter"
autoTbl.mnLbl4.Font.Style="fsBold" autoTbl.mnLbl4.Font.Size=9*DP1
-----------------------
----------------------- autoTbl.chkBox1 ----- 
autoTbl.chkBox1=createCheckBox(autoTbl.mnPnl3)
autoTbl.chkBox1.AutoSize=true
autoTbl.chkBox1.height=19*DP1 autoTbl.chkBox1.width=95*DP1 autoTbl.chkBox1.left=185*DP1 autoTbl.chkBox1.top=7*DP1
autoTbl.chkBox1.caption="Script unLock"
autoTbl.chkBox1.alignment="taRightJustify"
autoTbl.chkBox1.Font.Style="fsBold" autoTbl.chkBox1.Font.Size=0*DP1
-----------------------
--############################################################################--
--############################################################################--
--############################################################################--
--############################################################################--
autoTbl.mnPnl1.Color=0xD4BC00 autoTbl.mnPnl2.Color=0xD4BC00 autoTbl.mnPnl3.Color=0xD4BC00

if AC_Tmr1 then AC_Tmr1.destroy() AC_Tmr1=nil end
AC_Tmr1=createTimer() AC_Tmr1.Interval=100
AC_Tmr1.Enabled=false

if AC_Tmr2 then AC_Tmr2.destroy() AC_Tmr2=nil end
AC_Tmr2=createTimer() AC_Tmr2.Interval=100
AC_Tmr2.Enabled=false
--############################################################################--
--############################################################################--
--############################################################################--


AC_Tmr1.OnTimer=function()
x,y = getMousePos()
PosX = tostring(x)
PosY = tostring(y)
autoTbl.mnLbl4.caption=PosX.."--"..PosY
if isKeyPressed(VK_RBUTTON) then
sleep(200)
if autoTbl.mnEdt2.text=="" then
autoTbl.mnEdt2.text=PosX.."<<>>"..PosY
else
autoTbl.mnEdt3.text=PosX.."<<>>"..PosY
end
end
end

autoTbl.mnBtn3.OnClick=function()
if AC_Tmr1.Enabled==false then
AC_Tmr1.Enabled=true
else
AC_Tmr1.Enabled=false
end
end

autoTbl.mnEdt2.OnClick=function() autoTbl.mnEdt2.Text="" end
autoTbl.mnEdt3.OnClick=function() autoTbl.mnEdt3.Text="" end
--############################################################################--
--############################################################################--
--############################################################################--

local ps1=0
local ps2=0
local ps3=1
local pTim1=0

AC_Tmr2.OnTimer=function()
if autoTbl.mnEdt2.Text=="" and autoTbl.mnEdt3.Text=="" then
mouse_event(MOUSEEVENTF_LEFTDOWN)
mouse_event(MOUSEEVENTF_LEFTUP)
else
if ps3==2 then ps1=1 ps3=1 else ps2=1 ps3=2 end
if autoTbl.mnEdt2.Text~="" then
Px1,Py1=string.match(autoTbl.mnEdt2.Text,"(.*)<<>>(.*)")
print(Px1,Py1)
if ps1==1 then
setMousePos(tonumber(Px1),tonumber(Py1))
mouse_event(MOUSEEVENTF_LEFTDOWN)
mouse_event(MOUSEEVENTF_LEFTUP)
ps1=0
end
end
if autoTbl.mnEdt3.Text~="" then
Px2,Py2=string.match(autoTbl.mnEdt3.Text,"(.*)<<>>(.*)")
print(Px2,Py2)
if ps2==1 then
setMousePos(Px2,Py2)
mouse_event(MOUSEEVENTF_LEFTDOWN)
mouse_event(MOUSEEVENTF_LEFTUP)
ps2=0
end
end
end
end

if autoH3 then autoH3.destroy() autoH3=nil end

function startClick1()
sleep(150)
AC_Tmr2.Interval=tonumber(autoTbl.mnEdt1.Text)
if autoTbl.chkBox1.Checked~=true then
showMessage("Please lock the script first!")
else
if AC_Tmr2.Enabled==false then
AC_Tmr2.Enabled=true
autoTbl.mnLbl2.caption="AutoClick: Started!"
else
AC_Tmr2.Enabled=false
autoTbl.mnLbl2.caption="AutoClick: Stoped!"
end
end
end

autoTbl.chkBox1.OnChange=function()
if autoTbl.chkBox1.Checked==true then
autoTbl.mnBtn3.Enabled=false
autoTbl.mnEdt1.Enabled=false
autoTbl.mnEdt2.Enabled=false
autoTbl.mnEdt3.Enabled=false
AC_Tmr1.Enabled=false
if autoH2 then autoH2.destroy() autoH2=nil end
autoH2=createHotkey(startClick1, VK_F8)
autoTbl.chkBox1.caption="Script Lock"
else
autoTbl.mnBtn3.Enabled=true
autoTbl.mnEdt1.Enabled=true
autoTbl.mnEdt2.Enabled=true
autoTbl.mnEdt3.Enabled=true
AC_Tmr2.Enabled=false
if autoH2 then autoH2.destroy() autoH2=nil end
autoTbl.chkBox1.caption="Script unLock"
end
end
--############################################################################--
--############################################################################--
--############################################################################--
autoTbl.mnBtn1.OnClick=function()
autoFrm1.WindowState = "wsMinimized"
end

autoTbl.mnBtn2.OnClick=function()
--AC_frm.Close()
closeCE()
return caFree
end
--############################################################################--
--############################################################################--
--############################################################################--


Of course you can tailor the code to your own use case.

If anyone has a problem or has a different opinion, please leave a comment.

Post Reply

Who is online

Users browsing this forum: Finnik