Anti-AFK AutoHotKey Script of Ridiculous Length

Komera Waddi
Posts: 2
Joined: Wed May 05, 2021 9:37 pm

Anti-AFK AutoHotKey Script of Ridiculous Length

Unread post by Komera Waddi » Wed May 05, 2021 11:01 pm

The Story:
Way back in WotLK, I camped the TLPD for three weeks, entertaining myself with the Bejeweled addon. However, the addon no longer worked when it was time to camp Aeonaxx* in Cataclysm. After much rummaging through sites devoted to camping rares, I found the original AHK script and a copy/paste of a blue post to prove that anti-afk scripts were okay. I did once get on Blizzard's bad side (I used an actual bot to help me play because my wrist was messed up), but never once for using an anti-afk script.

*=Camped it for three months before it showed up in the spot I was hanging out in.

But... I'm paranoid. So I randomized the wait period between two numbers. But even that was a little too machine-like. So I made a script that makes it look like I'm tapping out a song. The random window is smaller because people tend to be a bit more accurate when music is involved.

Disclaimer:
Use AHK scripts responsibly. What I'm presenting to you is technically a two button spam script, but since the variables are both "0", it'll act like a single button spam unless you actually edit it.

Instructions:
The two variables at the top of the script (myButton1 and myButton2) are what AHK will be sending to the game. Edit their values to whatever action bar button you've got your anti-afk macro(s) in.
Caps Lock will pause/unpause the script.
The anti-afk macro plays the Headless Horseman's laugh when Skoll (edit with the name of whatever mob you're camping) appears. Yes, NPCScan and SilverDragon also play sound when a rare shows up, but this macro will keep hitting the sound VERY annoyingly, which I will hear from anywhere in the house. The sound that's played can also be edited... or removed if you please.

The Anti-AFK Macro:

Code: Select all

/cleartarget
/target Skoll
/stopmacro [noexists]
/script PlaySound(11975)
The AHK Script... The "Help Me, Rhonda" Edition (lyrics included as comments):

Code: Select all

#IfWinActive, World of Warcraft
    myButton1 := "0"
    myButton2 := "0"
    Random, ranQuarter, 498, 502 ; quarter note
    Random, ranEighth, 248, 252 ; eighth note
    Random, ranSixteenth, 123, 127 ; sixteenth note
    Random, ranTriplets, 164, 168 ; triplet notes

Loop
{
    Loop, 4 ; Introduction (Al) "Well..."
    {
        Gosub, Label1
    }
    Loop, 2 ; "...since she put me..."
    {
        Gosub, Label2
    }
    ControlSend,,%myButton2%,World of Warcraft ; "...down..."
    sleep %ranQuarter%
    Gosub, Label5 ; "...I've been..."
    ControlSend,,%myButton1%,World of Warcraft ; "...out..."
    sleep %ranQuarter%
    Gosub, Label5 ; "...doin'..."
    ControlSend,,%myButton1%,World of Warcraft ; "...in..."
    sleep %ranEighth%
    ControlSend,,%myButton1%,World of Warcraft ; "...my..."
    sleep %ranQuarter%
    sleep %ranEighth%
    Loop, 2 ; "...head." Bridge "I come..."
    {
        Gosub, Label1
    }
    Gosub, Label5 ; "...in late..."
    ControlSend,,%myButton2%,World of Warcraft ; "...at..."
    sleep %ranEighth%
    ControlSend,,%myButton1%,World of Warcraft ; "...night..."
    sleep %ranSixteenth%
    sleep %ranEighth%
    ControlSend,,%myButton1%,World of Warcraft ; "...and..."
    sleep %ranSixteenth%
    Gosub, Label2
    Gosub, Label3
    Loop, 2 ; "She was..."
    {
        Gosub, Label1
    }
    Loop, 3 ; "...gonna be my wife/woman..."
    {
        Gosub, Label5
    }
    ControlSend,,%myButton1%,World of Warcraft ; "...and..."
    sleep %ranQuarter%
    Loop, 2 ; "I was gonna..."
    {
        Gosub, Label5
    }
    ControlSend,,%myButton1%,World of Warcraft ; "...be..."
    sleep %ranEighth%
    ControlSend,,%myButton1%,World of Warcraft ; "...her..."
    sleep %ranQuarter%
    Loop, 2 ; "...man." Bridge "But she..."
    {
        Gosub, Label1
    }
    Loop, 2 ; "...let another..."
    {
        Gosub, Label5
    }
    ControlSend,,%myButton2%,World of Warcraft ; "...guy..."
    sleep %ranQuarter%
    Gosub, Label2
    Gosub, Label3
    Gosub, Label3
}
return

