Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > World of Warcraft > WoW Exploits, Hacks, Tools & Macros
You last visited: Today at 10:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



GUIDE - Create your own rotation-bot via Autohotkey

Discussion on GUIDE - Create your own rotation-bot via Autohotkey within the WoW Exploits, Hacks, Tools & Macros forum part of the World of Warcraft category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 14
GUIDE - Create your own rotation-bot via Autohotkey

Hi,

I recently rediscovered this forum and was reminded of my time playing World of Warcraft (WoW). I want to share my method for creating a rotation script for any damage-dealing class in WoW. I have been using this method since I returned to WoW in the Legion expansion, and it has worked for me in every addon since then, including in Classic, The Burning Crusade, and now Wrath of the Lich King. I have never been banned or had any other problems using this method (unlike many "premium" rotation scripts that cost money). As this method is fairly simple and doesn't involve injecting anything into WoW, the risk of getting caught is almost zero. However, I cannot be held responsible if you do get banned for using this method.

Step 1:

Step 2:

Step 3:

Step 4:

Step 5:

Once you have finished customizing the script, save it and [B]!!! RUN IT AS AN ADMINISTRATOR !!![/B. If you made a mistake in the code, the AutoHotkey (AHK) interpreter may not start the script and instead display an error message indicating the line where the error occurred. One common error is missing curly braces "{}", which indicate the start and end of a code block. Make sure that every opening brace has a corresponding closing brace. If you are unsure of the cause of the error, you can double-check the template and verify that you have copied everything correctly.

If the script runs successfully, it should start pressing buttons as soon as you press the key specified in Lines 10 and 11. Enjoy your carefree rotation! I hope this guide was helpful.

Have a good one!

EDIT: I have recently added a "Rota Constructor" button to the Pixelsearch tool. When you press this button, the necessary AutoHotkey (AHK) code will be copied to your clipboard. Simply paste it into your AHK Script and add the hotkey you wish to press. This makes it easier to add the code to your script and only requires you to specify the corresponding hotkey.

EDIT: After sleeping and rereading it, I realize it's a little more rambly than I thought it was when I first wrote it, and I apologize for that. This guide is intended to serve as a primer for the AutoHotkey (AHK) portion of the process, as it is easy to learn but can be very powerful once you understand the underlying principles.

In Step 2, it is important to properly set up the in-game addon that will suggest spells for your rotation. If you play on retail servers, you can use the Hekili addon, which provides a complete rotation for your character's specialization right out of the box. It is relatively simple to set up, but you may want to spend some time fine-tuning the settings. For example, if you play a ranged class, you may want to alter the AoE detection or create a hotkey that allows you to toggle between single and multitarget rotations. If you want to directly modify the rotation in Hekili, it can be more complex, and you may want to refer to the Hekili and Simulationcraft GitHubs to understand the structure of rotation strings.

WeakAuras is another useful tool for creating custom spell suggestion displays. You can find pre-made profiles for your class and specialization on the website mentioned in the previous text, or you can create your own from examples provided by other classes and specializations. WeakAuras has many built-in options for displaying spell icons and textures, so you may want to use those before creating more complex custom trigger functions. In addition to suggesting spells for your rotation, WeakAuras can also be used to create indicators for other purposes, such as when to use a healthstone or when to step forward and melee attack.
heromatic is offline  
Thanks
14 Users
Old 11/04/2022, 11:20   #2
 
elite*gold: 0
Join Date: May 2012
Posts: 34
Received Thanks: 6
Appreciate your time & effort sharing this!
hudloom is offline  
Old 11/04/2022, 17:26   #3
 
elite*gold: 0
Join Date: May 2017
Posts: 6
Received Thanks: 0
Thanks for your GREAT explanation. I just want to find how to make a AHK rotation macro.
jason4364 is offline  
Old 11/04/2022, 17:41   #4
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 14
Quote:
Originally Posted by jason4364 View Post
Thanks for your GREAT explanation. I just want to find how to make a AHK rotation macro.
If you need any help with anything in the process, I am happy to help. This still works. I made a DK rota for WotlK just yesterday.
heromatic is offline  
Old 11/04/2022, 19:24   #5
 
elite*gold: 0
Join Date: May 2017
Posts: 6
Received Thanks: 0
I got 2 problem
1. I am playing taiwan server, if I keep the Line 8 "#ifWinActive World of Warcraft" the "2" in the actionbar will still can function. the AHK won't function.

2. After I del Line 8, the "2" in actionbar won't function, and the AHK still not function. eg. press the 2 noting happen.

Is there any problem in my code??
I have RUN IT AS AN ADMINISTRATOR, the strata set as tooltip.
Also, I have try to recap the colour and postition, and just use 1 script.
eg. press 2 > actionbar hotkey 1

Thanks so much for your kindest help.

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#MaxThreadsPerHotkey 2
#ifWinActive World of Warcraft
{
$2::
While GetKeyState("2","p"){
	PixelGetColor, color, 1866, 322, BGB
	If (color = 0xF5B110)
	{
	Send, {1}
	Sleep 20
	}

	PixelGetColor, color, 1869, 321, BGB
	If (color = 0x978058)
	{
	Send, {2}
	Sleep 20
	}

	PixelGetColor, color, 1868, 320, BGB
	If (color = 0xF42C10)
	{
	Send, {3}
	Sleep 20
	}

	PixelGetColor, color, 1875, 312, BGB
	If (color = 0x68BBF4)
	{
	Send, {4}
	Sleep 20
	}

	PixelGetColor, color, 1868, 315, BGB
	If (color = 0x2E1B1F)
	{
	Send, {5}
	Sleep 20
	}

	PixelGetColor, color, 1874, 306, BGB
	If (color = 0xFFFE74)
	{
	Send, {E}
	Sleep 20
	}

	PixelGetColor, color, 1878, 323, BGB
	If (color = 0x370000)
	{
	Send, {R}
	Sleep 20
	}

}
return
}
jason4364 is offline  
Old 11/04/2022, 20:23   #6
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 14
Quote:
Originally Posted by jason4364 View Post
I got 2 problem
1. I am playing taiwan server, if I keep the Line 8 "#ifWinActive World of Warcraft" the "2" in the actionbar will still can function. the AHK won't function.

2. After I del Line 8, the "2" in actionbar won't function, and the AHK still not function. eg. press the 2 noting happen.

Is there any problem in my code??
I have RUN IT AS AN ADMINISTRATOR, the strata set as tooltip.
Also, I have try to recap the colour and postition, and just use 1 script.
eg. press 2 > actionbar hotkey 1

Thanks so much for your kindest help.
So first of all, your code looks good to me.*

In regards to your first problem. I am sure that maybe your client is running in a different language than English. So your window name maybe doesn't have the exact same name as in the script. You can check via Task Manager what the name of the window is and manually adjust it.
Also, try playing in windowed mode.

Problem number two looks promising. If your actionbar number two won't function correctly, that means that the script is running and intercepting your hotkey press. To check if it's running in general, I would suggest that you check if it presses the first suggested spell for your class. Delete all other hotkeys from the script.
If you use my tool to get mouse coordinates and color values, then try to double-check your color values after copying them. It needs to be the same value written after "BGR Colour:.". Don't use the RGB values. Also delete the BGB. It's not really needed, I forgot to change it after I uploded it the first time.
Your code should then probably look something like this:
Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#MaxThreadsPerHotkey 2
{
$2::
While GetKeyState("2","p"){
	PixelGetColor, color, 1866, 322,
	If (color = 0xF5B110)
	{
	Send, {1}
	Sleep 20
	}
}
return
}
I also don't know what kind of addon you use. If you are using Hekili try deactivating any animation or glow effects that play when a spell is shown. In Hekili go to Options - Displays - Primary (or the one you are using) - Glows, then just disable it. Go to Delays and disable that as well. If you don't do this, sometimes you will get a weird color because of all these effects.*
heromatic is offline  
Old 11/05/2022, 17:07   #7
 
elite*gold: 0
Join Date: May 2017
Posts: 6
Received Thanks: 0
Thank so much, I finally make it.
The problem is the colour value, when I use BGR value the script run perfect.
And "#ifWinActive World of Warcraft" I change the game name to Traditional Chinese, I work too.

This is the first time I use AHK, but you make this rotation bot easy to understand.
Also thankyou for answer my question. GG
jason4364 is offline  
Old 11/09/2022, 16:42   #8
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 14
Quote:
Originally Posted by jason4364 View Post
Thank so much, I finally make it.
The problem is the colour value, when I use BGR value the script run perfect.
And "#ifWinActive World of Warcraft" I change the game name to Traditional Chinese, I work too.

This is the first time I use AHK, but you make this rotation bot easy to understand.
Also thankyou for answer my question. GG
That's great to hear!
Its only really hard the first time you create your own. In a couple of tries you will be a master at it, I am sure!
heromatic is offline  
Old 12/01/2022, 08:26   #9
 
elite*gold: 110
Join Date: Jul 2009
Posts: 65
Received Thanks: 6
Jes someone has Tutorial it i use it for Years now never had any Problems. You can do it whit ImageSearch as well to be sure Right Skill is pressed. My Script looks like this, also i use Hekili:
Quote:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines, -1
#MaxThreadsPerHotkey 2

$1::
While, GetKeyState("1","P") {
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 UrteildesTemplers.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 6
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 KlingederGerechtigkeit.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 4
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 Richturteil.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 3
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 Kreuzfahrerstoss.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 5
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 Aschewelle.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 8
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 Todesurteil.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 1
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 GötlicherSturm.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 2
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 Weihe.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 7
Sleep, 30
Send, {Shift Up}
}
ImageSearch, X, Y, 1868, 1472, 1971, 1574, *80 HammerdesZorns.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 9
Sleep, 30
Send, {Shift Up}
}
}
return

