Log in

View Full Version : FTL with autohotkey



wowphreak
11-20-2008, 11:35 PM
First parts about the macros

I currently 4 box on one computer I have one instance of wow maximized and the others in the background.

I use one button to assist with targeting this makes setting up the other macros fairly straight forward.

I use "mouse down" for follow.

You need an addon to overcome the 255 character limit for macros, I use macaroon
which yeh can get at www.wowinterface.com/downloads/info10636-Macaroon.html

basically created a bar with 2 buttons one bind one to "1" and the other to "-"
then one of the thing yeh should do is go thru and hit Ctrl-shift-1 ... and the same with "-" if when yeh hit the combo and the button on the bar yeh created dosent light up then yeh have something bound to it already. Go into wow key binding and unbind the key.

then added this macro


/assist [mod:ctrl,mod:shift,nomod:alt,target=ghoullar][mod:ctrl,mod:alt,nomod:shift,target=rockor][mod:alt,mod:shift,nomod:ctrl,target=phrellac][mod:ctrl,mod:alt,mod:shift,target=eruapawn]
/startattack

to the "1" button
and


/target [mod:ctrl,mod:shift,nomod:alt,target=ghoullar][mod:ctrl,mod:alt,nomod:shift,target=rockor][mod:alt,mod:shift,nomod:ctrl,target=phrellac][mod:ctrl,mod:alt,mod:shift,target=eruapawn]
/follow

to the "-" button

you need to change the names for the target to yer char names to correspond to the names in the ahk file
as in group1 needs to be the same as the first target group2 needs to be the same as the second target ...

instead of going to each instance and doing this here a simpler way www.dual-boxing.com/forums/index.php?page=Thread&postID=144332#post144332

if yeh have a fifth char yeh need to add [mod:ctrl,nomod:alt,nomod:shift,target=?????]

make sure yeh change group into how many char yer playing and change group1, group2 ... correspond to the macros

the way this works is yeh load all yer instance of wow load yer char.
Then run the ahk file it'll show yeh how many it found and then go thru each one asking yeh to match the name to the instance of wow yes/no question
once that is done it'll go thru each one again and the name should match with the instance of wow showing.

This will work with 2 to how ever many wow's yeh can load if yer loading more then five yeh need to add more group and ftlkeycombos



#SingleInstance,Force

group=4 ; the number of people in yer group
group1:="ghoullar"
group2:="rockor"
group3:="phrellac"
group4:="eruapawn"
group5:="???????"

ftlkeycombo:=winpid
ftlkeycombod1:="{Ctrl down}{Shift down}" ;Ctrl-Shift
ftlkeycombou1:="{Ctrl up}{Shift up}" ;

ftlkeycombod2:="{Ctrl down}{alt down}" ;Ctrl-alt
ftlkeycombou2:="{Ctrl up}{alt up}" ;

ftlkeycombod3:="{alt down}{Shift down}" ;Alt-Shift
ftlkeycombou3:="{alt up}{Shift up}" ;

ftlkeycombod4:="{Ctrl down}{alt down}{Shift down}" ;Ctrl-Alt-Shift
ftlkeycombou4:="{Ctrl up}{alt up}{Shift up}" ;

ftlkeycombod5:="{Ctrl down}" ;Ctrl
ftlkeycombou5:="{Ctrl up}" ;

clonepush(strkey)
{
global winid
Loop %winid%
{
tmp:=winid%A_Index%
IfWinNotActive, ahk_id %tmp%
ControlSend, ,%strkey%, ahk_id %tmp%
}
}

ftl(skey)
{
global winid
loop %winid%
{
ifwinactive % "Ahk_ID " winid%A_Index%
{
tmp1:=ftlkeycombod%a_index%
tmp2:=ftlkeycombou%a_index%
tmp=%tmp1%%skey%%tmp2%
clonepush(tmp)
}
}
}

;********* load game ***********************
WinGet, wintmp, List,World of Warcraft
WinMinimizeAll
msgbox %wintmp%
winid=%wintmp%
loop %wintmp%
{
groupnum=%a_index%
loop %wintmp%
{
if wintmp%a_index%
{
WinMaximize % "ahk_id" wintmp%a_index%
MsgBox, 4, , % group%groupnum%
IfMsgBox YES
{
winid%groupnum%:=wintmp%a_index%
WinMinimize % "ahk_id" wintmp%a_index%
wintmp%a_index%=0
break
}
WinMinimize % "ahk_id" wintmp%a_index%
}
}
}

