|
You last visited: Today at 16:07
Advertisement
GUIDE - Create your own rotation-bot via Autohotkey
Discussion on GUIDE - Create your own rotation-bot via Autohotkey within the WoW Guides & Templates forum part of the World of Warcraft category.
10/19/2024, 17:18
|
#46
|
elite*gold: 0
Join Date: Apr 2024
Posts: 221
Received Thanks: 17
|
Quote:
Originally Posted by heromatic
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:
First of all, you will need to go to  and download AutoHotKey and install it and its prerequisites afterwards. AutoHotKey (which I will from now on call "AHK") is completely free to use and a great little tool to automate your daily life on your PC in general by creating useful macros that can represent a very complex behaviour. This is all meant for complete beginners that have never seen a script before in their life. The AHK documentary is pretty good if you want to learn more but can get a bit complex if you don't know the underlying principles of how code generally works.
Step 2:
To get the specific rotation for your character, you will need to use an addon. My preferred options are "Hekili Priority Helper" for retail (though their WotLK content isn't as comprehensive yet) or WeakAuras, which you can use to search and import or create your own priority at  . Hekili is easier to set up and works well out of the box. It even allows you to create a custom rotation or use a Simulationcraft rotation based on your unique character and item combination. You will want the addon of your choice to display the next suggested spell as the spell icon or a colored texture of the spell. I recommend setting these types of addons to only show one icon at a time, so that it always suggests the correct spell to use in the current moment.
To display the suggested spell, place the addon's display somewhere on your screen, somewhere it won't bother you. Then, in the addon settings, set the frame strata to "TOOLTIP". This is important because if you don't do this, other frames such as Infoframes, Characterpanels, BNet in-game notifications, or even the red screen pulsing that happens when you have low health, can obstruct the script from reading the next suggested inputs. In Hekili, you can do this in the display settings of your chosen display type. In WeakAuras, you can do this in either the "Group" tab at the bottom or the "Display" tab at the bottom of the "Position Settings," depending on your profile type.
Step 3:
Now that everything is set up, we can create our own script. We will be reading pixel color values at specific coordinates in the suggested spells of our previously set up addon. Don't worry, this is easier than it sounds.
First, you will need a tool to get the pixel color values and coordinates. The tool we will be using is written in AutoHotKey (AHK). To use it, create a new AHK script file by right-clicking in the directory of your choice on your Windows PC and selecting "New" then "AutoHotKey Script". Alternatively, you can create a new empty ".txt" file and use that as your script file. If you go this route, remember to enable "view file extensions" on your Windows operating system (you can google how to do this) and then save the ".txt" file as an ".ahk" file.
Once you have created your AHK script, right-click on it and select "Edit Script". The file should open in a text editor (you can also use a number of real IDEs if you prefer). Go to my GitHub repository at 
and copy the entire script into the open file. Save and close the file, and name it Pixeltool.ahk or any other appropriate name. You can now start the tool by double-clicking on it. If you don't get any errors, you have done everything correctly and the tool should be running in the background. You should also see a green H symbol in your tray next to your Windows clock.
EDIT: To use the Pixelscript, mouseover the wanted postion and then press "ALT + X".
As a disclaimer, I did not write this script but found it on the web years ago. I have used it ever since and have never encountered any problems with it.
Step 4:
Now you will need to create a second AHK script for your rotation. Create a script and name it whatever you find appropriate. Open the file with the "Edit Script" method, and then go to the second file of my GitHub repository at  and copy the script into your own file. This is the template that I have used for every rotation script I have ever made. It may look complicated, but it's really not.
To explain what is happening in this template, I will go through the important parts line by line:
First, we will look at Line 8:
Code:
#ifWinActive World of Warcraft
This line tells our rotation script to only run when WoW is actively running and in focus. So, for example, if you switch to Chrome while the script is running, it won't try to press any keys in Chrome.
Next, we will look at Lines 10 and 11:
Code:
$2::
While GetKeyState("2","p"){
Here, you will need to specify which key on your keyboard will start the rotation script. As long as you press this key, the script will do the rotation for you. In my case, it is the key "2". This means that whenever I am in WoW and press the number 2 and keep pressing it, the script will start the rotation. You can change this to whatever key you prefer. You can use any key in your action bar, as pressing that key won't actually cast the spell bound to that keybind because the script will prevent the key from being registered by WoW unless it presses it itself. Remember to change both Line 10 and 11 to your preferred hotkey. For example, if you want to change from "2" to the key "t" on your keyboard, the lines should look like this:
Code:
$t::
While GetKeyState("t","p"){
Don't change the "p" in Line 11. This is a function command that will ensure the rotation script keeps running as long as we keep pressing the specified hotkey. The "p" in this case means "pressed." So you could also read the line as "While the key "t" on your keyboard is pressed, do whatever follows in the subsequent lines."
Now we can finally put our rotation together. Lines 12 to 17 will be our template for one spell. Here is a breakdown of the meaning of each line and how to customize it for your needs:
Line 12:
Code:
PixelGetColor, color, 2498, 396,
This line starts the PixelGetColor function of AHK. The only important part here is the numbers, which represent the X and Y coordinates of a specific pixel on your monitor. In this case, 2498 is the X value and 396 is the Y value of the pixel that we want to check. You will only want to change these numbers and leave the rest as is. The Pixeltool will give you the color as a BGR value. You could read this line as "Using the PixelGetColor function, check the pixel at position (x, y) on your monitor and read its BGR value."
Line 13:
Code:
If (color = 0x37376B){
In this line, we will check if the BGR value of the pixel at the coordinates (2498, 396) is equal to the value "0x37376B". If this check evaluates to true, then the script will execute the code block enclosed in the curly braces "{}". Essentially, the line can be read as "If the color found at the specified coordinates is the same as the one specified, then perform the actions within the curly braces."
Line 15:
In this line, we specify which button the script should press if the color value found matches the one we are searching for. For example, if we are searching for a pixel in the spell icon of a "Firebolt" on the Action bar in World of Warcraft (WoW), and we want the script to press the button corresponding to the "Firebolt" spell, we would specify the key "6" on the Action bar. If we want to press hotkeys with modifiers, such as a spell macro "/cast [mod:shift] SomeSpellhere," we can add additional keys to the line. For example, if we want the script to press the shift and 6 keys at the same time, the line would be modified to:
Code:
Send, {Shift down}{6}{Shift up}
You can check the official AHK websites for all the possible key combinations.
Line 16:
This line simply tells the script to wait 20 milliseconds before executing the next instruction. We want to always do this after pressing keys. Otherwise, the commands get executed too fast and it's also not good for performance.
Line 17:
This line simply closes the "if" statement of Line 13. That means specifically that if the pixel value found was not the one we specified in line 13, it would immediately jump to line 18.
Step 5:
To customize the script for your specific rotation in World of Warcraft (WoW), follow these steps:
1. Open WoW and move your mouse cursor over the spell icon displayed by the addon you installed in Step 2. Choose a spot where the color under the cursor is bright or unique.
2. Press "Alt + X" to open the Pixeltool, which will display the mouse coordinates and BGR pixel value of the color at that point.
3. Click on the "copy X and Y" button and paste the coordinates into Line 12 of the script. For example, if the coordinates are "100 100," Line 12 should look like:
Code:
PixelGetColor, color, 100, 100,
4. Reopen the Pixeltool and press the "Copy Colour" button. Paste the BGR value into Line 14 of the script, replacing the existing value with your own. For example, if the value is "0x000000," the line should look like:
Code:
if (color = 0x000000) {
5. Add the hotkey the script is supposed to press for the Spell in Line 15
5.Customize the script further by adjusting the delay in Line 16 as needed.
After modifying the Pixelsearch tool, you can press the "Rota Constructor" button to copy the entire process to your clipboard. Paste it after the first spell you created and fill in the corresponding hotkey.
To specify the hotkey for the first spell, replace the key in Line 15 with the corresponding hotkey on your Action bar. The rotation script will now be able to cast the spell whenever it is suggested by the addon.
To create the rotation script for additional spells, follow these steps:
1.In WoW, cast the first suggested spell yourself. The addon should now display the second suggested spell.
2.Quickly repeat Step 5 to get the mouse coordinates and pixel values for the second spell. Make sure to choose a color that is specific to the spell. Many spells in WoW have similar colors, so it is important to choose a unique color to prevent the script from casting the wrong spell.
3.Copy Lines 12 to 17 and paste them to Line 18.
4.Replace the values of the copied code with the coordinates, BGR value and hotkey for the second spell.
5.Repeat this process for all suggested spells in your rotation.
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.
|
hi thanks for sharing your knowledge and methods. love
|
|
|
10/22/2024, 18:32
|
#47
|
elite*gold: 0
Join Date: Oct 2024
Posts: 1
Received Thanks: 0
|
Hello, at first it's difficult, but once you learn it, it's very easy. One question, is it safe? Is there a possibility of getting banned?
|
|
|
10/25/2024, 14:09
|
#48
|
elite*gold: 0
Join Date: Jul 2020
Posts: 12
Received Thanks: 0
|
Ask yourself the question one more time. Cheating in an MMO ALWAYS includes a risk. If you are afraid of your account, you dont cheat.
|
|
|
10/28/2024, 01:43
|
#49
|
elite*gold: 0
Join Date: May 2011
Posts: 61
Received Thanks: 6
|
Be sure to run your action usage or button presses about 100-150 or greater MS
|
|
|
10/30/2024, 12:52
|
#50
|
elite*gold: 0
Join Date: Jun 2010
Posts: 1
Received Thanks: 0
|
Quote:
Originally Posted by van101
Be sure to run your action usage or button presses about 100-150 or greater MS
|
SendKeyWithRandomDelay(key) {
Send, %key%
Random, randDelay, 180, 280
Sleep, randDelay
}
if WinActive("World of Warcraft") {
While, GetKeyState("MButton","P") {
PixelGetColor, color, 17, 820
If (color = 0xA78137) {
SendKeyWithRandomDelay("{F1}")
}
If (color = 0x6D0B00) {
SendKeyWithRandomDelay("{1}")
}
}
}
Just example
|
|
|
10/31/2024, 02:13
|
#51
|
elite*gold: 0
Join Date: Mar 2017
Posts: 51
Received Thanks: 5
|
remember chatgpt is your friend and you need to start using AI or you'll fall behind the next gen, just like your grandparents have in regards to internet/cellphones etc.
ask chatgpt, how can it make your current script more humanlike or how to randomize sleep and integrate it.
my current script has much less lines of code, randomized sleep, my abilities are on an array which is randomized as well.
cool stuff! i find melee classes work very well. running: ret, outlaw, enhance atm
|
|
|
10/06/2025, 20:22
|
#52
|
elite*gold: 0
Join Date: Oct 2014
Posts: 2
Received Thanks: 0
|
pixelfinder doesnt seem to work when im picking something ingame for some reason it just gives me gray color, iit worked with no issues for years suddenly its giving me this problem any known fixes?
|
|
|
11/12/2025, 03:48
|
#53
|
elite*gold: 0
Join Date: Jan 2009
Posts: 12
Received Thanks: 2
|
Ban is coming!
|
|
|
Similar Threads
|
Rotation Lab - WLK Classic Combat Rotation Bot
08/17/2025 - World of Warcraft Trading - 16 Replies
Get ready to own in Cataclysm classic, Season of Discovery and Dragonflight.
Demo Video
Sorry, our video was removed by YouTube but you can still view it on our website.
Features
|
All times are GMT +1. The time now is 16:08.
|
|