widow Posted November 11, 2005 Share Posted November 11, 2005 (edited) hello guys, i have been toying around with auto-it.. im trying to make an auto fighting bot for a game i play... it detects the pixel color and then double clicks it. ; Setup hotkey HotKeySet("{ESC}", "MyExit") ;Activate Game WinActivate("SRO_Client") While 1; repeat statements over If PixelGetColor(1063, 662) = Dec("2696224") Then MouseClick("left", 1071, 18, 1) MouseClick("left", 550, 442, 1) Sleep(300000) EndIf ; look for monster and attack him $CoordMonster = PixelSearch(0, 0, 800, 800, 0x7E8076, 5) If Not @error Then MouseClick("Left", $CoordMonster[0], $CoordMonster[1], 1, 1) EndIf ; if mana is empty replenish it If PixelGetColor(119, 780) = (0x94929c) Then For $i = 3 To 1 Step - 1 Send("{F7}") Sleep(2000) Next EndIf WEnd Func MyExit() Exit EndFunc;==>MyExit now the problem is that it wont run with full screen games other bots i created work fine with full screen but it seems that the pixel searching ones have trouble.. is this a common problem? any info/tips/code is greatly appreciated widow EDIT: not even sure if this script is all that great.. maybe someone has a simpler one? i just need it to detect w/e pixel i want and then double click it.. wait a few seconds until the monster is killed.. and then repeat Edited November 11, 2005 by widow Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 11, 2005 Moderators Share Posted November 11, 2005 Is that the whole script? If so, what kind of coords are you using: Screen / Window / Client? replace 0 if your not using window coordinates with 1 for screen coords or 2 for client, and put this at the very top of your script. Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
victor Posted November 11, 2005 Share Posted November 11, 2005 what game you making this for? Link to comment Share on other sites More sharing options...
widow Posted November 11, 2005 Author Share Posted November 11, 2005 oh its for Silk Road Online.. silkroadonline.net ( if you into mmorpg's then check it out ) =P @Ron: yeh its the whole script >__> i will try that idea and reply back.. right now its hard signing into the game cause the servers are always exceeded 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