Code:
#NoEnv
#SingleInstance force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetKeyDelay 0
SetMouseDelay 0
SetTitleMatchMode 2
Suspend on
GroupAdd rotmg, Adobe Flash Player 11
GroupAdd rotmg, Realm of the Mad God
WinNotActive()
WinActive()
{
Suspend Off
WinWaitNotActive ahk_group rotmg
{
WinNotActive()
}
}
WinNotActive()
{
Suspend on
WinWaitActive ahk_group rotmg
{
WinActive()
}
}
; sends rclick when ctrl+rclick is sent to get the flash context menu
^+RButton::
Click right
return
; Switch items in you inv!
Left::
slot = 1 ;;;;; CHANGE TO YOUR WEAPON SWAP INVENTORY SLOT
goto swap
Down::
slot = 2 ;;;;; CHANGE TO YOUR ABILITY SWAP INVENTORY SLOT
goto swap
swap:
MouseGetPos, mousePosX, mousePosY
WinGetPos, , , winSizeX, winSizeY, A
SysGet, menuHeight, 15
SysGet, vBorderWidth, 32
SysGet, hBorderWidth, 33
SysGet, titleHeight, 4
ImageSearch, imageLocX, imageLocY, %winSizeX%/2, %winSizeY%/2, %winSizeX%, %winSizeY%, img\inv-low.png
if ErrorLevel {
ImageSearch, imageLocX, imageLocY, %winSizeX%/2, %winSizeY%/2, %winSizeX%, %winSizeY%, img\inv-high.png
if ErrorLevel {
ImageSearch, imageLocX, imageLocY, %winSizeX%/2, %winSizeY%/2, %winSizeX%, %winSizeY%, img\inv-med.png
if ErrorLevel {
stretched := true
}
}
}
if(stretched){
posX := 634 + Mod((44 * (slot-1)), (4*44))
posY := 400 + (44 * ((slot-1)//(4)))
multiplierX := ((winSizeX-vBorderWidth)/800)
multiplierY := ((winSizeY-(menuHeight+hBorderWidth+titleHeight))/600)
posX *= multiplierX
posY *= multiplierY
} else {
posX := imageLocX + 30 + Mod((44 * (slot-1)), (4*44)) - vBorderWidth
posY := imageLocY + 50 + (44 * ((slot-1)//(4))) - (menuHeight+hBorderWidth+titleHeight)
}
CoordMode, Mouse, Client
MouseMove, posX, posY
SendEvent {LButton Down}
SendEvent {LButton Up}
SendEvent {LButton Down}
SendEvent {LButton Up}
CoordMode, Mouse, Window
MouseMove, mousePosX, mousePosY
stretched := false
Return
F4::
SendInput, {Enter}/teleport
return
F5::
SendInput, {Enter}He lives and reigns and conquers the world{Enter}
return
F6::
SendInput, {Enter}Ready{Enter}
Return
^p::
clipboard = /pause
goto ek
; set a trading message
F7::InputBox, tradingmsg, Trading message, Enter Your Trading Message!
; send trading message
F8::
if endoftrading = 0
{
clipboard = /yell %tradingmsg%
endoftrading = 1
}
else
{
clipboard = /yell %tradingmsg%
endoftrading = 0
}
goto ek
; sends clipboard to the chat using the tab key
tk:
Blockinput, on
Send {Tab}
Send ^v
Send {Enter}
Blockinput, off
Return
; sends clipboard to the chat using the enter key
ek:
Blockinput, on
Send {Enter}
Send ^v
Send {Enter}
Blockinput, off
Return
;Auto loot V2! FASTER!
RButton::
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}
SendEvent {LButton Up}
SendEvent {LButton Down}
SendEvent {LButton Up}
}
}
MouseMove, mousePosX, mousePosY
Return
;;quality
F9::
Send {Alt}
SendInput {raw}VQL
Return
;(S)elect all when trading
^a::
sleep 1
click 650, 350
Sleep 1
click 650, 390
Sleep 1
Click 690, 350
Sleep 1
Click 690, 390
Sleep 1
Click 730, 350
Sleep 1
Click 730, 390
Sleep 1
Click 770, 350
Sleep 1
Click 770, 390
return
; drop all items in chest(does not work always)
^q::
SendMode Event
MouseGetPos, mousePosX, mousePosY
WinGetPos, , , winSizeX, winSizeY, A
ImageSearch, imageLocX, imageLocY, 0, 0, %winSizeX%, %winSizeY%, img\searchimage.png
imageLocX += 0
imageLocY -= 70
MouseMove, imageLocX, imageLocY
Xinc = 630
Yinc = 510
Loop 2
{
Loop 4
{
MouseMove, imageLocX + Xinc, imageLocY + Yinc
SendEvent {LButton Down}
MouseMove, imageLocX + Xinc + 3, imageLocY + Yinc + 3
Sleep 260
MouseMove, imageLocX + Xinc, imageLocY + Yinc + 125
SendEvent {LButton Up}
Sleep 260
Xinc += 44
}
Xinc = 630
Yinc += 50
}
MouseMove, mousePosX, mousePosY
Return