Log in

View Full Version : [WoW] FTL setup, follow works, but spells



ethos42
11-07-2009, 03:19 AM
I'm implementing the FTL setup, this is what I have so far:

My setup will allow me to open Warcraft with a 3 key combo, initiating a startup sequence that opens 3 instances of Wow, renames them, Logs into each toon, then resizes and repositions the windows to my desired location.

I can cycle through the toons using the F1-F3 keys (easily expandable to 5 toons), and in each toon I can get each of the other toons to follow the current window by pressing "H"

However, I cannot get the attack Macro to work for all toons. It only works when I am on toon2. On the other toons, they will cast their own spell, but the other toons just sit there. If I open a command line in their windows, I can see that the "2" is being passed.

I deleted my WTF folder and reset my keybindings to their defaults.

Now, all of them will still follow each other, but none of them will attack.

Here's my HKN (HotKeyNet) Script:
(I have not cleaned it up much yet, it's mostly a copy/paste mish-mash of samples)



//----------------------------------------------------------------
// Setup some labels to the windows so we can send commands to them
<Label w1 Local SendWinM wow1>
<Label w2 Local SendWinM wow2>
<Label w3 Local SendWinM wow3>
<label win1 local SendWinM wow1>
<label win2 local SendWinM wow2>
<label win3 local SendWinM wow3>
<label mwin1 local SendWinS wow1>
<label mwin2 local SendWinS wow2>
<label mwin3 local SendWinS wow3>
<label current local SendFocusWin>

//----------------------------------------------------------------
// Resize and position the windows
<Command SetPip>
<TargetWin %3%>
<SetWinSize 840 525>
<SetWinPos -1680 0>
<AlwaysOnTop on>
<TargetWin %2%>
<SetWinSize 840 525>
<SetWinPos -1680 525>
<AlwaysOnTop on>
<TargetWin %1%>
<SetWinPos -840 0>
<SetWinSize 2760 1080>
<AlwaysOnTop off>

//----------------------------------------------------------------
// Turn HotKeyNet on/off!
<Hotkey Pause>
<ToggleHotkeys>
<DisplayVars>
<SendPC local>
<Cancel>

//----------------------------------------------------------------
// Subroutine starts WoW and logs in
<Command WoWStart>
<Run %1%>
<WaitForWin "World of Warcraft" 20000>
<WaitForWinEnabled 20000><wait 2000>
<SetFocusWin>
<SendWinSF "World of Warcraft">
<Key Backspace><wait 500>
<SendWin "World of Warcraft">
<Text %3%><wait 100><Key tab><wait 100><Text %4%><wait 100><Key Enter><wait 500>
<RenameWin "World of Warcraft" %2%>
<WaitForWin %2% 20000>
//----------------------------------------------------------------
// Pressing ctrl+alt+w will launch and log into the toons below.
// TODO: Add support for solo, 3box, 5box
<Hotkey ctrl alt w>
<SendPC local>
<if WinDoesNotExist wow1>
<WoWStart "C:\Users\Public\Games\World of Warcraft\wow.exe" wow1 Toon1 PassWord>
<endif>
<if WinDoesNotExist wow2>
<WoWStart "C:\Users\Public\Games\World of Warcraft\wow.exe" wow2 Toon2 PassWord>
<endif>
<if WinDoesNotExist wow3>
<WoWStart "C:\Users\Public\Games\World of Warcraft\wow.exe" wow3 Toon3 PassWord>
<endif>
<wait 2000>
<SetPip wow1 wow2 wow3>

//----------------------------------------------------------------
// Cycle through windows with the F1-F3 keys
<Hotkey F1>
<SetPip wow1 wow2 wow3>
<Hotkey F2>
<SetPip wow2 wow1 wow3>
<Hotkey F3>
<SetPip wow3 wow1 wow2>
//----------------------------------------------------------------
// BEGIN: FTL Engine(Focusless Leaderless Targetless engine)
//----------------------------------------------------------------
//%1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>
// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>
// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl rshift" wow1 "win2,win3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" wow2 "win1,win3">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" wow3 "win1,win2">
<EndTemplate>

//----------------------------------------------------------------
// FTL Key assignments
// Create a new <ApplyTemplate FTL "x" "y">
// x = Key pressed in the current window
// y = Key to be sent to background windows.
//----------------------------------------------------------------
<ApplyTemplate FTL "2" "2">
<ApplyTemplate FTL "h" "h">


As for in game macros, I have the following:

Follow Macro bound to H (this one works every time)


/stopmacro [nomod]
/target [mod:rctrl,mod:rshift,nomod:ralt,target=Wylam][mod:rctrl,mod:ralt,nomod:rshift,target=Wÿlam][mod:ralt,mod:rshift,nomod:rctrl,target=Wýlam]
/follow
/targetlasttarget


My Assist Macro, sitting on Bartender4 button 47 (BT4Button47)


/stopmacro [nomod]
/assist [mod:rctrl,mod:rshift,nomod:ralt,target=Wylam][mod:rctrl,mod:ralt,nomod:rshift,target=Wÿlam][mod:ralt,mod:rshift,nomod:rctrl,target=Wýlam]

Ligtning bolt macro, Keybound to "2"


/click BT4Button47
/cast Lightning Bolt


This is setup the same on all 3 toons.

I've also tried binding "2" to the actual spell, and to a macro that would just put out /say test1, /say test2, /say test3. It's like the button is not being triggered.

Any suggestions on how to debug this and see what's going on?

Here's the log from HotKeyNet


From this pc: <SendFocusWin><Key h><SendWinM wow2><Key rctrl rshift h><SendWinM wow3><Key rctrl rshift h>
<SendFocusWin> completed
<Key h> completed
<SendWinM wow2> completed: Window found. Target set to 0x80670 "wow2"
<Key rctrl rshift h> completed
<SendWinM wow3> completed: Window found. Target set to 0x1302EE "wow3"
<Key rctrl rshift h> completed
From this pc: <SendFocusWin><Key 2><SendWinM wow2><Key rctrl rshift 2><SendWinM wow3><Key rctrl rshift 2>
<SendFocusWin> completed
<Key 2> completed
<SendWinM wow2> completed: Window found. Target set to 0x80670 "wow2"
<Key rctrl rshift 2> completed
<SendWinM wow3> completed: Window found. Target set to 0x1302EE "wow3"
<Key rctrl rshift 2> completed

olipcs
11-07-2009, 05:36 AM
hi, your macros and templates look fine!

So I would guess that the reason, why this isn't working is, that another action is bound to 'shift +2'. Are you absolutly sure, that this isn't the case ?

I would guess, that 'ctrl +2' and 'alt +2' are actualy unbound, which would explain, why its working for the second window, but not the first and third.
You can also test this, by not using shift as a modifier, but the following:
WoW1 = rctrl
WoW2 = rctrl + ralt
WoW3 = ralt
(but delting the keybound for shift would be easier)

ethos42
11-07-2009, 05:56 AM
I thought the same thing.

So I disabled all of my addon's and reset my keybindings. and then they all broke :)

I did notice that it only happens with numbers. I've tried binding all of h, j, k, l and they all work. but 0-9 do not.

olipcs
11-07-2009, 06:28 AM
Well, what did you mean with:"reset my keybindings"?
-Do you mean that you reset them through the keybinding interface?
-If so, I think shift+2 is bound to something by default, so you would need to erase the keybinding manually.

olipcs
11-07-2009, 06:32 AM
on another thought,m there are script commands for binding/unbinding buttons,
so you might try to run:


/script SetBindingSpell("Shift-2")
/script SetBindingMacro("Shift-2")
/script SaveBindings(GetCurrentBindingSet())

ethos42
11-07-2009, 02:18 PM
olipcs you did it again.

It was key bindings. After resetting the in game keybindings to their default, there are several modified number keys bound (ctrl+# and shift+#)

Removed those, and everything is working as expected :)

I've also upgraded my team from a 3 man to a 5 man, Thanks for all of your help in this post and the others. I've been working on this for a couple of days and have probably read every single one of your posts about FTL :) I especially liked the thread between you and Freddie when you were conceptualizing the system.