Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Other Semi-Popular First Person Shooter Hacks › All Points Bulletin Reloaded Hacks › [HELP][Source Code] APB Reloaded AFK Bot

Unhappy[HELP][Source Code] APB Reloaded AFK Bot

Posts 1–5 of 5 · Page 1 of 1
BE
Benjamin366
[HELP][Source Code] APB Reloaded AFK Bot
I do not own this code.
Its from RAWR(: named user.

I get FilesDir error:
Line 247
FilesDir)
FilesDir^ ERROR

Error: Missing separator character after keyword.

[CODE]
#RequireAdmin


Opt("MustDeclareVars", 1)
;This opt is not necessary, but it does offer a lot of help when trying to debug as this opt forces you to declare all of your variables.
;Bot requires admin to be able to control the "APB Reloaded" process and send data to the window in the form of keyboard and mouse activity.
;This is due to UAC access restrictions where a process must be running as Admin to control any other process that is also running as Admin.


#region ;Script Settings
#region ;Internal Settings - Note: Will not change after you compile the script!
Global $SettingsFile = "AFKBotConfiguration.cfg"
;The file that stores all of your User Settings data


Global $GameStartTime = 15
;Time the game takes to go from the splash screen to the login interface, in seconds.
;Defaults at 15 seconds, but this could be set lower if you have faster hardware.
;Set this too low and the AutoLogin will fail!


Global $DistrictLoadTime = 60
;Time the game takes to load a district from the district select interface, in seconds.
;Defaults at 60 seconds, but this could be lower if you have faster hardware.
;Set this too low and the AutoLogin will fail!


Global $Sleep1[2] = [5, 15]
;Controls first sleep timer, with the timer being a number between the first number and the second number, in seconds


Global $Sleep2[2] = [0, 10]
;Controls second sleep timer, with the timer being a number between the first number and the second number, in seconds


Global $Sleep3[2] = [5, 15]
;Controls third sleep timer, with the timer being a number beteen the first number and the second number, in seconds


Global $TimeToMove = 2
;Timer in seconds that the bot should move your character randomly


Global $UnstickEnable = True


Global $UnstickRandomAddition[2] = [1, 5]
;Controls the adder that adds to the "ForceRandomPhrase" variable. It adds a random number between the two values to the $ForceRandomPhrase var


Global $UnstickTriggerNumber = 10
;When the adder makes the "ForceRandomPhrase" variable greater than this number, a random phrase is typed in game


Global $RandomPhraseEnable = False
;Enables usage of the Random Phrase function.


Global $RPRandomAddition[2] = [1, 3]
;Controls the adder that adds to the "ForceRandomPhrase" variable. It adds a random number between the two values to the $ForceRandomPhrase var


Global $RPTriggerNumber = 6
;When the adder makes the "ForceRandomPhrase" variable greater than this number, a random phrase is typed in game


Global $PhrasesFile = "Phrases.txt"
;The file with various phrases to be used by the random phrase function


Global $EnableSound = True
;Enable beeps on pause/unpause of bot


Global $EnableTrayPopup = False
;Enable "Toasts" from notification tray indicating status of bot on pause/unpause


#endregion ;Internal Settings - Note: Will not change after you compile the script!


#region ;User Settings Variable Declaration
Global $GameFolder
Global $Width
Global $Height
Global $UseAutoLogin
Global $Email
Global $Password
Global $Character
Global $District
Global $Organization
Global $PauseKey
#endregion ;User Settings Variable Declaration
#endregion ;Script Settings
#region ;Button Coordinate Proportions
#region ;Login
Global $LoginEmail[2] = [0.432291666666667, 0.482407407407407]
Global $LoginPass[2] = [0.432291666666667, 0.528703703703704]
Global $LoginButton[2] = [0.566666666666667, 0.570370370370370]


Global $CharacterSlots[2] = [0.089062500000000, 0.210185185185185]
Global $CharacterSpacing = 0.0388888888888888
Global $SelectCharacter[2] = [0.942187500000000, 0.979629629629630]


