Autoit Pixel HP AND MP Bot Help

09/24/2013 14:16 EviLcLoWnS™#1
Well Its for Scarlet Blade, I just wanted the script to auto heal and fill my mp when ever function(HP or MP) is low. I know tons of people ask for this kind of stuff all the time, or so i thought. Most post are not up to date and old. I know Auto has changed thew the years. I tried Lawliet script but it didnt seem to work for me. I know this just may not work because SB has themida in it. I use macroGamer 2.7.5 by Toady for repeat 1-7 Key strokes, for skills to repeat. I was thinking well be nice too have auto hp/mp.

So Full hp would be all Red course.

Code:
Position 222,33
Color [COLOR="Red"]0xED4542[/COLOR]
Do nothing, but when HP gets low(color changes..Is not 0xED4542) Spam F9 Key until its back too 0xED4542.

--------------------------------------------------------------------

So Full mp would be all Blue course
Code:
Position 216,76
Color [COLOR="Blue"]0x5C83D8[/COLOR]
Do nothing, but when mp gets low(color changes..Is not 0x5C83D8) Spam F10 Key until its back too 0x5C83D8.

Wondering if someone could help me with a script that would do that. I do wanna learn and would post more in my thread. Just easier for me to have something basic then, learn how to add other functions. Thank you for your time.
09/24/2013 15:33 butter123#2
While Sleep(10)
If pixelgetcolor(222,33) <> 0xED4542 then
send(f9)
endif
If pixelgetcolor(216,76)<> 0x5C83D8then
send(f10)
endif
wend
09/24/2013 18:41 EviLcLoWnS™#3
Its really that simple, ahhhh! I was trying to do something else. Thinking Guess i didn't have to do all the other includes and stuff for something simple. Ty i will try it out.
02/14/2014 10:41 DjNanos#4
Could u share your program ? cuz the one im using can spam only 1 pot when colour changes
02/25/2014 18:45 butter123#5
While Sleep(10)
If pixelgetcolor(222,33) <> 0xED4542 then
send(f9)
endif
If pixelgetcolor(216,76)<> 0x5C83D8then
send(f10)
endif
wend
02/27/2014 12:42 DjNanos#6
eh..is there a chance someone made it happen and send it to us too ? :3
02/27/2014 18:56 mlukac89#7
Are you too lazy to compile it ?
02/28/2014 19:01 DjNanos#8
no..i just have no clue about how doing it and if i search about how to do it id spend whole day while someone from here could spend 5min making it. :p
02/28/2014 19:09 alpines#9
It looks like a hard day for you.
02/28/2014 19:30 mlukac89#10
It's not so hard you play in window mode or full screen ?

Here is a example, but you must find position and color alone :D its not same for all desktop height and width.

If you don't understand it then go learn :)

here is link how to make bot with Autoit it have 8 videos

Code:
HotKeySet("{HOME}", "_run") ; HOME key calls function _run
HotKeySet("{ESC}", "_quit") ; ESC key calls function _run

Dim $run = False

While 1
	Sleep(20)
WEnd

; Function that runs bot
Func _run()
	; check if process exist
	If ProcessExists("calc.exe") Then

		$run = Not $run

		While $run
			If PixelGetColor(222, 33) <> 0xED4542 Then
				Send("{F9}")
				Sleep(500)
			EndIf
			If PixelGetColor(216,76) <> 0x5C83D8 Then
				Send("{F10}")
				Sleep(500)
			EndIf
		WEnd

	EndIf

EndFunc

; Function that exit bot
Func _quit()
	Exit
EndFunc
03/01/2014 14:11 DjNanos#11
Quote:
Originally Posted by alpines View Post
It looks like a hard day for you.
Most useful tip ive ever seen. Thank you



Quote:
Originally Posted by mlukac89 View Post
It's not so hard you play in window mode or full screen ?

Here is a example, but you must find position and color alone :D its not same for all desktop height and width.

If you don't understand it then go learn :)

here is link how to make bot with Autoit it have 8 videos
[Only registered and activated users can see links. Click Here To Register...]

Code:
HotKeySet("{HOME}", "_run") ; HOME key calls function _run
HotKeySet("{ESC}", "_quit") ; ESC key calls function _run

Dim $run = False

While 1
	Sleep(20)
WEnd

; Function that runs bot
Func _run()
	; check if process exist
	If ProcessExists("calc.exe") Then

		$run = Not $run

		While $run
			If PixelGetColor(222, 33) <> 0xED4542 Then
				Send("{F9}")
				Sleep(500)
			EndIf
			If PixelGetColor(216,76) <> 0x5C83D8 Then
				Send("{F10}")
				Sleep(500)
			EndIf
		WEnd

	EndIf

EndFunc

; Function that exit bot
Func _quit()
	Exit
EndFunc

Quote:
Originally Posted by DjNanos View Post
no..i just have no clue about how doing it and if i search about how to do it id spend whole day while someone from here could spend 5min making it. :p
*by next month ill over with it, even tho i guess the script you gave me makes it easier... thanks.
03/01/2014 17:04 alpines#12
Quote:
Originally Posted by DjNanos View Post
Most useful tip ive ever seen. Thank you
Oh dear, you make me quite embarrassed... ;)

Whatever, the parts of the script were all posted here so just find them and make a solid solution. It won't take longer than 5 minutes.
03/04/2014 15:27 DjNanos#13
i took the script mlukac89 gave me above, changed colour/pixel/Fkeys but its not working, and its says "script paused" at my taskbar
03/04/2014 16:19 mlukac89#14
Post full code
03/05/2014 04:26 DjNanos#15
i tried to run this

Code:
HotKeySet("{HOME}", "_run") ; HOME key calls function _run
HotKeySet("{ESC}", "_quit") ; ESC key calls function _run

Dim $run = False

While 1
	Sleep(20)
WEnd

; Function that runs bot
Func _run()
	; check if process exist
	If ProcessExists("calc.exe") Then

		$run = Not $run

		While $run
			If PixelGetColor(165, 64) <> 0x5A4D39 Then
				Send("{F11}")
				Sleep(500)
			EndIf
			If PixelGetColor(140, 92) <> 0x184563 Then
				Send("{F12}")
				Sleep(500)
			EndIf
		WEnd

	EndIf

EndFunc

; Function that exit bot
Func _quit()
	Exit
EndFunc