Jump to content
Sign in to follow this  
Darkon

New game bot ...

Recommended Posts

Darkon

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 ? :D

Share this post


Link to post
Share on other sites
Pain

always use the helpfile, it's your best friend :D

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.

Share this post


Link to post
Share on other sites
hendrikhe

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 nothing

some 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, etc

EndIf

Edited by hendrikhe

Share this post


Link to post
Share on other sites
Darkon

WoW, ty i tried to make but :)

I cant do it ... can anybody help me with some examples plz ?

Share this post


Link to post
Share on other sites
MikeP

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 by MikeP

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  

×