$::Suspend
3rne5t0 is offline  
Thanks
1 User
Old 12/03/2022, 06:57   #10
 
elite*gold: 0
Join Date: Mar 2011
Posts: 7
Received Thanks: 1
Been doing this for 10 years on and off when I play wow. I use to grab colors and it works great. Push F7 with program loaded for the pixel grabber.

The main problem I see here is that you are not using returns at the end of each pixelsearch. If you do not have return after then it will continue to run through the script and check the other conditions, causing abilities to send out of priority. It will run through the script and send the key for every true condition, but with the return added it will go to that line in the script, send the key, then start the script over. This causes the script to spam that one key while waiting on GCD to come up. Each ability should look like this in most cases if it is on the GCD.

CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 26, 31, 26, 31, 0x212121, 0, Fast RGB ; Barbed Shot
If ErrorLevel = 0
{
Send {.}
sleep 100
return
}


I found that creating custom weak auras to meet conditions on your rotation is the most optimal dps rotation. Going this route you can automate interrupts, potions, and health stones as well. Use small icons and place them in a corner of your screen.


Also make sure to turn off the screen flash at low health settings.
razzorbladez is offline  
Old 12/04/2022, 11:41   #11
 
elite*gold: 0
Join Date: Apr 2005
Posts: 5
Received Thanks: 1
yeah you also need to remember the position where the icon was placed and the brightness settings etc it works great.
digital_err0r is offline  
Old 12/04/2022, 20:23   #12
 
