hay guys. i am making a bot for a small pay to win browser flash game.
everything go nicely but sometimesthe crafter discover a new recipie and the item i want to craft change position so i use pixelsearch because new recipe names are blue instead of white until you craft them once.
i took a picture of the game and with photoshop i got the hexa value of the colour. if i set any sensibility (like 1) it always detect even if i put a black background. if i set it to 0 he detect nothing
here it is:
can flash block the pixelSearch.
my problem is that it always detect even if the color is not in the area or it detect nothing
flash can't block anything...
try this, to check if pixelsearch works for you @ all
Code:
$gui = GUICreate('', 20, 20, 0, 0, 0x90000000)
GUISetBkColor(0) ;black
GetColor()
GUISetBkColor(0xFFFFFF) ;white
GetColor()
GUISetBkColor(0xFF0000) ;red
GetColor()
GUISetBkColor(0xFF00) ;green
GetColor()
GUISetBkColor(0xFF) ;blue
GetColor()
GUISetBkColor(0) ;black
GetColor()
Func GetColor()
; White
PixelSearch(1,1,19,19,0xFFFFFF)
If Not @error Then ConsoleWrite('Guicolor: White'&@CRLF)
; Red
PixelSearch(1,1,19,19,0xFF0000)
If Not @error Then ConsoleWrite('Guicolor: Red'&@CRLF)
; Green
PixelSearch(1,1,19,19,0xFF00)
If Not @error Then ConsoleWrite('Guicolor: Green'&@CRLF)
; Blue
PixelSearch(1,1,19,19,0xFF)
If Not @error Then ConsoleWrite('Guicolor: Blue'&@CRLF)
; Black
PixelSearch(1,1,19,19,0)
If Not @error Then ConsoleWrite('Guicolor: Black'&@CRLF)
EndFunc
your exemple worked.
but how cant this wont work?
im about to blow my head off.
he get the color in a position, then he scan the same zone and he cant find it.
i am also aiming to a white background with a basic FEFEFE color... i have to put the search sensibility over 9000 because he cant find it.
is it because the color i am searching is not on my gui but on my browser so i need something for him to detect his color?
i really dont know what to do now
Code:
Global $color
getColor()
ColorTest()
Func getColor()
$color = Hex(PixelGetColor(50,100),6)
ConsoleWrite($color)
EndFunc
Func ColorTest()
Local $coord = PixelSearch(40,90,20,20, $color,50);wtf even at 50 it say NOPE
If Not @error Then
ConsoleWrite("yup")
Else
ConsoleWrite("nope")
EndIf
sleep(500)
MouseMove(40,90)
EndFunc
btw, i also have a small question. do sleep also pause _TIMER ?
Sleep() will pause your entire Script. Use a lower "shade-variation" value to solve your problem. The value of the "shade-variation" parameter should be in range from 0 to 255. If you want an exact match, you have to use 0 (see lolkops script). If you're using a value above 254, PixelSearch() will always succeed.
your exemple worked.
but how cant this wont work?
im about to blow my head off.
he get the color in a position, then he scan the same zone and he cant find it.
i am also aiming to a white background with a basic FEFEFE color... i have to put the search sensibility over 9000 because he cant find it.
is it because the color i am searching is not on my gui but on my browser so i need something for him to detect his color?
i really dont know what to do now
Code:
Global $color
getColor()
ColorTest()
Func getColor()
$color = Hex(PixelGetColor(50,100),6)
ConsoleWrite($color)
EndFunc
Func ColorTest()
Local $coord = PixelSearch(40,90,20,20, $color,50);wtf even at 50 it say NOPE
If Not @error Then
ConsoleWrite("yup")
Else
ConsoleWrite("nope")
EndIf
sleep(500)
MouseMove(40,90)
EndFunc
btw, i also have a small question. do sleep also pause _TIMER ?
first of all, sleep pauses your whole script... i don't know exactly what the _TIMER function does, but i would allways prefer native autoit functions (timerinit, timerdiff)...
pixelsearch doesn't care for the target, since it scans your actual displaycontent for the color.... if you fail @ finding the color, your color (or position) seems to be wrong...
Pixel Search 05/07/2012 - AutoIt - 1 Replies Hey,
mit welchen Programm bekomme ich nochmal diese Werte her?
PixelSearch(12, 174, 1028, 700, 0x59571A, 10)
Danke
[Release]Small Weapon Pixel-Bot 03/05/2012 - S4 League Hacks, Bots, Cheats & Exploits - 142 Replies Update: Works only on 64-Bit at the moment, am working on a 32 bit version (there seems to be a problem with the dc)
Ok Guyes, here is my new Bot :awesome:
http://img9.abload.de/img/blahsrwf.png
Features:
- Clicks with the mousebutton if you hover a enemy mit a normal gun
- Let the mousebutton off if you hover a enemy with a sniper gun
- Works in Fullscreen and Windows Mode
Pixel search 02/23/2008 - Guild Wars - 18 Replies hallihallo
bin immoment dabei einen meiner eigenen bots zu optimieren und wollte ne Pixelsearchfunktion einbauen.
Leider weiß ich nicht genau wie man das macht vorallem mit den farben.
mein ziel:
3 verschiedene punkte im gw fenster(mit: x1;y1;;x2;y2;;x3;y3) sollen geprüft werden ob sie in GRÜN sind.
falls x1;y1 grün ist -> (dollerzeichen)folge = 1
falls x2;y2 grün ist -> (dollerzeichen)folge = 2
falls x3;y3 grün ist -> (dollerzeichen)folge = 3