100% Consistent Rod of Discord Hotkey (Vanilla)

PyxelatorXeroc

Terrarian
After a VERY LONG TIME of searching and stuff, I have made a very simple script, perfectly consistent (works EVERY Single Time*.)
*kinda. read below

The delay between keypress and teleport is very short.
If you are autousing an item when you use the hotkey, sometimes it won't work because you are in the middle of an item use. Even if it does work, after it switches back, you have to let go and re-click.

Tested on 60fps, prob doesn't change anything on other fps.

Code:
;Install AHK, change the extension of this file into .ahk


;Put your Rod of Discord in one of your hotbar slots (1-10).
;Then put what you want to switch back to (say, your main weapon) in another hotbar slot.

;Replace F with the hotkey you want.
;Replace the two 0's with the number corresponding to your hotbar slot that the RoD is in.
;Slot #1 is 1, Slot #2 is 2, etc. Slot #10 is 0.

;Replace the two 1's with the number corresponding to the item you want to switch back to.

F::
send {0 down}
sleep 10
send {0 up}

Send {lbutton down}
Sleep, 10
Send {lbutton up}

mouseclick, left
send {1 down}
sleep 10
send {1 up}
 
Last edited:
The reason it was hard: Terraria is an old game using a custom input system (I think?). Anyways, it doesn't receive fake inputs well. The default AutoHotkey MouseClick and KeyPress functions didn't work. The secret is to hold the key.

This is probably the closest we can get to perfect without modding the game.
 
Back
Top Bottom