Jump to content
Sign in to follow this  
NewNub

Need guidance

Recommended Posts

NewNub

Hi I would like to learn how to code.

I know basic coding like IF statements, loops newbie stuff

basically I want to know how to create a pixelsearch

Posted Image

if 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

Share this post


Link to post
Share on other sites
NewNub

THis is how it looks when hungry

Posted Image

Hmm I don't even know what where to start or what code to use

PixelGetColor or PixelSearch?

Share this post


Link to post
Share on other sites
NewNub

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.