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.Quote:
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?
Quote:
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.
PixelGetColor, color, -789, 519, BGB
If (color = 0x242424)
{
Send, {}
Sleep 20
}
PixelGetColor, color, -789, 519, BGB
If (color = 0x242424)
{
Send, {1}
Sleep 20
}
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.Quote:
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?
PixelGetColor, color, 2498, 396,
If (color = 0x37376B)
{
Send, {1}
Sleep 20
return
}
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.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
$2::
While GetKeyState("2","p"){
PixelGetColor, color, 452, 1390, BGB
If (color = 0x111111)
{
Send, {2}
exit
}
}
return
Is there any source for the updated talent/spell icons?Quote:
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:
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.Quote:
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 :D
Also changing the position of the source (hekili) is a pain in the a**.
Is there any way to change the script to have some kind of tolerance in the color?Quote:
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.
share readding is annoying especially when you move the icon or you change contrast/brightness etc.Quote:
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
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
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
}
)