Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > World of Warcraft > WoW Guides & Templates
You last visited: Today at 00:02

  • 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 Guides & Templates forum part of the World of Warcraft category.

Reply
 
Old 12/22/2022, 21:48   #16
 
elite*gold: 0
Join Date: Dec 2022
Posts: 1
Received Thanks: 0
Hey, great tutorial but i have an issue. Sometimes it takes ages for the skill to fire (talking up to 3 seconds). Is there a way to fix it?
Kalitva is offline  
Old 12/23/2022, 11:55   #17
 
elite*gold: 0
Join Date: May 2017
Posts: 6
Received Thanks: 0
Quote:
Originally Posted by Kalitva View Post
Hey, great tutorial but i have an issue. Sometimes it takes ages for the skill to fire (talking up to 3 seconds). Is there a way to fix it?
I also have this issue, but some different, the skill on "3" button cannot cast during the boss fight. Like The Raging Tempest Boss(the storm boss) in The Nokhud Offensive.

I have set the frame strata to "TOOLTIP".

Only have issue on the "3" button, I have try to recap the pixel still have problem sometime.

The only way I can solve is close the AHK and RUN again. or KILL THE BOSS or Press 3 myself. XD
jason4364 is offline  
Old 12/28/2022, 14:45   #18
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 19
Quote:
Originally Posted by Antikrasse View Post
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.