Global $FinanDistrict[2] = [0.496354166666667, 0.483333333333333]
Global $WFDistrict[2] = [0.632291666666667, 0.473148148148148]
Global $JoinDistrict[2] = [0.947916666666667, 0.980555555555556]
#endregion ;Login


#region ;Crim
#region ;Finan Crim
;Global $StregaBloodrose[2] = [0.387500000000000,0.146296296296296]
;Global $Suji[2] = [0.258333333333333,0.438888888888889]
Global $DoubleB[2] = [0.524479166666667, 0.501851851851852]
;Global $VeronikaLee[2] = [0.651562500000000,0.601851851851852]
;Global $Javez[2] = [0.252083333333333,0.883333333333333]
;Global $GraysonFell[2] = [0.416145833333333,0.855555555555556]
#endregion ;Finan Crim


#region ;WF Crim
;Global $TerriQuan[2] = [0.171354166666667,0.660185185185185]
;Global $TyronSennet[2] = [0.339062500000000,0.656481481481481]
Global $PaganBloodrose[2] = [0.431770833333333, 0.579629629629630]
;Global $ByronBloodrose[2] = [0.480729166666667,0.469444444444444]
;Global $HarmonBenjamin[2] = [0.549479166666667,0.474074074074074]
;Global $BritneyBloodrose[2] = [0.621354166666667,0.231481481481481]
#endregion ;WF Crim
#endregion ;Crim


#region ;4cers
#region ;Finan 4cer
Global $WilsonLeBoyce[2] = [0.456054687500000, 0.789062500000000]
;Global $TyDurrants[2] =
;Global $Grissom[2] =
;Global $SaultLinklater[2] =
;Global $KasperDanko[2] =
;Global $HaeChoi[2] =
;Global $JustinTeng[2] =
;Global $VioletPrentiss[2] =
;Global $MirriKent[2] =
;Global $DarrylKent[2] =
#endregion ;Finan 4cer


#region ;WF 4cer
Global $SimonTran[2] = [0.070312500000000, 0.816406250000000]
;Global $EvaOrlandez[2] =
;Global $Sabbat[2] =
;Global $MiguelEstebano[2] =
;Global $ChungHee[2] =
;Global $AkikoX[2] =
;Global $StuPhoenix[2] =
;Global $Chiza[2] =
;Global $ByeongLee[2] =
;Global $OrlenzMoretti[2] =
#endregion ;WF 4cer
#endregion ;4cers


#region ;Inventory Buttons
Global $InventoryPrimary[2] = [0.377083333333333, 0.351851851851851]
Global $InventorySecondary[2] = [0.363541666666666, 0.603703703703703]
Global $InventoryClear[2] = [0.646354166666667, 0.347222222222222]
#endregion ;Inventory Buttons


#region ;Misc
Global $PremiumMsg[2] = [0.312500000000000, 0.776041666666666]
Global $ContactScreen[2] = [0.630208333333333, 0.756481481481481]
#endregion ;Misc


;The above are the button click points in game. You can get a button click point for any resolution by performing the following calculation.
;
;Button Coordinate X / Screen Width = Proportion
;(Put this into an array formatted like the above click arrays)
;
;Proportion * Width Of Any Computer = Click Coordinate on new screen
;(Automatically done with the _Click function)
;
;Note: Replace X (Width) for Y (Height) when finding Y.


#endregion ;Button Coordinate Proportions


#region ;Main


Global $Paused
;Creates the global variable for the "_TogglePause" function.


Global $ForceRandomPhrase
;Creates the global var to force a random phrase based on the $RPTriggerNumber var and $RPRandomAddition array.


Global $ForceUnstick
;Creates the global var to force a random phrase based on the $UnstickTriggerNumber var and $UnstickRandomAddition array.


_ReadSettings()
;Retrieves all of the settings for the bot from the configuration file.


HotKeySet($PauseKey, "_TogglePause")
;Sets the hotkey for pausing the bot.


If $UseAutoLogin Then _LoginSystem($Email, $Password, $Character, $District, $Organization, $Height, $Width)
;starts the automatic login system if Auto Login is enabled.


