Jump to content
Sign in to follow this  
drakonis

the most noobish question.ever.period

Recommended Posts

drakonis

ok so i have this script(its a mob retarget script for a game based on pixel detection)

what does it do:

-checks constantly for a pixel and if it recognizes an unwanted color on the coors it tabs untill the unwanted pixel changes.

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0

Author: myName

Script Function:

Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

HotKeySet('{f6}','Close')

HotKeySet('{f5}','TogglePause')

Global $Pause

$I_PX = '395' ;Pixels X Coord.

$I_PY = '46' ;Pixels Y Coord.

$I_PixelColor = '646364' ;Pixel to check

While 1

Sleep(1)

GetPixel($I_PY,$I_PX,$I_PixelColor)

WEnd

Func Close() ;Hotkey ESC Exits

exit 0

EndFunc

Func TogglePause() ;Hotkey F1 Pauses the script

$Pause = NOT $Pause

While $Pause

sleep(1)

ToolTip('Pixel Shutdown is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func GetPixel($I_PY,$I_PX,$I_PixelColor);Constantly checks the pixel color

$I_PixC = PixelGetColor($I_PX,$I_PY)

$I_PixH = Hex($I_PixC, 6)

If $I_PixH = $I_PixelColor Then

controlsend("Archlorc", "", "", "{TAB}")

sleep(1)

EndIf

Sleep(1)

EndFunc

TIME FOR THE MOST NOOBISH QUeSTION IN thE AUTOIT HISTORY!!!

- I want the script to TAB when it does NOT find the pixel i wanted untill it appears on the coords. Ive been told its enough to replace

If $I_PixH = $I_PixelColor Then

with

If $I_PixH <= $I_PixelColor Then

but the script just keeps tabbing even when it should not.

what should i do /b/?

Share this post


Link to post
Share on other sites
stampy

I'm thinking you want

If $I_PixH <> $I_PixelColor Then

rather than less than or equal.

Share this post


Link to post
Share on other sites
drakonis

thanks ill try this out right away

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.