Press Q to loot and have fun!
Edit: this is now faster and more accurate.
Code:
#NoEnv
#SingleInstance force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetKeyDelay 0
SetMouseDelay 0
SetTitleMatchMode 2
Suspend on
GroupAdd rotmg, Realm of the Mad God
GroupAdd rotmg, realmofthemadgod
GroupAdd rotmg, AGCLoader
GroupAdd rotmg, Play Realm of the Mad God
GroupAdd rotmg, SwiffOutRunner
GroupAdd rotmg, Adobe Flash Player 10
GroupAdd rotmg, Adobe Flash Player 11
GroupAdd rotmg, fla
WinNotActive()
WinActive()
{
Suspend Off
WinWaitNotActive ahk_group rotmg
{
WinNotActive()
}
}
WinNotActive()
{
Suspend on
WinWaitActive ahk_group rotmg
{
WinActive()
}
}
;Auto loot :D
Q::
SendMode Event
MouseGetPos, mousePosX, mousePosY
WinGetPos, , , winSizeX, winSizeY, A
ImageSearch, imageLocX, imageLocY, 0, 0, %winSizeX%, %winSizeY%, img\searchimage.png
imageLocX += 0
imageLocY -= 70
Xinc = 640
Yinc = 635
{
{
MouseMove, imageLocX + Xinc, imageLocY + Yinc
SendEvent {LButton Down}
MouseMove, imageLocX + Xinc + 3, imageLocY + Yinc + 3
Sleep 60
MouseMove, imageLocX + Xinc, imageLocY + Yinc - 30
SendEvent {LButton Up}
Sleep 1
Xinc += 50
}
}
MouseMove, mousePosX, mousePosY
Return
Change the X and Y if you are not using flashplayer
Note: this is not for nexus use. the bots are way faster then this script.