Useful Macros for RotMG


#1

AHK Macros can be extremely useful and are ToS friendly so long as you do not attempt to cheat with them or interact with player chat. In this thread I will be listing a few scripts that you may find beneficial and safe to use. I will also be creating scripts upon request in this thread.


Right Click to use your special ability, Shift Right Click to Right Click

(The code assumes you are using spacebar, but you can change this to whatever key you have bound in your in game options)


#SingleInstance Force

;Main Function
RButton::
SetKeyDelay -1
Send {Blind}{Space DownR}
return

RButton up::
SetKeyDelay -1
Send {Blind}{Space up}
return

;Secondary Function to restore Right Click
+RButton::
SetKeyDelay -1
Send {Blind}{RButton DownR}
return

+RButton up::
SetKeyDelay -1
Send {Blind}{RButton up}
return


Right Click to escape to nexus, Shift Right Click to Right Click
#SingleInstance Force

;Main Function
RButton::
SetKeyDelay -1
Send {Blind}{F5 DownR}
return

RButton up::
SetKeyDelay -1
Send {Blind}{F5 up}
return

;Secondary Function to restore Right Click
+RButton::
SetKeyDelay -1
Send {Blind}{RButton DownR}
return

+RButton up::
SetKeyDelay -1
Send {Blind}{RButton up}
return


Toggle Capslock to use your special ability repeatedly

(The code assumes you are using spacebar, but you can change this to whatever key you have bound in your in game options. Additionally, you may want to disable sounds while using this script. You can adjust the timing in this code to suit your needs)


#SingleInstance Force

;Main Function
~Capslock::
Loop
{
GetKeyState CapsLockState, CapsLock, T
if (CapsLockState = “D”)
{
Send {Space}
Sleep 5000
}
else
{
break
}
}
return


Shift Tab to ignore last PM
#SingleInstance Force

;Main Function
+Tab::
Send {Tab}
Send {Home}
Send {Ctrl down}{Shift down}{Right}{Ctrl up}{Shift up}
Send /ignore{Space}
Send {Enter}
return


Shift Escape to close the script
+Esc::ExitApp


#2

Wait, how would you cheat with them?

Can confirm they’re TOS friendly, DECA has actually implemented one of the more popular “macros” from back in the day with the item swapping (Buldokan and GHZD iirc were peeps that used it)


#3

AHK is a scripting language. A very powerful scripting language. You can emulate a majority of client hacks found in modern hack clients, however inefficiently. A few examples are possible with AHK, but there are many more: Aimbot, Triggerbot, Chat Spam, Anti-Confuse Controls, Anti-Quiet on Priests with Puri or Geb Tome, Auto Nexus, Automatic Dodging, Automatic Following, Multiboxing, etc. etc. Such scripts are explicitly against the ToS.

There then exists a moral grey area of scripts. This includes:

Trade Bots
  • Bots are not against the ToS so long as they conform to it. No hacking, etc.
  • However any scripts that interact with the chat at all have been a bannable offense. It is impossible to detect if scripts are involved, save for consistent spam. Therefore, such bots have been largely untouched by Deca.
General Bots
  • Bots are not against the ToS so long as they conform to it. So in theory, as long as the bot does not use hacks such as Aimbot, it is in a moral grey area. Uses for suchs bots are few and far between, the most common being mule bots.
Player Trackers
  • Not against the ToS, just generally a dick move on your part. Especially malicious when used to track dungeon raid leaders.

…and more


#4

Keybind for having repeating buff would be godlike to have on Pally, sometime slips my mind to use the ability, would be great to toggle something to autouse it.


#5

The third section under my original post does that, by using the toggle state of capslock. You can change the number 5000, to whatever suits your needs (5000 ms = 5 seconds).


#6

I posted an idea a couple of years back about autofire of ability: Autofire Special Ability Toggle
Am mentioning it as some of the replies there discuss script use to do it, if anyone wants a bit of additional reading.


