Jump to content
Sign in to follow this  

PixelSearch not working

Recommended Posts


Hey guys, im kinda new to auto it script.

Im making a bot for a game called Diablo II, so far i have the login on lockdown, now i need to focus on pixelsearch for finding enemy's which have been modded to look completely black.

heres my pixelsearch code for testing purposes, why isnt it working?

Global $Paused
HotKeySet("{End}", "ExitProg");;To exit the progam
HotKeySet("{Home}", "StartProg");;To start the program
HotKeySet("{Insert}", "TogglePause");; Key to pause and unpause

While 1
Sleep(100);;;Waits for function call

Func StartProg()
$coord = PixelSearch( 0, 0, 1024, 768, 0x00FF00 )
If Not @error Then
#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Info
MsgBox(64,"Sucess","Found T3h Color!")
#EndRegion --- CodeWizard generated code End ---

Func TogglePause()
$Paused = NOT $Paused
While $Paused

Func ExitProg()
Exit 0;;;Exits the program

Thanks in advance.

Fixed it myself. A few questions to the experienced members, whats the difference between

dim $paused
global $Paused
? Edited by ecstatic

Share this post

Link to post
Share on other sites

How about you change the size of the sleep in the pause function to something more sensible?

As for the rest of it, have a search for the bot... its has probably been done before.

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