[TUTORIAL] How to make a BOT

02/18/2010 20:46 Xereon#31
Quote:
Originally Posted by Tim-xD View Post
Here i made a sample script :
Code:
HotKeySet("a", "function1") ;change to your keys
HotKeySet( "d" , "function2" )

While 1
	Sleep (1)
WEnd
Func function1()
	While 1
		Sleep(600000) ; The 10 minutes
		Send ( "{F1}" )
	WEnd
EndFunc

Func function2()
	While 1
		Sleep (5000)
	MouseClick("right") ; You can add cordinates if you want
	Wend
EndFunc

;sorry for my bad english i'm german ^^
Edit : So it wont work ?
yes it wont work on this way.
02/18/2010 20:50 iTim#32
@Xereon
ok thx ,
but can you tell me a way how to make something like this ?
i just made bots with one function so i don't know ^^
02/21/2010 05:29 sidoausmblock#33
i need to know how to make a bot who pushes F1 or F9 i only can push single letters like z or b but i wanna F1-F12 keys How to make it? Pls HELP ME
02/21/2010 17:56 ax5#34
Quote:
Originally Posted by sidoausmblock View Post
i need to know how to make a bot who pushes F1 or F9 i only can push single letters like z or b but i wanna F1-F12 keys How to make it? Pls HELP ME
Something like this may be :mofo:


Quote:
Send ("{F1}")
Send ("{F12}")
02/21/2010 20:34 Theri#35
Quote:
Originally Posted by sidoausmblock View Post
i need to know how to make a bot who pushes F1 or F9 i only can push single letters like z or b but i wanna F1-F12 keys How to make it? Pls HELP ME
Send("{F1}"), etc.
02/21/2010 21:31 ax5#36
Quote:
Originally Posted by Theri View Post
Send("{F1}"), etc.
Thanks small mistake :mofo:
02/21/2010 23:27 sidoausmblock#37
Ty it Works Love You Guys
02/22/2010 14:50 kupzz#38
hi i would like to ask how to use the pixel search is that a program in autoit? how can i know the coordinates and color?
02/22/2010 15:21 ax5#39
Quote:
Originally Posted by kupzz View Post
hi i would like to ask how to use the pixel search is that a program in autoit? how can i know the coordinates and color?
Its a function in autoit not a program.


Quote:
PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] )

left - left coordinate of rectangle.
top - top coordinate of rectangle.
right - right coordinate of rectangle.
bottom - bottom coordinate of rectangle.
color - 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.
hwnd - [optional] Window handle to be used.
[Only registered and activated users can see links. Click Here To Register...]

Good luck:mofo:
02/22/2010 15:58 kupzz#40
ohhh -.- can u give me example what will i put on the script? how it works? do i need to put a script?
02/22/2010 16:47 ax5#41
Quote:
Originally Posted by kupzz View Post
ohhh -.- can u give me example what will i put on the script? how it works? do i need to put a script?
Please try search on autoit forums and google

Quote:
$coord = PixelSearch( 0, 0, 100, 300, 0x000000 )
If Not @error Then
MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

OK so thats about it..
$coord is an array, [0]=x [1]=y
Quote:
$coord = PixelSearch( 0, 0, 100, 300, 0x000000 )
If Not @error Then
Send("{q}")
EndIf
03/10/2010 01:04 schlat#42
Quote:
Originally Posted by Theri View Post
Image search should work on all non-64 bit operating systems.



They are not the same thing.
Quote:
Originally Posted by Theri View Post
I understand your point and they still are not the same thing, I simply have to assume you've never read the source code for image search from ahk or have used image search yourself.

Pixelchecksum has its uses, want to know if the pixels in an area changed? Great, use it. That's what its for. Looking for a particular picture on screen, and in most of our contexts, in game? Well good luck with that. It takes a decent amount of tolerance when matching images and you want to use a function that returns a strict checksum to determine if your image is on screen. I've not played with the function but even trying to compare the same image to itself with image search it never matches with 0 tolerance. With image search you can define any color to be transparent and ignored in the matching and you're not going to get that with pixelchecksum.

Also, to use the checksum, you're going to what? Screen shot, and cut out the image you want and then get your checksum for the image? Then set a variable in your main script and look for it. Ok, so is this image you're looking for in one place all the time? No? Ok so now you're going to write loops to search the whole screen or areas of the screen? If your image that you got a checksum for can appear any where on screen or in a smaller area you're going to have to start searching in one spot then increment over 1 or 2 pixels at a time, reach the end of the line from left to right and then if needed move back to X origin and down the y axis to continue the process. I'd be willing to wager money that is far more time intensive than just using image search in this context.

I'd be more than happy to see a coded example that proves the built in checksum search would be faster to find an image on screen than image search.
yep u right, checksum checks on a static way. with image search u can find pics with tolerance like transparence which gives u higher success on finding a simalar pic if the camera, colour or weather is changing.

About speed in detection: the checksum should be a little bit faster (if u can use), because the image search must recalculate much bytes if u use tolerance, transparence of colours.

u can use image search on 64bit system too, but u must compile it at x86 (autoit script). k thats not 64bit, but works on 64bit system like win7 or ubuntu.

i am using on my own bot in some cases image search, but i am not happy with that "pixel search similar functions" couse it slow downs every bot...like the lovely sleep() function everyone want use.
03/10/2010 16:55 gobear#43

i can understand a little bit...
while used if the function right... if not do nothing...
i confused on...mouse get pos...
if we know the colour why use mouse getpos
ask..how to do @ my attcment
if green bar over brown i press space 8x
thx 4 ur help..
03/15/2010 08:24 cupcupmuach#44
can u hep me tu make a bot for auto click??
for exsample : a target just stand not walk. in shortcut keyboard "F3" i put the Skill.
then can it auto click to the target??
help mee
03/15/2010 15:57 ax5#45
Quote:
Originally Posted by cupcupmuach View Post
can u hep me tu make a bot for auto click??
for exsample : a target just stand not walk. in shortcut keyboard "F3" i put the Skill.
then can it auto click to the target??
help mee
you need to know the coordinates off all monsters if you use image search you need all angles :mofo: