Jump to content

Color Choose


Recommended Posts

i am trying to update my BOT that i made my first time

well i need a bit like this

i make it for an game

if i am in the game and i press hunt then there come a little dialog with a green yellow red or black MOBS

so i want to make a check box with colors green yellow red and black

and if i check the green check box on and let the bot going to start that he only search for the green MOBS and then click on it

but if i choose for the green and yellow that he only search for green and yellow then click on it and fight against it

could some one please help me with it

Link to comment
Share on other sites

well oke but i know how to make the check box thing only not how to make the if green then only press green but i go show you

#include <GUIConstants.au3>
HotKeySet("{ESC}", "quit")

GUICreate("BOT V1.1",300,300 ); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW); will display an empty dialog box


$widthCell=300
GUICtrlCreateLabel ("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GUICtrlCreateLabel ("druk op start om de BOT te laten beginnen",10, 45, $widthCell)
GUICtrlCreateLabel ("druk een keer Esc om de BOT te laten stoppen",10,60, $widthCell)

Opt("GUICoordMode",3)
$start = GUICtrlCreateButton ("start", 100, 250,50)

GUISetState (); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then Exit
If $msg = $start Then ExitLoop

Wend


While 2
MouseMove (900, 700, 50)
MouseClick ("left", 900,700,2,50)
MouseMove (980, 670, 50)
Mouseclick ("left",980,670,2,80)
WEnd

Func quit()
Exit
EndFunc
Link to comment
Share on other sites

well i did change it now look to script now

#include <GUIConstants.au3>
HotKeySet("{ESC}", "quit")

GUICreate("BOT V1.1",300,300 ); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW); will display an empty dialog box


$widthCell=300
GUICtrlCreateLabel ("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GUICtrlCreateLabel ("druk op start om de BOT te laten beginnen",10, 45, $widthCell)
GUICtrlCreateLabel ("druk een keer Esc om de BOT te laten stoppen",10,60, $widthCell)

Opt("GUICoordMode",3)
$start = GUICtrlCreateButton ("start", 100, 250,50)
GUICtrlCreateCheckbox("green",100,100)
GUICtrlCreateCheckbox("yellow",100,125)
GUICtrlCreateCheckbox("red" ,100,150)
GUICtrlCreateCheckbox("black",100,175)
GUISetState (); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then Exit
If $msg = $start Then ExitLoop

Wend


While 2
MouseMove (900, 700, 50)
MouseClick ("left", 900,700,2,50)
MouseMove (980, 670, 50)
Mouseclick ("left",980,670,2,80)
WEnd

Func quit()
Exit
EndFunc

now i only need is that he look only for the color and click it if i choose the color

Link to comment
Share on other sites

you need to learn about

1

Guictrlread... for the checked box

2

pixelsearch...

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

example

if BitAnd(GUICtrlRead($Item),$GUI_CHECKED) = $GUI_CHERCKED then
$my_color = 0xFF0000
endif

$var = PixelSearch( 0, 0, 20, 300, $my_color )
If Not @error Then MouseClick("left", $var[0], $var[1])

8)

NEWHeader1.png

Link to comment
Share on other sites

1 time

#include <GUIConstants.au3>
HotKeySet("{ESC}", "quit")

GUICreate("BOT V1.1",300,300 ); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW); will display an empty dialog box


$widthCell=300
GUICtrlCreateLabel ("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GUICtrlCreateLabel ("druk op start om de BOT te laten beginnen",10, 45, $widthCell)
GUICtrlCreateLabel ("druk een keer Esc om de BOT te laten stoppen",10,60, $widthCell)

Opt("GUICoordMode",3)
$start = GUICtrlCreateButton ("start", 100, 250,50)
GUICtrlCreateCheckbox("green",100,100)
GUICtrlCreateCheckbox("yellow",100,125)
$Red_box = GUICtrlCreateCheckbox("red" ,100,150)
GUICtrlCreateCheckbox("black",100,175)
GUISetState (); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then Exit

If $msg = $start Then 
    if BitAnd(GUICtrlRead($Red_box),$GUI_CHECKED) = $GUI_CHECKED then
    $my_color = 0xFF0000
    ExitLoop
    EndIf
EndIf
Wend


;While 2
;MouseMove (900, 700, 50)
;MouseClick ("left", 900,700,2,50)
;MouseMove (980, 670, 50)
;Mouseclick ("left",980,670,2,80)
;WEnd

While 3
$var = PixelSearch( 0, 0, 900, 700, $my_color )
If Not @error Then MouseClick("left", $var[0], $var[1])
WEnd



Func quit()
Exit
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

why do you use while 3?? and not 1?

It doesnt matter what non-zero number you use as your While expression.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...