Darkon Posted April 30, 2008 Share Posted April 30, 2008 Hi everybody i started to make a bot for Urban-Rivals.com, but i cant do anything coz i dont know how pixel find system work can u help me pl0x ? Link to comment Share on other sites More sharing options...
Pain Posted April 30, 2008 Share Posted April 30, 2008 always use the helpfile, it's your best friend PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] ) left left coordinate of rectangle. top top coordinate of rectangle. right right coordinate of rectangle. bottom bottom coordinate of rectangle. colour Colour value of pixel to find (in decimal or hex). shade-variation [optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour. Default is 0 (exact match). step [optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1. Link to comment Share on other sites More sharing options...
hendrikhe Posted April 30, 2008 Share Posted April 30, 2008 (edited) Some usefull Pixel functions for your bot:PixelGetColor(x, y) shows you the color of the x,y coordiante PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] ) is explanied above, shaw-variaton should be between 0 and 30, PixelSearch returns the coordinate when it finds the color (x, y) or a 1 if it find nothingsome quick examples:$Health = PixelGetColor(110, 50)$checkHP = PixelSearch(100, 45, 120, 55, $Health, 30)if $checkHP = 1 Then ; if checkHP = 1 (didnt found the color of a full Health)Heal the Char with spells, potions, etcEndIf Edited April 30, 2008 by hendrikhe Link to comment Share on other sites More sharing options...
Darkon Posted May 3, 2008 Author Share Posted May 3, 2008 WoW, ty i tried to make but I cant do it ... can anybody help me with some examples plz ? Link to comment Share on other sites More sharing options...
MikeP Posted May 3, 2008 Share Posted May 3, 2008 (edited) Check this : #include <GUIConstants.au3> GUICreate ("My GUI") GUISetBkColor (0xE0FFFF) GUISetState () $ctrID = GUICtrlCreateGraphic(50,50,50,50) GUICtrlSetBkColor ($ctrID, 0x00FF00) While 1 $msg = GUIGetMsg() $mousepos = MouseGetPos() ToolTip(PixelGetColor($mousepos[0],$mousepos[1]) , $mousepos[0]+10, $mousepos[1]+10,"") If PixelGetColor($mousepos[0],$mousepos[1]) = 65280 Then MsgBox(0,"", "Color found! Time to code your script !") EndIf Sleep(10) If $msg = $GUI_EVENT_CLOSE Then ExitLoop WendoÝ÷ ٩趫{¦¦W«]z׶̨»kzZ0¢qÏ¢|¨º±ÏmªíÊjYrj+¦ jg¬²Û~X¤zØZµ«¢+Ø¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì)AɽÉÍÍ=¸ ÅÕ½Ðí!@ÈÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÀÁɹÐÅÕ½Ðì°ÔÀ°ÔÀ¤)½ÈÀÌØí¤ôÄÀÀѼÄÀÍÑÀ´Ô(ͱÀ ÈÔÀ¤(AɽÉÍÍMÐ ÀÌØí¤°ÀÌØí¤µÀìÅÕ½ÐìÁɹÐÅÕ½Ðì¤(A¥á±MÉ ÄÐÔ°ÄÄÔ°ÄÔÀ°ÄÈÀ°ÄÔØÔàÜÌà¤(%ÉɽÈôÄQ¡¸(Q½½±Q¥À ÅÕ½Ðí5ä!@É¥¹$½¸ÌäíйѼ¡°ÅÕ½Ðì°ÌÀÀ°ÔÀ¤(±Í(Q½½±Q¥À ÅÕ½Ðí µä!@Éѽ¼±½Ü¸¸±ÐÌäíÌ¡°ÌÌìÅÕ½Ðì°ÌÀÀ°ÔÀ¤(¹%)9áÐ)AɽÉÍÍMÐ À°ÅÕ½Ðí½¹ÅÕ½Ðì°ÅÕ½Ðí$Ìäí´$¹Ñ¼ÍÉ¥ÁÐÑ¡¡±¥¹ÌÌìÅÕ½Ðì¤)ͱÀ ÈÀÀÀ¤)AɽÉÍÍ= ¤ Edited May 3, 2008 by MikeP 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