ecstatic Posted April 2, 2009 Share Posted April 2, 2009 (edited) 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 Wend Func StartProg() $coord = PixelSearch( 0, 0, 1024, 768, 0x00FF00 ) If Not @error Then MouseClick("Left",$coord[0],$coord[1]) #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 --- EndIf EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(1000000) WEnd EndFunc Func ExitProg() Exit 0;;;Exits the program EndFunc Thanks in advance. Fixed it myself. A few questions to the experienced members, whats the difference between dim $paused and global $Paused ? Edited April 2, 2009 by ecstatic Link to comment Share on other sites More sharing options...
BrettF Posted April 2, 2009 Share Posted April 2, 2009 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. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
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