#7

Do you take script suggestions?

I have one of my mouse buttons programmed to instantly ignore the most recent PM, but sharing it has been suboptimal because it’s not in AHK so not everyone could copy it without some work.

I tried to convert it myself some time back and bailed on it after not-that-much effort (AHK syntax is kinda weird to me)

Anyway, the procedure is as follows:

  • Press “tab” (open most recent dm)
  • Press “home” (go to start of field, regardless of length)
  • Press “Del” 5x (erase /tell)
  • Type: “/ignore”
  • Send

You might be able to obtain epic gamer points if you’re able to convert that to AHK, and let everyone whip&naenae on spam


#8

Yes I do!


Shift Tab to ignore last PM

#SingleInstance Force

;Main Function
+Tab::
Send {Tab}
Send {Home}
Send {Right 5}
Send {BackSpace 4}
Send ignore
Send {Enter}
return



#9

Shift tab to open steam menu and die
(personal experience)


#10

Could also do delete instead of right + backspace though don’t know if it makes a difference.

Just curious, does an ahk with this many input commands get “screwed up” if you’re also using your keyboard? Say you’re intensely WASDing and run this script, would there be issues?


Also for those interested, very old ahks made by bmj, gimerstedt etc

Some examples include selecting all 8 items in a trade, vaulting everything in inventory / picking up everything in vault, etc

Also macros have historically been a grey area. For example your auto ability script is functionally the same as the one in hacked clients for certain classes (e.g for warrior, but for wizard hc will also autoaim). I personally have no problem with it though


#11

You can replace the first Tab with any key. It would then be Shift Key to activate the script.


#12

Macros are definitely in a gray area. The above seem OK, but if the macro starts doing more than one function I feel that it starts to get a bit cheaty.


#13

Yeah, this is definitely a thing. Instantly ignoring a pm seems fine, but when you start to get into ability uses or aiming (I remember GHZD bringing up the idea of having a macro to help a player aim their colo sword better via back-and-forth mouse movements), things start getting a little too cheaty imo.


#14

For some reason I couldn’t get the delete key to function inside the realm client.

Scripts like the one above, but not the first three, will get messed up if you attempt to use the keyboard while it’s running. However, the script takes less than a second to complete.

The realmscript ahk functions are semi useful. I like some of them, however others are less useful. It also uses depreciated ahk code.

Some macros in hacked clients have been historically accepted by Realm’s collective owners over the years. Some have even made it into the base game, such as item quick swapping and right clicking player chat for actions.

The general rule of thumb for macros/scripts, is that they must not affect gameplay in a manner that the player could not complete reasonably. So binding right click to spacebar, is something entirely different to activating spacebar instantly when the mouse is over an enemy (spell triggerbot). In the case of auto ability, it is akin to the player spamming their ability key, on a certain delay. This is very possible by human standards, and thus can be automated in good graces.


#15

I’ve outlined such instances in my reply to RichGold and Unicorn. Aim assist is still aimbot.


#16

Very gamer of you :sunglasses:

I think you might be able to optimize it a little bit more:

Instead of

(…)
Send {Right 5}
Send {Backspace 4}
(…)

(9 key events)

You could do

(…)
Send {Del 5}
Send `/
(…)

(6key)

:crab:


#17

You can also achieve it ‘naturally’ by:
tab,
home,
ctrl+shift+rightarrow (highlights /tell),
type: "/ignore " (to overtype the /tell),
send

Maybe more efficient as no repeated delete/backspacing? No idea how that translates into code.


#18

I havent really used macros since item swapping got implemented, but “blockinput” made it work for me


#19

Now we’re really entering big brain territory


#20

(Updated to be more efficient)

Shift Tab to ignore last PM

#SingleInstance Force

;Main Function
+Tab::
Send {Tab}
Send {Home}
Send {Ctrl down}{Shift down}{Right}{Ctrl up}{Shift up}
Send /ignore{Space}
Send {Enter}
return