Do
While WinActive("APB Reloaded")
_RandomTimer($Sleep1)
Send("k")
Send("b")
_RandomTimer($Sleep2)
_MoveCharacter($TimeToMove)
_RandomPhrase($RandomPhraseEnable, $RPRandomAddition, $RPTriggerNumber, $PhrasesFile)
_RandomUnstick($UnstickEnable, $UnstickRandomAddition, $UnstickTriggerNumber)
_Click($PremiumMsg, $Width, $Height)
WEnd
Until 0
;See function region!


#endregion ;Main


#region ;Functions


;_ReadSettings() - Reads all of the settings from the configuration file. If a value doesn't exist, the bot will ask for the value, save it, then proceed.
Func _ReadSettings()
$GameFolder = IniRead($SettingsFile, "GamePath", "Path", "")
If Not FileExists($GameFolder & "\APBGame\Config\APBEngine.ini") Then
Do
$GameFolder = FileSelectFolder("Find the APB Reloaded install folder", "", 0, @program
FilesDir)

Until FileExists($GameFolder & "\APBGame\Config\APBEngine.ini")
IniWrite($SettingsFile, "GamePath", "Path", $GameFolder)
EndIf
;If the game's configuration file is not found, then your path name is incorrect. The bot will proceed to ask for the proper path until the proper path is given and then write the proper path into the configuration file.


$Width = IniRead($GameFolder & "\APBGame\Config\APBEngine.ini", "SystemSettings", "ResX", "")
;Retrieves your screen width from the games configuration files.
$Height = IniRead($GameFolder & "\APBGame\Config\APBEngine.ini", "SystemSettings", "ResY", "")
;Retrieves your screen height from the games configuration files


$UseAutoLogin = Number(IniRead($SettingsFile, "AutoLogin", "Enable", ""))
;Reads the config to see if you want to use the "_LoginSystem" function.
If $UseAutoLogin = "" Then
If MsgBox(4, "Autologin", "Would you like to use the auto login functionality?") = 6 Then
$UseAutoLogin = 1
IniWrite($SettingsFile, "AutoLogin", "Enable", "1")
Else
$UseAutoLogin = 0
IniWrite($SettingsFile, "AutoLogin", "Enable", "0")
EndIf
EndIf


;If read AutoLogin response is blank then the bot will ask you if you want to use the auto login functionality. If you say yes (Msgbox return 6), the variable UseAutoLogin is set to 1. Otherwise, the variable UseAutoLogin is set to 0. This variable is then written to the settings file.
If Number($UseAutoLogin) Then
;If the auto login iniRead returns 1 then...
;Note: Number() is used to convert the iniRead string output into a number to use in a boolean comparison.


$Email = IniRead($SettingsFile, "AutoLogin", "Email", "")
;Retrieves your email from the settings file.
If Not StringRegExp($Email, '(?<user>(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\"(??:[^\"\\\r\n])|(?:\\.))*\"))(?:\.(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\"(??:[^\"\\\r\n])|(?:\\.))*\")))*)@(?<domain>(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\[(??:[^\[\]\\\r\n])|(?:\\.))*\]))(?:\.(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\[(??:[^\[\]\\\r\n])|(?:\\.))*\])))*)') Then
Do
$Email = InputBox("Email", "Please input your email", "", " M")
Until StringRegExp($Email, '(?<user>(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\"(??:[^\"\\\r\n])|(?:\\.))*\"))(?:\.(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\"(??:[^\"\\\r\n])|(?:\\.))*\")))*)@(?<domain>(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\[(??:[^\[\]\\\r\n])|(?:\\.))*\]))(?:\.(??:[^ \t\(\)\<\>@,;\:\\\"\.\[\]\r\n]+)|(?:\[(??:[^\[\]\\\r\n])|(?:\\.))*\])))*)')
IniWrite($SettingsFile, "Autologin", "Email", $Email)
EndIf
;If read email doesn't match the RFC 822 specification (Valid e-Mail) then the bot will ask you for an e-Mail until it matches the specification. The bot then writes that to the configuration file.


