Game Rotation Script, Need Help Topic is solved

Ask gaming related questions (AHK v1.1 and older)
keeeno
Posts: 4
Joined: 16 Feb 2017, 04:58

Game Rotation Script, Need Help

16 Feb 2017, 05:08

Hi, First time poster here.

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
}

User avatar
Grendahl
Posts: 170
Joined: 30 Sep 2013, 08:21

Re: Game Rotation Script, Need Help  Topic is solved

16 Feb 2017, 09:08

For one, you are in expression mode with your variable assignments, so anything that is a letter won't work.

For example,
habq := q
should be
habq := "q"
keeeno
Posts: 4
Joined: 16 Feb 2017, 04:58

Re: Game Rotation Script, Need Help

16 Feb 2017, 14:18

Thank you so much
keeeno
Posts: 4
Joined: 16 Feb 2017, 04:58

Re: Game Rotation Script, Need Help

16 Feb 2017, 14:23

not sure why 5 wasnt working but now it is

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 114 guests