Results 1 to 7 of 7
  1. #1
    Benjamin366's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0

    Red face [HELP]APB Reloaded AFK Bot

    I got an AFK bot for APB Reloaded, it works like a charm, but the window needs to be active.
    My question is: How can i make this AutoIT script to work in background while i'm surfing on the internet or do anything?
    Owner of this code:
    RAWR(:

    Code:
    #RequireAdmin
    
    
    Global $Paused, $WinTitle ='APB Reloaded'
    
    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, @programFilesDir)
    
    		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, 7, 1)))
    		Case 1
    			Send("wwwwwwwww")
    		Case 2
    			Send("dddddddd")
    		Case 3
    			Send("aaaaaaa")
    		Case 4
    			Send("ssssss")
    		Case 5
    			Send("g")
    		Case 6
    			Send("g")
    		Case 7
    			Send("5")
    	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(4000)
    			Send("/unstick")
    			Sleep(1000)
    			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

  2. #2
    BORATownage's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    70
    Reputation
    15
    Thanks
    7
    My Mood
    Psychedelic
    I don't think you will be able to as it is a script which means it controls the mouse for you. however the only way i think you will be able to surf the net at the same time is if someone made a program do it using high level languages. But i am not an expert.

    thanks,
    BORATownage

  3. #3
    replaytaco's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    What is the bot?

  4. #4
    RAWR(:'s Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    South Texas
    Posts
    430
    Reputation
    14
    Thanks
    236
    My Mood
    In Love
    @Benjamin366

    You can't. It's impossible with any kind of language as far as I am aware. There might be a way but it would take me a while to figure it out. :/

  5. #5
    acik03's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Mellow
    how would you use this?

  6. #6
    RAWR(:'s Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    South Texas
    Posts
    430
    Reputation
    14
    Thanks
    236
    My Mood
    In Love
    Download autoit and compile it.

  7. #7
    Snowrly's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    Netherlands
    Posts
    146
    Reputation
    10
    Thanks
    7
    My Mood
    Angelic
    can someone tell me how this works with this source codes where do i need to paste it and what i need to do

Similar Threads

  1. [HELP][Source Code] APB Reloaded AFK Bot
    By Benjamin366 in forum All Points Bulletin Reloaded Hacks
    Replies: 4
    Last Post: 02-01-2013, 06:13 PM
  2. [help] APB Reloaded Frustration
    By solarairhead in forum All Points Bulletin Reloaded Hacks
    Replies: 2
    Last Post: 07-01-2012, 03:15 PM
  3. [Help Request] AFK Bot [help]
    By fet in forum Combat Arms Help
    Replies: 7
    Last Post: 04-28-2011, 03:17 AM
  4. AFK bot SETUP HELP
    By lucacis779 in forum Combat Arms Help
    Replies: 2
    Last Post: 01-13-2010, 02:44 PM
  5. Help Me Update my AFK Bot
    By User1 in forum Combat Arms Discussions
    Replies: 2
    Last Post: 12-20-2009, 07:18 PM