elite*gold: 0
Join Date: Dec 2021
Posts: 1
Received Thanks: 0
Hi Folks,

I'm tying to get this set up, I think I have the basic setup done, but when i test it with 1 spell, it's not doing anything. Have I missed something simple? I'm tying to set the r key as a tigger that i will eventually map onto my mouse. My script runs fine, no error messages, but pressing r in game doesn't do anything.

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#MaxThreadsPerHotkey 2
#ifWinActive World of Warcraft
{
$r::
While GetKeyState("r","p"){
	PixelGetColor, color, 75, 1016,
	If (color = 0x2B6E2B)
	{
	Send, {Shift Down}{1}{Shift Up}
	Sleep 20
	}
}
return
}
PeeGee57 is offline  
Old 12/05/2022, 05:08   #13
 
elite*gold: 0
Join Date: Apr 2005
Posts: 5
Received Thanks: 1
Quote:
Originally Posted by PeeGee57 View Post
Hi Folks,

I'm tying to get this set up, I think I have the basic setup done, but when i test it with 1 spell, it's not doing anything. Have I missed something simple? I'm tying to set the r key as a tigger that i will eventually map onto my mouse. My script runs fine, no error messages, but pressing r in game doesn't do anything.

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


#MaxThreadsPerHotkey 2
#ifWinActive World of Warcraft
{
$r::
While GetKeyState("r","p"){
	PixelGetColor, color, 75, 1016,
	If (color = 0x2B6E2B)
	{
	Send, {Shift Down}{1}{Shift Up}
	Sleep 20
	}
}
return
}