$Password = IniRead($SettingsFile, "AutoLogin", "Password", "")
;Retrieves your password from the settings file.
If $Password = "" Or Not StringRegExp($Password, "^[a-zA-Z0-9]+$") Then
Do
$Password = InputBox("Password", "Please input your password", "", "*M")
Until StringRegExp($Password, "^[a-zA-Z0-9]+$")
IniWrite($SettingsFile, "Autologin", "Password", $Password)
EndIf
;If read password is blank or does not contain only letters and numbers then the bot will ask for your password with the characters displayed as * until it only has letters and numbers (G1 limitation). The bot then writes that to the configuration file.


$Character = IniRead($SettingsFile, "Autologin", "Character", "")
If Floor($Character) > 0 Then
Do
$Character = InputBox("Character Selection", "Which character slot should be botted?", "1")
Until Floor($Character) > 0
IniWrite($SettingsFile, "Autologin", "Character", $Character)
EndIf
;If read character selection is 0 (Letters and blanks are counted as zeros) then the bot will ask you which character slot should be botted until the selected character slot is greater then 1. The bot then writes that to the configuration file.


$District = StringUpper(IniRead($SettingsFile, "Autologin", "District", ""))
If Not ($District == "WF") Or Not ($District == "FINAN") Then
Do
$District = InputBox("District Select", "Type WF for waterfront district, or Finan for financial district", "")
;Asks which district you want to go into...
Until StringUpper($District) == "WF" Or StringUpper($District) == "FINAN"
IniWrite($SettingsFile, "Autologin", "District", $District)
EndIf
;If district selection doesn't match WF or FINAN then the bot will ask you which district you want until your input matches either WF or FINAN. (Case sensitive so we use a "StringUpper()" function on your input to make sure it's ALWAYS upper case.)


$Organization = StringUpper(IniRead($SettingsFile, "Autologin", "Organization", ""))
If Not ($Organization == "CRIMINAL") Or Not ($Organization == "ENFORCER") Then
Do
$Organization = InputBox("Organization Select", "Type Criminal or Enforcer for your organization", "")
Until StringUpper($Organization) == "CRIMINAL" Or StringUpper($Organization) == "ENFORCER"
IniWrite($SettingsFile, "Autologin", "Organization", $Organization)
EndIf
;If read organization selection is blank or doesn't match CRIMINAL or ENFORCER then the bot will ask you which Organization you want until your input matches either WF or FINAN. (Case sensitive so we use a "StringUpper()" function on your input to make sure it's ALWAYS upper case.)
EndIf
;The Autologin variables have now been declared if autologin was enabled. Otherwise, that procedure was skipped and the autologin function will not be called later on in the bot.


$PauseKey = IniRead($SettingsFile, "Hotkeys", "TogglePause", "")
If $PauseKey = "" Then
Do
$PauseKey = InputBox("Pause key", "What key should pause the bot?" & @LF & @LF & "Note the following:" & @LF & "Modifier keys alone will not work" & @LF & "This uses AutoIt syntax.", "`", " M")
Until Not ($PauseKey = "")
IniWrite($SettingsFile, "Hotkeys", "TogglePause", $PauseKey)
EndIf
;If read pause key is blank then the bot asks which key to be used to pause the bot until pause key is not blank (Something is given). The bot then writes that to the configuration file.


MsgBox(0, "Finished!", "The bot will now be starting!" & @LF & "To change these settings at a future date, just delete the configuration file, " & $SettingsFile & "!")
EndFunc ;==>_ReadSettings


