Alternative (less effective) multiboxer. Has bugs
This code is for AutoHotKey. This code is less reliable and has some bugs. I did not write this, I found it in a thread in the AHK forums. Credit to User "G. Sperotto" from the AHK forums.
Code:
#MaxThreadsPerHotkey, 1
#MaxThreads, 1000
#SingleInstance, Force
WinGet, RotMGWinId, List, Realm of the Mad God
return
#IfWinActive, Realm of the Mad God
G::Suspend, Toggle
Up::ClonesPush("Up")
Down::ClonesPush("Down")
Left::ClonesPush("Left")
Right::ClonesPush("Right")
w::ClonesPush("W")
S::ClonesPush("S")
A::ClonesPush("A")
D::ClonesPush("D")
Shift::ClonesPush("Shift")
Up up::ClonesPush("Up")
Down up::ClonesPush("Down")
Left up::ClonesPush("Left")
Right up::ClonesPush("Right")
w up::ClonesPush("W")
S up::ClonesPush("S")
A up::ClonesPush("A")
D up::ClonesPush("D")
Shift up::ClonesPush("Shift")
1::
2::
3::
4::
5::
6::
7::
8::
9::
0::
f::
c::
r::
t::
1 up::ClonesPush("1")
2 up::ClonesPush("2")
3 up::ClonesPush("3")
4 up::ClonesPush("4")
5 up::ClonesPush("5")
6 up::ClonesPush("6")
7 up::ClonesPush("7")
8 up::ClonesPush("8")
9 up::ClonesPush("9")
0 up::ClonesPush("0")
f up::ClonesPush("f")
c up::ClonesPush("c")
r up::ClonesPush("r")
t up::ClonesPush("t")
ClonesPush(strKeys)
{
global RotMGWinId1
global RotMGWinId2
global RotMGWinId3
global RotMGWinId4
global RotMGWinId5
CURRENTHK = %A_ThisHotKey%
StringReplace, CURRENTHK, CURRENTHK, %A_Space%up
GetKeyState, CURRENTHKSTATE, %CURRENTHK%, P
If CURRENTHKSTATE = D
{
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId1%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId2%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId3%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId4%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId5%
LASTHKSTATE%CURRENTHK% = DOWN
}
CURRENTHK = %A_ThisHotKey%
Stringreplace, CURRENTHK, CURRENTHK, %A_Space%up
GetKeyState, CURRENTHKSTATE, %CURRENTHK%, P
Tooltip % CURRENTHKSTATE
if CURRENTHKSTATE = U
{
If (LASTHKSTATE%CURRENTHK% = UP OR LASTHKSTATE%CURRENTHK% =)
{
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId1%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId2%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId3%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId4%
ControlSend, , {%strKeys% down}, ahk_id %RotMGWinId5%
}
ControlSend, , {%strKeys% Up}, ahk_id %RotMGWinId1%
ControlSend, , {%strKeys% Up}, ahk_id %RotMGWinId2%
ControlSend, , {%strKeys% Up}, ahk_id %RotMGWinId3%
ControlSend, , {%strKeys% Up}, ahk_id %RotMGWinId4%
ControlSend, , {%strKeys% Up}, ahk_id %RotMGWinId5%
LASTHKSTATE%CURRENTHK% = UP
Sleep -1
}
}