Sorry again for the late reply. If you press the 'Rota Constructor' button (it's below the Window Size Info), all you need to write for that spell will be added to your clipboard. You can then just paste it into your AHK script. It will look something like this:

Code:
PixelGetColor, color, -789, 519, BGB
If (color = 0x242424)
{
Send, {}
Sleep 20
}
Afterwards, just fill in the empty brackets with the hotkey it needs to press for the spell. So, for example, if your fireball in WoW is cast when you press 1, then just write in a {1}. It should then look like this:

Code:
PixelGetColor, color, -789, 519, BGB
If (color = 0x242424)
{
Send, {1}
Sleep 20
}
If that is confusing to you, just take a look at the guide in the first post.

The error you have received is that you are missing a closing bracket somewhere. Take a look in your code. Every opening bracket needs to be closed somewhere. The bracket in line 9 is normally closed by the very last bracket in the script. So, if you take a look at my GitHub template of the script, it is closed in line 22. Hope this helps.

Quote:
Originally Posted by Kalitva View Post
Hey, great tutorial but i have an issue. Sometimes it takes ages for the skill to fire (talking up to 3 seconds). Is there a way to fix it?
Hey, I'd need to see your code to try to understand why this is happening. Check that all of your 'Sleep' statements are set to 20. Don't increase these values. It's possible that the colors you have chosen are too similar for multiple spells, or that there is an on-screen effect (like a red overlay on the borders of the screen when your health is low) that interferes with the colors displayed. Also depending in the Addon you are using it may sometimes display some kind of effect when the spell triggers under specific circumstances. Try to disable these effects as well.

You can also try adding a 'return' statement after every spell in the script. This causes the script to effectively restart from the top after it has found and pressed a hotkey. Your code for each hotkey should then look something like this:

Code:
PixelGetColor, color, 2498, 396,
If (color = 0x37376B)
{
Send, {1}
Sleep 20
return
}
If none of these suggestions help, and this problem only occurs with a specific hotkey, try putting that spell on a different hotkey to see if that resolves the problem. It's possible that another program is interfering with the pressing of this hotkey.

Quote:
I also have this issue, but some different, the skill on "3" button cannot cast during the boss fight. Like The Raging Tempest Boss(the storm boss) in The Nokhud Offensive.

I have set the frame strata to "TOOLTIP".

Only have issue on the "3" button, I have try to recap the pixel still have problem sometime.

The only way I can solve is close the AHK and RUN again. or KILL THE BOSS or Press 3 myself. XD
There is a trick to disable your script automatically when you are in a vehicle that changes your action bar. I thought it was a bit more advanced, which is why I didn't include it in the guide. First, you need to go inside a vehicle that changes your action bar. For example, if you play Dragonflight, your action bar will have special golden colors around it when you are inside the vehicle. Use the PixelSearch tool to find the golden color that is only present when you are inside the vehicle. If you play WotLK, you can use the PixelSearch tool to locate the red 'Jump-Out' arrow that appears when you are inside a vehicle.

Once you have the color and position, you need to add the shell that the 'Rota Constructor' gives you right after line 10 in the template. Then, add an 'exit' statement after the 'Send' command. This should go right after the while loop where you declare your hotkey. You will need to fill in the specific hotkey you use to start the script in this example. In my example, I use the number 2 as my hotkey.

Code:
$2::
While GetKeyState("2","p"){
PixelGetColor, color, 452, 1390, BGB
If (color = 0x111111)
{
Send, {2}
exit
}
}
return
You can also do something similar for when your chat is open. I hope this helps.
heromatic is offline  
Old 01/09/2023, 09:11   #19
 
elite*gold: 0
Join Date: Sep 2022
Posts: 2
Received Thanks: 0
Hi,
first of all thank you for the script.

Quote:
Originally Posted by 3rne5t0 View Post
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:
Is there any source for the updated talent/spell icons?
Would be a lot easier to compare icon the finding pixel, because sometime its very hard to scan a talent which is shown for less then a second before hekili update its rotation
Also changing the position of the source (hekili) is a pain in the a**.
reflex90 is offline  
Old 01/26/2023, 12:31   #20
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 19
Quote:
Originally Posted by reflex90 View Post
Hi,
first of all thank you for the script.



Is there any source for the updated talent/spell icons?
Would be a lot easier to compare icon the finding pixel, because sometime its very hard to scan a talent which is shown for less then a second before hekili update its rotation
Also changing the position of the source (hekili) is a pain in the a**.
Hi, sorry for the late response. I've been busy with a lot of work recently. The easiest way to find sources for icons is to use the icons in the WoW Macros tab. I believe they have every icon available. I still belive you should use Pixels instead of icons. It's so much faster to check for a single pixel than to search for an Icon that needs to sit pixelperfect in the correct position.

Also, if you find that Hekili is too slow, you can update its throttle in the options. This increases how fast Hekili updates itself. Alternatively, you can create a Weakaura that triggers when the talent is ready and stays on for a second. Use this Weakaura as your pixel target and put the spell to press at the very top of your AHK script. This ensures that the spell always has priority. I hope that helps.
heromatic is offline  
Old 01/29/2023, 11:57   #21
 
elite*gold: 0
Join Date: Oct 2021
Posts: 4
Received Thanks: 1
****. Great Topic.

Btw, you should add that it's ALT + X to use the pixel script.

After that is straightfoward
revista89 is offline  
Old 01/29/2023, 15:34   #22
 
elite*gold: 0
Join Date: Mar 2011
Posts: 11
Received Thanks: 19
Quote:
Originally Posted by revista89 View Post
****. Great Topic.

Btw, you should add that it's ALT + X to use the pixel script.

After that is straightfoward
Hi, thanks, I added it to the section where you download the script. It was also in Step 5 wich would've been the "do it yourself" step
heromatic is offline  
Old 02/07/2023, 12:33   #23
 
elite*gold: 0
Join Date: Apr 2008
Posts: 3
Received Thanks: 0
Ahk is bannable right?
hans5641 is offline  
Old 02/21/2023, 08:43   #24
 
elite*gold: 0
Join Date: Sep 2022
Posts: 2
Received Thanks: 0
Quote:
Originally Posted by heromatic View Post
Hi, sorry for the late response. I've been busy with a lot of work recently. The easiest way to find sources for icons is to use the icons in the WoW Macros tab. I believe they have every icon available. I still belive you should use Pixels instead of icons. It's so much faster to check for a single pixel than to search for an Icon that needs to sit pixelperfect in the correct position.

Also, if you find that Hekili is too slow, you can update its throttle in the options. This increases how fast Hekili updates itself. Alternatively, you can create a Weakaura that triggers when the talent is ready and stays on for a second. Use this Weakaura as your pixel target and put the spell to press at the very top of your AHK script. This ensures that the spell always has priority. I hope that helps.
Is there any way to change the script to have some kind of tolerance in the color?
I noticed that when i'm using my notebook with the same settings of hekili and everything else it seem that the colors are slightly different so the script does not work.
Would be perfekt, if there is a script which is working on every device xD
reflex90 is offline  
Old 05/30/2024, 20:17   #25
 
elite*gold: 0
Join Date: Feb 2023
Posts: 2
Received Thanks: 1
not sure if ya using this or have any interest. But ya mentioned Hekili. I added bout 80 lines in 4 spots to create a hash of the spellname and colors the border to use as the pixel spot to find. Much easier than having to get pixels on icons... And then you can use same/similar algorithm in your AHK to do the same. My main AHK script a massive mess and needs to be redone, but more than happy to toss the Hekili updates to you if ya want em? and the mess of a hash function in my ahk. It initially creates the hashes on load and only does it on the fly if it can't match
rakaza is offline  
Old 06/01/2024, 06:43   #26
 
elite*gold: 0
Join Date: Apr 2005
Posts: 11
Received Thanks: 2
Quote:
Originally Posted by rakaza View Post
not sure if ya using this or have any interest. But ya mentioned Hekili. I added bout 80 lines in 4 spots to create a hash of the spellname and colors the border to use as the pixel spot to find. Much easier than having to get pixels on icons... And then you can use same/similar algorithm in your AHK to do the same. My main AHK script a massive mess and needs to be redone, but more than happy to toss the Hekili updates to you if ya want em? and the mess of a hash function in my ahk. It initially creates the hashes on load and only does it on the fly if it can't match
share readding is annoying especially when you move the icon or you change contrast/brightness etc.
digital_err0r is offline  
Old 06/01/2024, 07:12   #27
 
elite*gold: 0
Join Date: Feb 2023
Posts: 2
Received Thanks: 1
Line #'s may be bit off, but included the lines before. it's a hack, mainly just crap i found/modified.

These the additions i added to Hekili to modify the borders to be colorized based on a hash of the spellname. The 2nd set are same functions used in the ahk script that read my ini file with the abilities and keybinds.

Code:
Classes.ui: 763

                                if ability then class.abilities[ ability ] = a end
                                if a.name  then class.abilities[ a.name ]  = a end
                                if a.link  then class.abilities[ a.link ]  = a end
                                if a.id    then class.abilities[ a.id ]    = a end
                --AHK
                tmpSpellName = string.gsub(a.name, "%s+", "")
                tmpSpellName = string.gsub(tmpSpellName, "%p+", "")
                local red,green,blue = ns.ahkHashStringToColorTuple(tmpSpellName)
                hexcolor = ns.rgbToHex(red*255,green*255, blue*255)
                rgba = { red, green, blue, 1}
                --print("1",tmpSpellName, hexcolor)
                 a.color =  rgba
                --END AHK


                                Hekili.OptionsReady = false

                                return true
                            end
========================
Classes.ui: 804
                end

                a.desc = GetSpellDescription( a.id ) -- was returning raw tooltip data.
                --AHK
                tmpSpellName = string.gsub(a.name, "%s+", "")
                tmpSpellName = string.gsub(tmpSpellName, "%p+", "")
                local red,green,blue = ns.ahkHashStringToColorTuple(tmpSpellName)
                hexcolor = ns.rgbToHex(red*255,green*255, blue*255)
                rgba = { red, green, blue, 1}
                print("2",tmpSpellName, hexcolor)
                 a.color =  rgba
                --END AHK


                if a.suffix then
                    a.actualName = a.name
                    a.name = a.name .. " " .. a.suffix
========================
UI.lua: 1130
                            b.Texture:Show()
                            -- AHK START
                            local rgba = {0,0,0,1}
                            if not string.find(ability.name, "cff00ccff") then
                                rgba = ability.color and ability.color
                                --print (ability.id,unpack(ability.color))
                            else
                                tmpName = "Cancel Buff " .. ability.buff
                                tmpName = string.gsub(tmpName, "%s+", "")
                                tmpName = string.gsub(tmpName, "%p+", "")
                                local red,green,blue = ns.ahkHashStringToColorTuple(tmpName)
                                rgba = { red, green, blue, 1}
                                --print (tmpName,unpack(rgba))
                            end
                            b.Backdrop:SetBackdropBorderColor(unpack(rgba))
                            b.Backdrop:Show()
                            -- AHK END
========================
Utils.lua: 72

-- AHK START
function ns.ahkHashStringToColorTuple(str)
    local hash = ns.ahkStringHash(str)
    local red = bit.rshift(bit.band(hash, 0xFF0000), 16)
    local green = bit.rshift(bit.band(hash, 0xFF00), 8)
    local blue = bit.band(hash, 0xFF)
--print(str, red/255, green/255, blue/255)
    return  red/255, green/255, blue/255
end

function ns.ahkStringHash(text)
    local counter = 1
    local len = string.len(text)
    for i = 1, len, 3 do
        counter = math.fmod(counter*8161, 4294967279) +  -- 2^32 - 17: Prime!
        (string.byte(text,i)*16776193) +
        ((string.byte(text,i+1) or (len-i+256))*8372226) +
        ((string.byte(text,i+2) or (len-i+256))*3932164)
    end
    return math.fmod(counter, 4294967291) -- 2^32 - 5: Prime (and different from the prime in the loop)
end
function ns.rgbToHex(r,g,b)
    local rgb = (r * 0x10000) + (g * 0x100) + b
    return string.format("%06x", rgb)
end
-- AHK STOP
Code:
	stringHash(text) {
		text := StrSplit(text)
		len := text.MaxIndex()
		counter := 1
		i := 1
		while(i <= len) {
			counter := mod(counter * 8161, 4294967279) + Ord(text[i]) * 16776193 + (i+1 <= len ? Ord(text[i+1]) : len-i+256) * 8372226 + (i+2 <= len ? Ord(text[i+2]) : len-i+256) * 3932164
			i := i + 3
		}
		return mod(counter, 4294967291)
	}
	Debug(text,newline) {
		OutputDebug % "AHK| " text
				if (newline)
			OutputDebug % "``n"

	}
	hashStringToColor(str) {
		Debug(str,1)
		hash := stringHash(str)
		r := (hash & 0xFF0000) >> 16
		g := (hash & 0x00FF00) >> 8
		b := hash & 0x0000FF
		return Format("{1:#.2X}{2:.2X}{3:.2X}",r,g,b)
	}
	hashStringToColorTuple(str){
		Debug(str,1)
		hash := stringHash(str)
		r := (hash & 0xFF0000) >> 16
		g := (hash & 0x00FF00) >> 8
		b := hash & 0x0000FF
		return {red: r/255, green: g/255, blue: b/255}
	}
	ARGBtoRGB( ARGB ) {
		Format:= A_FormatIntegerFast
		setFormat, IntegerFast, hex
		ARGB := ARGB & 0x00ffffff
		ARGB .= ""  ; Necessary due to the "fast" mode.
		setFormat, IntegerFast, %Format%
		return ARGB
	}
)
rakaza is offline  
Thanks
1 User
Old 06/13/2024, 04:54   #28
 
elite*gold: 0
Join Date: Apr 2005
Posts: 11
Received Thanks: 2
kinda lost. I'm guessing the first line of code you assign to the hekili addon and the 2nd code is an ahk script or does it go to an existing ahk script?

I don't know if I got it working but so far, I see a bunch of spells with 2 at the start followed by the spellname then a hex example

2 Meteor d4cc07, but how does this help need to execute it the 2nd script doesn't work in ahk auto closes.

also which file are you referring to

maybe you can assist in setup or shoot me a dm thanks
digital_err0r is offline  
Thanks
1 User
Old 06/18/2024, 11:52   #29
 
elite*gold: 0
Join Date: Aug 2017
Posts: 37
Received Thanks: 3
Don't use high ban rate! ahk scripts are ez to detect
gadasan is offline  
Old 06/23/2024, 08:45   #30
 
elite*gold: 0
Join Date: Apr 2005
Posts: 11
Received Thanks: 2
rakaza not sure where part 2 goes on the pixelfinder, I integrated it with that script but still displays same results like the existing script... do you have a discord u can dm me
digital_err0r is offline  
Reply

Tags
rotation helper, rotation script


Similar Threads 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 00:02.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.