;_LoginSystem(True/False [On/Off], Login Email, Login Password, Character to Bot, District Selection)
Func _LoginSystem($LE, $LP, $Ch, $DS, $Org, $W = @desktopWidth, $H = @desktopHeight)
If FileExists($GameFolder & "\APBGame\Movies\SplashScreen.bik") Then
FileMove($GameFolder & "\APBGame\Movies\SplashScreen.bik", $GameFolder & "\APBGame\Movies\Disabled\", 9)
EndIf


If FileExists($GameFolder & "\APBGame\Movies\IntroTitles.bik") Then
FileMove($GameFolder & "\APBGame\Movies\IntroTitles.bik", $GameFolder & "\APBGame\Movies\Disabled\", 9)
EndIf


If Not WinExists("APB Reloaded", "") Then
ShellExecute($GameFolder & "\Binaries\APB.exe")
While Not WinExists("APB Reloaded")
Sleep(1000)
WEnd
EndIf


Sleep($GameStartTime * 1000)


If Not WinActive("APB Reloaded") Then
WinActivate("APB Reloaded")
Sleep(5000)
EndIf


_Click($LoginEmail, $W, $H)
Send("^a" & "{BS}" & $LE)
_Click($LoginPass, $W, $H)
Send("^a" & "{BS}" & $LP)
_Click($LoginButton, $W, $H)
Sleep(15000)
_CharacterSelect($CharacterSlots, $CharacterSpacing, $Ch, $W, $H)
Sleep(10000)
_Click($SelectCharacter, $W, $H)
Sleep(10000)
Switch $DS
Case "FINAN"
_Click($FinanDistrict, $W, $H)
_Click($JoinDistrict, $W, $H)
Sleep($DistrictLoadTime)
Switch $Org
Case "CRIMINAL"
_Click($DoubleB, $W, $H)
Case "ENFORCER"
_Click($WilsonLeBoyce, $W, $H)
Case Else
MsgBox(0, "Error!", "No organization selected or organization selection is invalid.")
EndSwitch
Case "WF"
_Click($WFDistrict, $W, $H)
_Click($JoinDistrict, $W, $H)
Sleep($DistrictLoadTime)
Switch $Org
Case "CRIMINAL"
_Click($PaganBloodrose, $W, $H)
Case "ENFORCER"
_Click($SimonTran, $W, $H)
Case Else
MsgBox(0, "Error!", "No organization selected or organization selection is invalid.")
EndSwitch
Case Else
MsgBox(0, "Error!", "No district selected or district selection is invalid.")
Exit
EndSwitch
Sleep(10000)
_RemoveWeapons($InventoryPrimary, $InventorySecondary, $InventoryClear, $W, $H)
EndFunc ;==>_LoginSystem


;_Click(Button, Width, Height, Click count)
Func _Click(ByRef $ClickLocation, $W = @desktopWidth, $H = @desktopHeight, $Clicks = 1)
MouseClick("Left", $ClickLocation[0] * $Width, $ClickLocation[1] * $H, $Clicks)
EndFunc ;==>_Click


;_CharacterSelect(Character Slot 1 Location, Spacing between click points on boxes, Character To Select, Width, Height)
Func _CharacterSelect(ByRef $ClickLocation, $aS, $Character, $W = @desktopWidth, $H = @desktopHeight)
MouseClick("Left", $ClickLocation[0] * $W, ($ClickLocation[1] + ($aS * ($Character - 1))) * $H, 1)
EndFunc ;==>_CharacterSelect


;_RemoveWeapons(Inventory Primary Button, Inventory Secondary Button, Inventory Clear Button, Width, Height)
Func _RemoveWeapons(ByRef $IP, ByRef $IS, ByRef $IC, $W = @desktopWidth, $H = @desktopHeight)
_Click($IP, $W, $H)
Sleep(1000)
_Click($IC, $W, $H)
Sleep(1000)
_Click($IS, $W, $H)
Sleep(1000)
_Click($IC, $W, $H)
EndFunc ;==>_RemoveWeapons


;_RandomTimer(Sleep Time Array)
Func _RandomTimer(ByRef $SA)
Sleep(Number(Random($SA[0], $SA[1], 1) * 1000))
EndFunc ;==>_RandomTimer


;_MoveCharacter(Time to move character in seconds, Direction to Move ["R" = Random | 1 = W | 2 = S | 3 = A | 4 = S])
Func _MoveCharacter($TTM = 2, $Direction = "R")
Opt("SendKeyDownDelay", $TTM * 1000)
Switch $Direction
Case "R"
_MoveCharacter($TTM, Number(Random(1, 4, 1)))
Case 1
Send("w")
Case 2
Send("d")
Case 3
Send("a")
Case 4
Send("s")
EndSwitch
Opt("SendKeyDownDelay", 5)
EndFunc ;==>_MoveCharacter


;_RandomPhrase(True/False [On/Off], Random Addition Array, Trigger Number, Phrases File,)
Func _RandomPhrase($RPE, ByRef $RA, $TN = 6, $PF = "RandomPhrases.txt")
If $RPE Then
Global $PhrasesArray
If Not IsDeclared("ForceRandomPhrase") Then
Global $ForceRandomPhrase
EndIf
If (Not IsDeclared("PhrasesArray")) Or (Not IsArray($PhrasesArray)) Then
If FileExists($PF) Then _FileReadToArray($PF, $PhrasesArray)
EndIf
$ForceRandomPhrase += Number(Random($RA[0], $RA[1]))
If $ForceRandomPhrase >= Number($TN) Then
Send("{Enter}")
Sleep(2000)
Send("/d " & $PhrasesArray[Random(1, $PhrasesArray[0], 1)])
Sleep(2000)
Send("{Enter}")
$ForceRandomPhrase = 0
EndIf
EndIf
EndFunc ;==>_RandomPhrase


;_FileReadToArray(File Path, Array to input read file into)
Func _FileReadToArray($sFilePath, ByRef $aArray)
Local $hFile = FileOpen($sFilePath, 0)
If $hFile = -1 Then Return SetError(1, 0, 0)
Local $aFile = FileRead($hFile, FileGetSize($sFilePath))
If StringRight($aFile, 1) = @LF Then $aFile = StringTrimRight($aFile, 1)
If StringRight($aFile, 1) = @CR Then $aFile = StringTrimRight($aFile, 1)
FileClose($hFile)
If StringInStr($aFile, @LF) Then
$aArray = StringSplit(StringStripCR($aFile), @LF)
ElseIf StringInStr($aFile, @CR) Then
$aArray = StringSplit($aFile, @CR)
Else
If StringLen($aFile) Then
Dim $aArray[2] = [1, $aFile]
Else
Return SetError(2, 0, 0)
EndIf
EndIf
Return 1
EndFunc ;==>_FileReadToArray


Func _RandomUnstick($UE, ByRef $RA, $TN = 10)
If $UE Then
If Not IsDeclared("ForceUnstick") Then
Global $ForceUnstick
EndIf
$ForceUnstick += Random($RA[0], $RA[1])
If $ForceUnstick >= $TN Then
Send("{ENTER}")
Sleep(2000)
Send("/Unstick")
Sleep(2000)
Send("{Enter}")
Sleep(10000)
$ForceUnstick = 0
EndIf
EndIf
EndFunc ;==>_RandomUnstick


;_TogglePause(N/A)
Func _TogglePause()
$Paused = Not $Paused
If $Paused Then
If Number($EnableSound) Then
Beep(300, 100)
Beep(200, 100)
EndIf


If Number($EnableTrayPopup) Then TrayTip("", "AFK Bot has been paused", 1, 16)
Else
If Number($EnableSound) Then
Beep(200, 100)
Beep(300, 100)
EndIf
If Number($EnableTrayPopup) Then TrayTip("", "AFK Bot has been unpaused", 1, 16)
EndIf
Do
ToolTip('AFK Bot is paused', 0, 0)
Sleep(100)
Until Not $Paused
ToolTip("")
EndFunc ;==>_TogglePause
#endregion ;Functions
[CODE]
#1 · edited 13y ago · 13y ago
RE
RedKoolAid
i think this is a macro.

---------- Post added at 02:18 PM ---------- Previous post was at 01:58 PM ----------

It's not C++
#2 · 13y ago
HA
Haxor-death
nice one pal.
#3 · 13y ago
RA
RAWR(:
Here you go. I'm assuming you already have AutoIt installed.

Please be aware that 32bit will get you banned. You MUST compile as a 64 bit application.

#include <file.au3>
#Region ;ScriptSettings
#Region ;UserSetSettings


Global $Width = InputBox("Game Resolution Width", "Please input your game resolution width", @desktopWidth)
Global $Height = InputBox("Game Resolution Height", "Please input your game resolution height", @desktopHeight)
Global $Q = Msgbox(4, "Login System", "Would you like to use the bot's automatic login system?")
If $Q = 6 then
Global $Email = InputBox("Email", "Please input your email")
Global $Password = InputBox("Password", "Please input your password", "", "*")
Global $Character = InputBox("Character Selection", "Which character slot should be botted?", "1")


Do
Global $District = StringUpper(InputBox("District Select", "Type WF for waterfront, or Finan for financial", "Finan"))
Until $District == "WF" OR $District == "FINAN"
EndIf


Global $PauseKey = InputBox("Pause key", "What key should pause the bot?", "`")


Global $PhrasesFile = "Phrases.txt"
#EndRegion ;UserSetSettings


#Region ;InternalSettings
Global $Sleep1[2] = [5,15]
;Controls first sleep timer, with the timer being a number between the first number and the second number, in seconds


Global $Sleep2[2] = [0,10]
;Controls second sleep timer, with the timer being a number between the first number and the second number, in seconds


Global $Sleep3[2] = [5,15]
;Controls third sleep timer, with the timer being a number between the first number and the second number, in seconds


Global $RandomAddition[2] = [1,3]
;Controls the adder that adds to the "ForceRandomPhrase" variable. It adds a random number between the two values to the $ForceRandomPhrase var.


Global $TriggerNumber = 6
;When the adder makes the "ForceRandomPhrase" variable greater than this number, a random phrase is typed in game.
#EndRegion ;InternalSettings
#EndRegion ;ScriptSettings


#Region ;Internal Vars
Global $LoginEmail[2] = [0.432291666666667,0.482407407407407]
Global $LoginPass[2] = [0.432291666666667,0.528703703703704]
Global $LoginButton[2] = [0.566666666666667,0.570370370370370]


Global $CharacterSlots[2] = [0.089062500000000,0.210185185185185]
Global $CharacterSpacing = 0.0388888888888888
Global $SelectCharacter[2] = [0.942187500000000,0.979629629629630]


Global $FinanDistrict[2] = [0.496354166666667,0.483333333333333]
Global $WFDistrict[2] = [0.632291666666667,0.473148148148148]
Global $JoinDistrict[2] = [0.947916666666667,0.980555555555556]


Global $DoubleB[2] = [0.524479166666667,0.501851851851852]
Global $StregaBloodrose[2] = [0.387500000000000,0.146296296296296]
Global $Suji[2] = [0.258333333333333,0.438888888888889]
Global $ArlonBenjamin[2] = [0.330208333333333,0.485185185185185]
Global $GraysonFell[2] = [0.416145833333333,0.855555555555556]
Global $Javez[2] = [0.252083333333333,0.883333333333333]
Global $VeronikaLee[2] = [0.651562500000000,0.601851851851852]
Global $TerriQuan[2] = [0.171354166666667,0.660185185185185]
Global $TyronSennet[2] = [0.339062500000000,0.656481481481481]


Global $PaganBloodrose[2] = [0.431770833333333,0.579629629629630]
Global $ByronBloodrose[2] = [0.480729166666667,0.469444444444444]
Global $HarmonBenjamin[2] = [0.549479166666667,0.474074074074074]
Global $BritneyBloodrose[2] = [0.621354166666667,0.231481481481481]


Global $PremiumMsg[2] = [0.398958333333333,0.699074074074074]


Global $Paused
Global $Phrases[1]
#EndRegion ;Internal Vars


Global $ForceRandomPhrase
#Region ;Main
HotkeySet($PauseKey, "_TogglePause")
If $Q = 6 Then _LoginSystem()


If FileExists($PhrasesFile) Then _FileReadToArray($PhrasesFile, $Phrases)


While 1
While WinActive("APB Reloaded")
Sleep(Number(Random($Sleep1[0], $Sleep1[1], 1) * 1000))
Send("k")
Send("b")
Sleep(Number(Random($Sleep2[0], $Sleep2[1], 1) * 1000))
Send("{Enter}")
Sleep(2000)
Send("/AbandonMission")
Sleep(2000)
Send("{Enter}")
Sleep(Number(Random($Sleep3[0], $Sleep3[1], 1) * 1000))
Switch Number(Random(1, 4, 1))
Case 1
Send("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww")
Case 2
Send("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
Case 3
Send("sssssssssssssssssssssssssssssss")
Case 4
Send("ddddddddddddddddddddddddddddddd")
EndSwitch
If FileExists($PhrasesFile) Then _RandomPhrase()
_Click($PremiumMsg)
Wend
WEnd
#EndRegion ;Main


#Region ;Functions
Func _LoginSystem()
WinSetState("APB Reloaded", "", @SW_MAXIMIZE)
Sleep(10000)
_Click($LoginEmail)
Send("^a" & $Email)
_Click($LoginPass)
Send("^a" & $Password)
_Click($LoginButton)
Sleep(15000)
_CharacterSelect($CharacterSlots, $CharacterSpacing, $Character)
Sleep(10000)
_Click($SelectCharacter)
Sleep(10000)
If $District == "FINAN" Then
_Click($FinanDistrict)
_Click($JoinDistrict)
Sleep(60000)
_Click($DoubleB)
ElseIf $District == "WF" Then
_Click($WFDistrict)
_Click($JoinDistrict)
Sleep(60000)
_Click($PaganBloodrose)
Else
MsgBox(0,"Error", "No district selected")
EndIf
EndFunc


;_Click($LoginButton)
Func _Click(ByRef $ClickLocation, $Clicks = 1)
MouseMove($ClickLocation[0] * $Width, $ClickLocation[1] * $Height, 50)
MouseClick("Left", $ClickLocation[0] * $Width, $ClickLocation[1] * $Height, $Clicks)
EndFunc


;_CharacterSelect($CharacterSlot1, $CharacterSpacing, 1)
Func _CharacterSelect(ByRef $ClickLocation, $aS, $Character)
MouseMove($ClickLocation[0] * $Width, ($ClickLocation[1] + ($aS * ($Character - 1))) * $Height, 50)
MouseClick("Left", $ClickLocation[0] * $Width, ($ClickLocation[1] + ($aS * ($Character-1))) * $Height, 1)
EndFunc


Func _RandomPhrase()
$ForceRandomPhrase += Number(Random($RandomAddition[0], $RandomAddition[1]))
If $ForceRandomPhrase > Number($TriggerNumber) Then
Send("{Enter}")
Sleep(2000)
Send("/d " & $Phrases[Random(1, $Phrases[0], 1)])
Sleep(2000)
Send("{Enter}")
$ForceRandomPhrase = 0
EndIf
EndFunc ;==>_RandomPhrase


Func _TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('AFK Bot is paused', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>_TogglePause
#EndRegion ;Functions
#4 · edited 13y ago · 13y ago
RE
RedKoolAid
Quote Originally Posted by RAWR(: View Post
Here you go. I'm assuming you already have AutoIt installed.

Please be aware that 32bit will get you banned. You MUST compile as a 64 bit application.
Thanks man.
#5 · 13y ago
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

  • I need Help source Code for Fast Reload in WR phBy F l a p J a c K ™ in WarRock Hack Source Code
    18Last post 13y ago
  • Help with source code! Easy fast scope bot!By Zoom in C++/C Programming
    22Last post 17y ago
  • CFPRO-BR Help source code!By 6ixth in Crossfire Coding Help & Discussion
    1Last post 13y ago
  • [HELP] Source code mess up?By jonnyboy9985 in Combat Arms Hack Coding / Programming / Source Code
    33Last post 16y ago
  • [HELP] Source Code HelpBy jonnyboy9985 in Combat Arms Hack Coding / Programming / Source Code
    10Last post 16y ago

Tags for this Thread

None