This is a simple, dirty, quick, helpful AutoIt script that I wrote after I spent a couple of irritating hours switching between windows over and over in order to loot quest items while dual boxing an RAF account.
This script allows you to make the secondary character cast spells, target party members, follow you, and loot mobs easily, and without switching between windows.
It uses keys that WoW users would not, I believe, generally use during normal lowbie gameplay.
- Pro's:
- Completely within Blizzard's EULA and ToS. All actions performed require real physical input before they are executed by any player character in the game. I did not make a bot, I simply made it easier to quest and group while dual-boxing bymaking the otherwise unused Numpad have use.
- Requires minimum set-up, and uses native WoW methods to perform actions, meaning it's reliable and fast.
- Con's:
- Doesn't use the mouse, so no handling of quests and vendors for the secondary toon.
- Quick dirty scripting. Also, written in AutoIt... yuck.
- Currently assumes that it's users are using the default keybinds, and comes with no GUI or even a quick way of changing them.
- Requires too much setup for my taste. I plan on streamlining this if I ever reach a point of wanting to put time in this.
- The Numpad and the six buttons above the arrow keys become unusable while the script is running. This is due to the way AutoIt handles hotkeys.
Set-up:
If you're still interested at this point, then the set-up is very simple.
- You need to assign the keybind in-game for "Interact With Target" to Tilde.
- Assigning a keybind is done through the in-game Keybindings window.
- Open your main menu while in-game by pressing Esc, then press the Keybindings button.
- Once in that window, you'll need to find the action "Interact With Target".
- Click the first red button next to "Interact With Target," and press the Tilde key.
- Tilde is found above the Tab key, and to the left of the 1 key. It looks like this: `
- You'll also need to enable Click-to-Move. Click-to-Move is enabled through the Interface options. It is under the "Mouse" category. Simply place a check in the box labeled "Click-to-Move" and you're good to go.
- After those two in-game steps are taken, start the script, press the Insert key, and follow the instructions given by the message boxes. The last box will ask for the main character name. This needs to be the name of the primary character, entered EXACTLY. It is used for targetting and following, both of which are important. The program setup will need to be repeated every time you start new clients of World of Warcraft, or if you alter video settings during gameplay.
The used keys are as follows:
- Insert: Used to name the WoW windows so that the script can easily distinguish between them, as well as let the script know the name of the primary character (used for following and targetting).
- Delete: Used to target the primary character. Not much use for this, but it's there since the functionality is needed anyways.
- Home: Used to make the secondary character follow the primary. The characters must be close enough for the /follow command to take effect, since this is a simple script that uses no movement or AI of it's own.
- Page Up: Used to make the secondary character "assist" it's current target.
- End: Used to make the secondary character "interact" with the primary character's current target. Not of much use, but again, hotkeyed since the functionality exists for other things.
- Page Down: Used to make the secondary character loot every on the primary character's current target.
- Numpad 0-9, -: Used to make the secondary character cast the spell on the corresponding slot of the current action bar.
- Numpad +: Used to make the secondary character cast the spell on the = slot of the current action bar. No = key is available on the numpad, and the + seems to be the most appropriate substitute.
- Alt + Numpad 1-5: Used to make the secondary character target the corresponding party member. Alt + Numpad 1 will target itself, 2 will target the first party member, etc. If you can use the F1-F5 keys on the primary character, then you understand how this works.
If there is an interest in this, I'd definitely look into improving it, either myself or through contributions of others. Anyone wanting to contribute will be welcomed, and credited graciously.
I understand completely if anyone wishes to rip this script to shreds. It's ugly and foul. It's merely a quick solution (about 20-30 minutes) to the problems I was having. It fits my needs, it may not do so for you. I'm open to criticism, but not flaming.
I also understand if you have a problem with AutoIt, I do too, but this was merely a quick fix, and was never really intended to be published. My language of choice is C++, but this would take a lot longer to code in C++ than the little demon they call AutoIt. AutoIt has it's areas of expertise.
That being said, if it reaches a point where there is a real interest in this, I may consider making the jump to C++ and coding something far more powerful.
So, without further ado:
EDIT: I should really have posted the script, too.Code:HotKeySet("{INSERT}", "DoWindowSetup") HotKeySet("{HOME}", "DoFollow") HotKeySet("{PGUP}", "DoAssist") HotKeySet("{END}", "DoInteract") HotKeySet("{PGDN}", "DoLoot") HotKeySet("{DELETE}", "DoTargetMain") ; Bar control. HotKeySet("{NUMPAD1}", "CallBar1") HotKeySet("{NUMPAD2}", "CallBar2") HotKeySet("{NUMPAD3}", "CallBar3") HotKeySet("{NUMPAD4}", "CallBar4") HotKeySet("{NUMPAD5}", "CallBar5") HotKeySet("{NUMPAD6}", "CallBar6") HotKeySet("{NUMPAD7}", "CallBar7") HotKeySet("{NUMPAD8}", "CallBar8") HotKeySet("{NUMPAD9}", "CallBar9") HotKeySet("{NUMPAD0}", "CallBar0") HotKeySet("{NUMPADSUB}", "CallBarDash") HotKeySet("{NUMPADADD}", "CallBarEquals") ; Party Targetting HotKeySet("!{NUMPAD1}", "TargetParty1") HotKeySet("!{NUMPAD2}", "TargetParty2") HotKeySet("!{NUMPAD3}", "TargetParty3") HotKeySet("!{NUMPAD4}", "TargetParty4") HotKeySet("!{NUMPAD5}", "TargetParty5") $MAINCHARNAME = "Rexxar" AutoItSetOption("SendKeyDelay", 50) ; Main loop While True Sleep(100) WEnd Func DoWindowSetup() MsgBox(0, "Setup", "Activate the window for the main toon now.") WinWaitActive("World of Warcraft") WinSetTitle("World of Warcraft", "", "World of Warcraft [Main]") WinSetState("World of Warcraft [Main]", "", @SW_MINIMIZE) MsgBox(0, "Setup", "Activate the window for the RAF toon now.") WinWaitActive("World of Warcraft") WinSetTitle("World of Warcraft", "", "World of Warcraft [RAF]") WinSetState("World of Warcraft [RAF]", "", @SW_MINIMIZE) $MAINCHARNAME = InputBox("Setup", "Enter main toon name.") MsgBox(0, "Setup", "Setup complete.") EndFunc Func DoFollow() If CanRun() Then ; DoTargetMain() Sleep(500) ControlSend("World of Warcraft [RAF]", "", "", "{ENTER}") Sleep(300) ControlSend("World of Warcraft [RAF]", "", "", "/follow " & $MAINCHARNAME) Sleep(300) ControlSend("World of Warcraft [RAF]", "", "", "{ENTER}") EndIf EndFunc Func DoTargetMain() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "{ENTER}") Sleep(300) ControlSend("World of Warcraft [RAF]", "", "", "/tar " & $MAINCHARNAME) Sleep(300) ControlSend("World of Warcraft [RAF]", "", "", "{ENTER}") EndIf EndFunc Func DoAssist() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "f") EndIf EndFunc Func DoInteract() If CanRun() Then DoTargetMain() Sleep(200) DoAssist() Sleep(200) ControlSend("World of Warcraft [RAF]", "", "", "`") EndIf EndFunc Func DoLoot() If CanRun() Then DoTargetMain() Sleep(100) DoAssist() Sleep(200) ControlSend("World of Warcraft [RAF]", "", "", "{SHIFTDOWN}`{SHIFTUP}") EndIf EndFunc Func CallBar1() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "1") EndIf EndFunc Func CallBar2() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "2") EndIf EndFunc Func CallBar3() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "3") EndIf EndFunc Func CallBar4() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "4") EndIf EndFunc Func CallBar5() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "5") EndIf EndFunc Func CallBar6() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "6") EndIf EndFunc Func CallBar7() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "7") EndIf EndFunc Func CallBar8() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "8") EndIf EndFunc Func CallBar9() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "9") EndIf EndFunc Func CallBar0() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "0") EndIf EndFunc Func CallBarDash() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "-") EndIf EndFunc Func CallBarEquals() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "=") EndIf EndFunc Func TargetParty1() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "{F1}") EndIf EndFunc Func TargetParty2() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "{F2}") EndIf EndFunc Func TargetParty3() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "{F3}") EndIf EndFunc Func TargetParty4() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "{F4}") EndIf EndFunc Func TargetParty5() If CanRun() Then ControlSend("World of Warcraft [RAF]", "", "", "{F5}") EndIf EndFunc Func CanRun() If Not WinActive("World of Warcraft", "") Then Return False EndIf Return True EndFunc