Since I'm pretty new here, I'm not sure if someone has ever posted a 'BG-joiner / anti-AFK' script like this one, but I certainly hope no one did.
The reason I made this script is because of another post I read in here yesterday: someone made an Automator script which sadly didn't work on my own computer. Even though the script itself is pretty simple at the moment, it actually did take me a few hours to get it right, since I've had no previous experience in AppleScript and also because I tried to fix several issues by an assortment of different tools (Automator, AppleScript, AppleScript add-ons) until I found something that worked for me.
Anyway, here's what I did:
1. Install SSPVP add-on which makes joining BGs A LOT easier: SSPVP @ WowInterface.
2. Make a small macro that binds the secondary mouse button click to the 'j' key. The script has to run once to perform the bind, afterwards you may delete it. I chose to bind it to the 'j' key because I didn't have any use for the key yet and because I think not many people use this key for anything important. The WoW macro to use:
For people who don't understand the above macro: it binds the key 'j' to the 'turn or action' action, thereby making it possible to press 'j' to talk to nearby NPC.Code:/script SetBinding("j", "TURNORACTION"); SaveBindings(GetCurrentBindingSet())
3. Write the AppleScript inside Apple's ScriptEditor: /Applications/AppleScript/ScriptEditor. The script itself is currently very simple, but I intend to make it more complex eventually to get less risk of being caught:
Some remarks on the above code:Code:-- sit inside BG master for this addon to be effective -- zoom in max possible tell application "System Events" -- start WoW, wait 5 seconds before doing anything tell application "World of Warcraft" to activate delay 5 repeat -- talk to BattleMaster using the WoW bind action script, -- which is bound to the 'j' key: keystroke "j" delay (random number from 4 to 10) key code 18 delay (random number from 50 to 75) end repeat end tell
* It seems that letters (a,b,c, etc...) are best 'pressed' by using the keyword 'keystroke'.
* It seems numbers (1,2,3, etc...) and other signs are best 'pressed' by using the keyword 'key code'.
* With the above in mind, what will happen when this script runs, is it will try to talk to the BG master provided one is beneath the mouse pointer, therefore I like to sit inside the BG master. One can imagine this might be a bit harder for a Tauren, but the script could change a little by taking a shrink potion every half hour or so, if required.
* After we're done talking with the BG master there's a short delay. After the delay the button '1' is pressed which is 'key code 18' in AppleScript. For my current char (a shaman) this is a selfbuff called 'Water Shield'. I suggest people try to use selfbuffs on this action, but even the default 'attack' action might work - haven't tried it though.
4. Finally log into WoW and sit inside a BattleMaster for most succes. Keep mouse located into the middle of the WoW screen after you've started the AppleScript.
P.S.: Because of the limitations one can imagine (not being able to use the mouse much when script has started / required to have to WoW game screen in front), it's only useful to run this script when not playing behind WoW. To me this is not a big issue, as I actually like to do PvP whenever I'm able to.