looks fine if it doesn't trigger either the keybind is the issue or you didnt use pixeltool to grab the icon color/position, so try a different key first if that doesnt work re do the color .
digital_err0r is offline  
Thanks
1 User
Old 12/08/2022, 22:25   #14
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 14
I apologize for the delay in my response. As I mentioned before, I don't frequent this website often.
I recently updated the Pixelsearch tool to include a "Rota Constructor" button. When you press this button, it will copy the entire AHK section you need to add a spell to your script. Simply paste it after the first spell you created and fill in the hotkey for the spell between the empty parentheses. This should make it easier to add new spells to your script without having to write the code from scratch.

@, you are correct that imgsearch also works, but it is significantly slower than Pixelsearch. I would always recommend using Pixelsearch because it's easier to get the pixel coordinates rather than saving the entire image of the spell.

@, you are technically correct that using a return statement would be the "beautiful" way to code this script. However, I have found that it is not necessary in this script and both methods work equally well. The waits in the script are 20ms, which means that the entire script will complete before your GCD runs out, allowing you to cast the next spell. However, you can certainly add return statements if you prefer.

@
Like digital_err0r said already. To troubleshoot first check if you can press your choosen hotkey and it wont press that button ingame. So if your hotkey is "r", open the chat, press "r" and see if you write "r" in the chat. If you do, then the script isnt loading properly. Try running it as an Admin, that usually does the trick. If your Error is because you it cant find the color then remember to use BGR instead of RGB. Also but the addon you use at tooltipp strata and disable all Screeneffects in WoW. These can all cause the script to stop working.

I hope this information helps. I will check in occasionally to see if anyone needs additional assistance.
heromatic is offline  
Old 12/22/2022, 04:09   #15
 
elite*gold: 0
Join Date: May 2013
Posts: 4
Received Thanks: 0
Quote:
Originally Posted by heromatic View Post
I apologize for the delay in my response. As I mentioned before, I don't frequent this website often.
I recently updated the Pixelsearch tool to include a "Rota Constructor" button. When you press this button, it will copy the entire AHK section you need to add a spell to your script. Simply paste it after the first spell you created and fill in the hotkey for the spell between the empty parentheses. This should make it easier to add new spells to your script without having to write the code from scratch.

@, you are correct that imgsearch also works, but it is significantly slower than Pixelsearch. I would always recommend using Pixelsearch because it's easier to get the pixel coordinates rather than saving the entire image of the spell.

@, you are technically correct that using a return statement would be the "beautiful" way to code this script. However, I have found that it is not necessary in this script and both methods work equally well. The waits in the script are 20ms, which means that the entire script will complete before your GCD runs out, allowing you to cast the next spell. However, you can certainly add return statements if you prefer.

@
Like digital_err0r said already. To troubleshoot first check if you can press your choosen hotkey and it wont press that button ingame. So if your hotkey is "r", open the chat, press "r" and see if you write "r" in the chat. If you do, then the script isnt loading properly. Try running it as an Admin, that usually does the trick. If your Error is because you it cant find the color then remember to use BGR instead of RGB. Also but the addon you use at tooltipp strata and disable all Screeneffects in WoW. These can all cause the script to stop working.

I hope this information helps. I will check in occasionally to see if anyone needs additional assistance.
Hello bro! I just do it for a DK Unholy Rotation on Dragonflight, i dont know if its works i'm on it actually but what is the key to press for "rota constructor" on your script? Thanks! (Do you have disc ?)

EDIT : I have this error :
Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.

---- D:\Documents\openai\Rotationdkunholy.ahk
003: SendMode,Input
004: SetWorkingDir,%A_ScriptDir%
009: {
010: Return (3.47)

Press [F5] to refresh.
Antikrasse is offline  
Reply

Tags
rotation helper, rotation script


Similar Threads Similar Threads
Rotation Lab - WLK Classic Combat Rotation Bot
03/23/2024 - World of Warcraft Trading - 12 Replies
Get ready to own in upcoming Cataclysm classic Demo Video https://www.youtube.com/watch?v=7GYrj-uW2m4 Features Pixel-based without memory injection or LUA unlocker for best security.



All times are GMT +2. The time now is 10:14.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.