| View previous topic :: View next topic |
| Author |
Message |
~tex Newbie cheater
Reputation: 0
Joined: 28 Dec 2008 Posts: 13
|
Posted: Wed Jan 07, 2009 4:52 pm Post subject: [AutoIt] Search for color + click function |
|
|
I use a more complicated version in my Runescape bots but this is a simple base to a color finder + clicker. Put hex color in $treecolor. fill out secondtree and treeclicks as well.
| Code: | ;;;;;Search Color+Click;;;;;
Func choptree()
;;;Variables
global $secondtree = "seconds to wait in between tree clicks"
global $treeclicks = "How many times to click trees"
global $treecolor = "Color to click here (hex)"
;;;Random Variables
$rand2 = random(1000,1200)
$rand3 = random(1,10)
$rand4 = random(1,10)
$oftrips = 0
;;;;;;;;;;;;;;;
sleep($rand2)
do
Do
$treepixel = PixelSearch(0, 0, 1279, 1023, $treecolor); Search for color
If @error Then
Do
$treepixel = PixelSearch(0, 0, 1279, 1023, $treecolor)
Until not @error
EndIf
Until Not @error
mouseclick("left",$treepixel[0] + $rand3, $treepixel[1] + $rand4) ;clicks color
sleep($secondtree * 1000)
$oftrips = $oftrips + 1
until $oftrips = $treeclicks
EndFunc
;;;;;;;;;;;;;;;; |
|
|
| Back to top |
|
 |
blackmorpheus Expert Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 159
|
Posted: Fri Jan 09, 2009 2:32 am Post subject: |
|
|
what language is this?
|
|
| Back to top |
|
 |
Zerith Master Cheater
Reputation: 1
Joined: 07 Oct 2007 Posts: 468
|
Posted: Fri Jan 09, 2009 3:02 am Post subject: |
|
|
| This is the General programming forum, not the General scripting forum.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Jan 09, 2009 3:56 am Post subject: |
|
|
| Zerith wrote: | | This is the General programming forum, not the General scripting forum. |
it's fine.
|
|
| Back to top |
|
 |
~tex Newbie cheater
Reputation: 0
Joined: 28 Dec 2008 Posts: 13
|
Posted: Fri Jan 09, 2009 2:47 pm Post subject: |
|
|
| Zerith wrote: | | This is the General programming forum, not the General scripting forum. |
| Quote: | | A scripting language, script language or extension language, is a programming language that allows some control of a single or many software application(s). |
Suck my scripting nuts
|
|
| Back to top |
|
 |
|