NewNub Posted July 3, 2010 Posted July 3, 2010 Hi I would like to learn how to code. I know basic coding like IF statements, loops newbie stuffbasically I want to know how to create a pixelsearchif you look at the picture I want the script to Press F1 when the hunger meter goes to the red bar.I know how to create coding for F1 and loops but im stuck on the pixelsearch. any help will be appreciated <3
NewNub Posted July 3, 2010 Author Posted July 3, 2010 THis is how it looks when hungry Hmm I don't even know what where to start or what code to usePixelGetColor or PixelSearch?
NewNub Posted July 3, 2010 Author Posted July 3, 2010 I wrote a bit of a code but I need to know if I'm heading the right direction. HotkeySet ("{F11}", "Start") HotKeySet("{F12}","_Exit") Func Start () While 1 ;starts loop $Variable = PixelSearch(156, 69, 184, 80, 0xFFAE00) If IsArray($Variable) = True Then send("{F4}") EndIf WEnd ;where loop ends EndFunc While (1) Sleep (1) WEnd Func _Exit() Exit 0 EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now