Label1:
    Gosub, Label4
    Gosub, Label5
    Gosub, Label5
    Gosub, Label5
return

Label2:
    Loop, 3 ; "...in the mornin' I just..." / "come between us and it..."
    {
        Gosub, Label5
    }
        ControlSend,,%myButton%,World of Warcraft ; "...lay..." / "...ruined/shattered..."
        sleep %ranEighth%
        ControlSend,,%myButton%,World of Warcraft ; "...in..." / "...our..."
        sleep %ranQuarter%
        sleep %ranEighth%
    Loop, 2 ; "...bed." / "...plans." Bridge
    {
        Gosub, Label1
    }
    Loop, 2 ; "Rhonda, you look..." / "Rhonda, you caught..."
    {
        Gosub, Label5
    }
        sleep %ranQuarter%
    Loop, 3 ; (Al) "...so fine,..." (Stack) "Look so fine!" / (Al) "...my eye,..." (Stack) "Caught my eye!"
    {
        ControlSend,,%myButton1%,World of Warcraft
        sleep %ranQuarter%
    }
        sleep %ranEighth%
        ControlSend,,%myButton2%,World of Warcraft ; "...and..." / "...and..."
        sleep %ranQuarter%
        ControlSend,,%myButton1%,World of Warcraft ; "...I..." / "...I'll..."
        sleep %ranEighth%
    Loop, 2 ; "...know it wouldn't..." / "...give you lots of..."
    {
        Gosub, Label5
    }
    Loop, 4 ; "...take much time..." / "...reasons why..."
    {
        ControlSend,,%myButton1%,World of Warcraft
        sleep %ranQuarter%
    }
    Loop, 2 ; *pause* "...for you to..." / "...you gotta..."
    {
        Gosub, Label5
    }
        sleep %ranEighth%
        ControlSend,,%myButton2%,World of Warcraft ; "...help..."
        sleep %ranQuarter%
        ControlSend,,%myButton1%,World of Warcraft ; "...me,..."
        sleep %ranEighth%
    Loop, 2 ; "...Rhonda."
    {
        ControlSend,,%myButton%,World of Warcraft
        sleep %ranQuarter%
    }
    Loop, 4 ; "Help me get her out of my heart!"
    {
        Gosub, Label5
    }
return

Label3:
    Loop, 7
    {
        ControlSend,,%myButton1%,World of Warcraft
        sleep %ranQuarter%
    }
    Loop, 6 ; *lyric breakup below*
    {
            Gosub, Label5 ; (Mike) "Help me,..."
            ControlSend,,%myButton1%,World of Warcraft ; (Mike) "...Rhon-"
            sleep %ranEighth%
            ControlSend,,%myButton2%,World of Warcraft ; (Stack) "Help..."
            sleep %ranQuarter%
            ControlSend,,%myButton1%,World of Warcraft ; (Stack) "...me,..."
            sleep %ranEighth%
        Loop, 2 ; (Mike) "Rhon-" (Stack) "...Rhonda!"
        {
            ControlSend,,%myButton1%,World of Warcraft
            sleep %ranQuarter%
        }
        Loop, 2 ; (Mike) "Rhon- Rhon-" (Stack) "Help, help me, Rhon-"
        {
            ControlSend,,%myButton1%,World of Warcraft
            sleep %ranEighth%
            ControlSend,,%myButton1%,World of Warcraft
            sleep %ranQuarter%
        }
    }
    Loop, 4 ; (Stack) "...da!"  (Everyone) "Help me, Rhonda! YEAH!"
    {
        ControlSend,,%myButton1%,World of Warcraft
        sleep %ranQuarter%
    }
    Loop, 3 ; (Al) "Get her out of my heart!"
    {
        Gosub, Label5
    }
return


Label4:
        Loop, 3
        {
            ControlSend,,%myButton1%,World of Warcraft
            sleep %ranTriplets%
        }
return

Label5:
        ControlSend,,%myButton1%,World of Warcraft
        sleep %ranEighth%
        sleep %ranSixteenth%
        ControlSend,,%myButton1%,World of Warcraft
        sleep %ranSixteenth%
return

Capslock::
Suspend
Pause,,1
return
Two buttons because I now have Rheumatoid Arthritis.
And "Help Me, Rhonda" was my earworm when I wrote this.

EDIT 1: Edited the comments on the Quarter/Eighth/Sixteenth/Triplet notes.
EDIT 2: Blizzard changed the sound command AGAIN??? Ugh... *quickly looks up the new syntax* There. Fixed.

Post Reply