Metigue Posted February 14, 2009 Share Posted February 14, 2009 (edited) I'm trying to create a simple but effective FFR bot, I want a timer that loops the pixelget's about every 25 ms and checks the pixelgets against the pixel that they normally are and if they are not that pixel to press the arrow key that that coordinate requires, I need help with getting my timers right and the use of my not operator because it doesn't work atm This is what I have so far for the part I am having trouble in: CODEWhile $bot = 1 $Start = TimerInit() While 1 If TimerDiff($Start) > 25 Then If TimerDiff($Start) < 50 Then $var = PixelGetColor(399, 633) $var2 = PixelGetColor(470, 635) $var3 = PixelGetColor(536, 631) $var4 = PixelGetColor(606, 632) If $var = not (0x210504) then Send("{LEFT}") EndIf If $var2 = not (0x210504) then Send("{DOWN}") EndIf If $var3 = not (0x210504) then Send("{UP}") EndIf If $var4 = not (0x210504) then Send("{RIGHT}") EndIf $Start = TimerInit() EndIf EndIf WEnd WEnd Edited February 14, 2009 by Metigue Link to comment Share on other sites More sharing options...
BrettF Posted February 14, 2009 Share Posted February 14, 2009 Look at the operators in the helpfile. If $var <> "blah" Then MsgBox (0, "", "$var is not equal to blah!") Cheers Brett 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...
Metigue Posted February 14, 2009 Author Share Posted February 14, 2009 (edited) Look at the operators in the helpfile. If $var <> "blah" Then MsgBox (0, "", "$var is not equal to blah!") Cheers Brett Thanks, lol this is my first script heh, lol. Any help with my timers or is there a simpler way to get it to loop till it finds an irregularity? EDIT: Fixed the timers lol. Edited February 14, 2009 by Metigue Link to comment Share on other sites More sharing options...
BrettF Posted February 14, 2009 Share Posted February 14, 2009 Not sure what you mean there, but this is okay for me... $bot = 1 While $bot = 1 $Start = TimerInit() While 1 $diff = TimerDiff($Start) If $diff >= 25 And $diff <= 50 Then $var = PixelGetColor(399, 633) $var2 = PixelGetColor(470, 635) $var3 = PixelGetColor(536, 631) $var4 = PixelGetColor(606, 632) If $var <> 0x210504 Then Send("{LEFT}") EndIf If $var2 <> 0x210504 Then Send("{DOWN}") EndIf If $var3 <> 0x210504 Then Send("{UP}") EndIf If $var4 <> 0x210504 Then Send("{RIGHT}") EndIf $Start = TimerInit() EndIf WEnd WEnd 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