minecraft and PixelGetColor issue

Ask gaming related questions
supeee
Posts: 1
Joined: 21 May 2020, 22:52

minecraft and PixelGetColor issue

Post by supeee » 21 May 2020, 23:19

i am trying to get my player to face east using the f3 mene that tells you where you are facing. using PixelGetColor i find out of there is in "H" in South or north, then see if its north or south or move on to east or west using a similar method. then display the results on a msg box and it only worked when i ran it 2 times to fix this i added a loop and i added another loop called another one because for whatever reason it did not work without it. so now for my problem: it keeps the data from when i start the program, for example: if i start the script facing east nothing will happen as it should although when i face anywhere else and press numpad 5 again it still thinks it facing east as you can see i set all Northf3 southf3 ect to 0 several times any ideas?

ok i edited this and did more tests i believe that it has something to do with windowed minecraft any fixes?

Code: Select all

numpad5::

loop, 1		{           ;another one
hornot()

}

return

hornot()	{		;  Northf3
	
	
	loop, 2		{                ; This loop here!
	
			Northf3 = 0
			Southf3 = 0
			Westf3 = 0
			Eastf3 = 0
	
	PixelGetColor, north1, 125, 232 ;a

	
	
		
	if ((north1 = 0x404040))	{
		; DllCall("mouse_event", "UInt", 0x01, "UInt", 400, "UInt", 0)\
		PixelGetColor, south1, 84, 233 
		if ((south1 = 0x404040)) {
			Northf3 = 0
			Southf3 = 1
			Westf3 = 0
			Eastf3 = 0
			DllCall("mouse_event", "UInt", 0x01, "UInt", -400, "UInt", 0)
			Northf3 = 0
			Southf3 = 0
			Westf3 = 0
			Eastf3 = 0
			
		}	else {
			Northf3 = 1
			Southf3 = 0
			Westf3 = 0
			Eastf3 = 0
			DllCall("mouse_event", "UInt", 0x01, "UInt", 400, "UInt", 0)
			Northf3 = 0
			Southf3 = 0
			Westf3 = 0
			Eastf3 = 0
			
	}}	else	{
		PixelGetColor, west1, 80, 225
		if ((west1 = 0x404040)) {
			Northf3 = 0
			Southf3 = 0
			Westf3 = 1
			Eastf3 = 0
			DllCall("mouse_event", "UInt", 0x01, "UInt", 800, "UInt", 0)
			Northf3 = 0
			Southf3 = 0
			Westf3 = 0
			Eastf3 = 0
			
		} else {
			Northf3 = 0
			Southf3 = 0
			Westf3 = 0
			Eastf3 = 1
			
		
	}

}



/*
;MsgBox, %Westf3%%Northf3%%Southf3%%Eastf3%
if ((Eastf3 = 1) && (Westf3 = 0) && (Northf3 = 0) && (Southf3 = 0))	{
return
}
else if ((Eastf3 = 0) && (Westf3 = 1) && (Northf3 = 0) && (Southf3 = 0))	{
DllCall("mouse_event", "UInt", 0x01, "UInt", 800, "UInt", 0)
return
}
else if ((Eastf3 = 0) && (Westf3 = 0) && (Northf3 = 1) && (Southf3 = 0))	{
DllCall("mouse_event", "UInt", 0x01, "UInt", 400, "UInt", 0)
return
}
else if ((Eastf3 = 0) && (Westf3 = 0) && (Northf3 = 0) && (Southf3 = 1))	{
DllCall("mouse_event", "UInt", 0x01, "UInt", -400, "UInt", 0)
return
*/
;}













;MsgBox, %Westf3%%Northf3%%Southf3%%Eastf3%
Northf3 = 0
Southf3 = 0
Westf3 = 0
Eastf3 = 0
;MsgBox, %Westf3%%Northf3%%Southf3%%Eastf3%




return

}

;MsgBox, %Westf3%%Northf3%%Southf3%%Eastf3%
return

 

}
[Mod edit: [code][/code] tags added]

Return to “Gaming”