loop %group%
{
WinMaximize % "ahk_id" winid%a_index%
msgbox % group%a_index%
winrestore % "ahk_id" winid%a_index%
}

;******** this part for all the keys ************

; use this to follow
~WheelDown::ftl("{- down}{- up}")

; this accepts quest/invites ...
~p::clonepush("{p down}{p up}")

; used for mount up
~[::clonepush("{[ down}{[ up}")

; used for canceling spells
~Space::clonepush("{Space down}{Space up}")

; *******************
; *** Hotbars 1-0 ***
; *******************
~1::ftl("{1 down}{1 up}")
~2::clonepush("{2 down}{2 up}")
~3::clonepush("{3 down}{3 up}")
~4::clonepush("{4 down}{4 up}")
~5::clonepush("{5 down}{5 up}")
~6::clonepush("{6 down}{6 up}")
~7::clonepush("{7 down}{7 up}")
~8::clonepush("{8 down}{8 up}")
~9::clonepush("{9 down}{9 up}")
~0::clonepush("{0 down}{0 up}")
~-::clonepush("{- down}{- up}")
~=::clonepush("{= down}{= up}")

; ***************************
; *** Hotbars Shift ^ 1-0 ***
; ***************************
~+1::clonepush("{Shift down}{1 down}{1 up}{Shift up}")
~+2::clonepush("{Shift down}{2 down}{2 up}{Shift up}")
~+3::clonepush("{Shift down}{3 down}{3 up}{Shift up}")
~+4::clonepush("{Shift down}{4 down}{4 up}{Shift up}")
~+5::clonepush("{Shift down}{5 down}{5 up}{Shift up}")
~+6::clonepush("{Shift down}{6 down}{6 up}{Shift up}")
~+7::clonepush("{Shift down}{7 down}{7 up}{Shift up}")
~+8::clonepush("{Shift down}{8 down}{8 up}{Shift up}")
~+9::clonepush("{Shift down}{9 down}{9 up}{Shift up}")
~+0::clonepush("{Shift down}{0 down}{0 up}{Shift up}")

; **************************
; *** Hotbars Cntl ^ 1-0 ***
; **************************
~^1::clonepush("{Ctrl down}{1 down}{1 up}{Ctrl up}")
~^2::clonepush("{Ctrl down}{2 down}{2 up}{Ctrl up}")
~^3::clonepush("{Ctrl down}{3 down}{3 up}{Ctrl up}")
~^4::clonepush("{Ctrl down}{4 down}{4 up}{Ctrl up}")
~^5::clonepush("{Ctrl down}{5 down}{5 up}{Ctrl up}")
~^6::clonepush("{Ctrl down}{6 down}{6 up}{Ctrl up}")
~^7::clonepush("{Ctrl down}{7 down}{7 up}{Ctrl up}")
~^8::clonepush("{Ctrl down}{8 down}{8 up}{Ctrl up}")
~^9::clonepush("{Ctrl down}{9 down}{9 up}{Ctrl up}")
~^0::clonepush("{Ctrl down}{0 down}{0 up}{Ctrl up}")

; **************************
; *** Hotbars alt ! 1-0 ***
; **************************
~!1::clonepush("{alt down}{1 down}{1 up}{alt up}")
~!2::clonepush("{alt down}{2 down}{2 up}{alt up}")
~!3::clonepush("{alt down}{3 down}{3 up}{alt up}")
~!4::clonepush("{alt down}{4 down}{4 up}{alt up}")
~!5::clonepush("{alt down}{5 down}{5 up}{alt up}")
~!6::clonepush("{alt down}{6 down}{6 up}{alt up}")
~!7::clonepush("{alt down}{7 down}{7 up}{alt up}")
~!8::clonepush("{alt down}{8 down}{8 up}{alt up}")
~!9::clonepush("{alt down}{9 down}{9 up}{alt up}")
~!0::clonepush("{alt down}{0 down}{0 up}{alt up}")

olipcs
11-21-2008, 07:43 AM
Great! I added the news to the ftl-wiki. (although, i don't realy understand the script, but this has more to do with me never have used ahk).