Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0
- ; BCWO Afk Farm Script
- ; Made By McScrottie
- ; Global variables to track script state
- isRunning := false
- ; Create GUI
- MyGui := Gui()
- MyGui.BackColor := "EEAA99"
- MyGui.Opt("+AlwaysOnTop -Caption +ToolWindow") ; Make overlay always on top and borderless
- ; Create text for overlay
- statusText := MyGui.Add("Text", "x10 y10 w200", "BCWO Afk Farm`nMade By McScrottie`nJ: Stop/Start`nK: Terminate`nStatus: Stopped")
- statusText.SetFont("s10")
- ; Position GUI at middle-right of screen
- MyGui.Show("x" . (A_ScreenWidth - 220) . " y" . (A_ScreenHeight // 2 - 100) . " w210 h150")
- ; Hotkey to toggle script on/off
- J::
- {
- isRunning := !isRunning
- if (isRunning) {
- statusText.Value := "BCWO Afk Farm`nMade By McScrottie`nJ: Stop/Start`nK: Terminate`nStatus: Running"
- SetTimer(PressKeys1234, 5000)
- SetTimer(Press5C, 136000)
- SetTimer(PressF, 30000)
- SetTimer(RandomMovement, 1000)
- }
- else {
- statusText.Value := "BCWO Afk Farm`nMade By McScrottie`nJ: Stop/Start`nK: Terminate`nStatus: Stopped"
- SetTimer(PressKeys1234, 0)
- SetTimer(Press5C, 0)
- SetTimer(PressF, 0)
- SetTimer(RandomMovement, 0)
- }
- }
- ; Hotkey to terminate script
- K::ExitApp()
- ; Functions for key sequences
- PressKeys1234() {
- if (!isRunning)
- return
- Send("1")
- Click()
- Sleep(100)
- Send("2")
- Click()
- Sleep(100)
- Send("3")
- Click()
- Sleep(100)
- Send("4")
- Click()
- }
- Press5C() {
- if (!isRunning)
- return
- Send("5")
- Sleep(50)
- Send("c")
- }
- PressF() {
- if (!isRunning)
- return
- Send("f")
- }
- RandomMovement() {
- if (!isRunning)
- return
- movements := ["w", "a", "s", "d"]
- randomMove := movements[Random(1, movements.Length)]
- Send(randomMove)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement