I have made some tweaks to another person's script I have found on the internet.
Essentially in the game I have an addon feature that puts white squares in different locations on the screen for different reasons.
I have set them up to come all in a line at the top of the screen but with different scenarios in the game.
I have tweaked this script to recognise when these squares pop up and do press a certain keystroke accordingly.
my "hab1" through to "hab4" work perfectly but nothing in the code after that.
Can any of you experts see why this would happen?
(I have made sure that the coords for the squares are correct)
Thanks in Advance
Code: Select all
#MaxThreadsPerHotkey 1
$F12:: ;press F12 to activate or desactivate
s := !s
gd := 200
hab1 := 1 ;
hab2 := 2 ;
hab3 := 3 ;
hab4 := 4 ;
hab5 := 5 ;
habq := q ;
habe := e ;
habr := r ;
constanty := 5 ;
castbarx := 10 ;
enragex := 25 ;
odynsfuryx := 40 ;
alotofragex := 55 ;
ragingblowx := 70 ;
whirlwindx := 85 ;
bloodthirstx := 100 ;
executex := 115 ;
combatx := 130 ;
While s
{
PixelGetColor, iswhite, combatx, constanty, RGB
if iswhite = 0xFFFFFF
{
iswhite := 1
PixelGetColor, iswhite, castbarx, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %hab1%
Sleep, %gd%
iswhite := 1
}
Else
PixelGetColor, iswhite, enragex, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %hab2%
Sleep, %gd%
iswhite := 1
}
Else
PixelGetColor, iswhite, executex, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %hab3%
Sleep, %gd%
iswhite := 1
}
Else
If PixelGetColor, iswhite, alotofragex, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %hab4%
Sleep, %gd%
iswhite := 1
}
Else
If PixelGetColor, iswhite, bloodthirstx, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %habq%
Sleep, %gd%
iswhite := 1
}
Else
PixelGetColor, iswhite, ragingblowx, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %hab5%
Sleep, %gd%
iswhite := 1
}
Else
PixelGetColor, iswhite, odynsfuryx, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %habr%
Sleep, %gd%
iswhite := 1
}
Else
PixelGetColor, iswhite, whirlwindx, constanty, RGB
if iswhite = 0xFFFFFF
{
SendEvent, %habe%
Sleep, %gd%
iswhite := 1
}
Else
Sleep, %gd%
iswhite := 1
}
Else
Sleep, %gd%
iswhite := 1
}