Risia Ice Games/Swap Instance Script

Instructions for using this script are at Risia Ice Games/Instance swapping.

;set this to the number of instances there are to switch between: Instances := 5 CycleCount := 0 ;set this higher if the lag on your pc makes the switching not work. 2 works ok for me, 10 is probably high enough for anyone (and is the default if we didn't set it here). Lower ms makes switching faster. SetMouseDelay, 4 ;this is the key to use for hotkey. Set this to what key you want to use. See list at http://www.autohotkey.com/docs/KeyList.htm 4:: If CycleCount = 0 ;get menu position. The first press of the hotkey should be with the mouse at the center of the area name box on the minimap {  MouseGetPos, MenuXpos, MenuYpos Ypos1 := MenuYpos + 5 + 14*1 Ypos2 := MenuYpos + 5 + 14*2 Ypos3 := MenuYpos + 5 + 14*3 Ypos4 := MenuYpos + 5 + 14*4 Ypos5 := MenuYpos + 5 + 14*5 Tooltip Stored menu position x%MenuXpos% y%MenuYpos% CycleCount := 1 Return } Tooltip Switching to instance %CycleCount% Send, t MouseClick, left, %MenuXpos%,  %MenuYpos% YposNext := Ypos%CycleCount% MouseClick, left, %MenuXpos%,  %YposNext% Send, t LastInstance := CycleCount LastTime:= A_TickCount If CycleCount = %Instances% CycleCount := 1 Else CycleCount := CycleCount + 1 SetTimer, WaitTip, 1000 Return WaitTip: elapsed_time := A_TickCount - LastTime elapsed_seconds := Floor(elapsed_time/1000) Tooltip Instance %LastInstance%: %elapsed_seconds%s Return
 * 1) IfWinActive ahk_class Turbine Device Class