Jump to content

Hey pros please help noob


Recommended Posts

Ok i wented to set up a script that finds the color Yellow and keeps clicking on it until i use the hotkey to stop it

The script should start when i press the hotkey Pause and should stop when i press the hot key pause. Can someone please look at my code and edit it to do the following:

start when the hotkey pause is pressed, works

Find color Yellow, not working pressing other colors too, is not finding yellow. (fix that part too please)

Left click it until stoped, doesnt work for me it wont stop pressing

MY Code

HotKeySet("{Pause}", "_click")

While 1

sleep(5000)

WEnd

Func _click()

While 2

$search = PixelSearch(0,0,1018,736,16776960,5)

If Not @error Then

$Coord = PixelSearch( 1, 1,748,1024, 0xFFFF00 ) ; 0x0000... its the color u want

If IsArray($Coord) Then MouseClick("Left",$Coord[0], $Coord[1],1,0) ;This is where you add your own code.

ConsoleWrite("Found pixel matching color, X: "&$search[0]&" Y: "&$search[1]&@crlf)

EndIf

WEnd

Endfunc

Edited by Killzone21
Link to comment
Share on other sites

HotKeySet("{PAUSE}", "_click")
HotKeySet("{END}", "_stop")

Global $Started = False

While 1 ; I don't know why your using 2
    Sleep(100)
Wend

Func _Stop()
    If $started = true Then
        $started = False
        ConsoleWrite("Stopped script.")
    Endif
EndFunc

Func _Click()
    Local $search = 0
    Local $coord = 0
    If $Started = False then ;Let's start the script
        $started = true ;toggles the start
        While $Started = true
        $search = PixelSearch(0, 0, 1018, 736, 16776960, 5)
            If not @error Then ; Woohoo, found pixel/color
                $Coord = PixelSearch(1, 1, 748, 1024, 0xFFFF00)
                If not @error Then
                    MouseClick("left", $coord[0], $coord[1], 1, 0)  ;this is one click, on the coord[0], coord[1]
                                                                    ; the mouse is moved instantly
                    ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf)
                EndIf
            EndIf
        Wend
    EndIf
EndFunc

I believe that should do it, let me know if you need me to explain anything.

Link to comment
Share on other sites

HotKeySet("{PAUSE}", "_click")
HotKeySet("{END}", "_stop")

Global $Started = False

While 1 ; I don't know why your using 2
    Sleep(100)
Wend

Func _Stop()
    If $started = true Then
        $started = False
        ConsoleWrite("Stopped script.")
    Endif
EndFunc

Func _Click()
    Local $search = 0
    Local $coord = 0
    If $Started = False then ;Let's start the script
        $started = true ;toggles the start
        While $Started = true
        $search = PixelSearch(0, 0, 1018, 736, 16776960, 5)
            If not @error Then ; Woohoo, found pixel/color
                $Coord = PixelSearch(1, 1, 748, 1024, 0xFFFF00)
                If not @error Then
                    MouseClick("left", $coord[0], $coord[1], 1, 0)  ;this is one click, on the coord[0], coord[1]
                                                                    ; the mouse is moved instantly
                    ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf)
                EndIf
            EndIf
        Wend
    EndIf
EndFunc

I believe that should do it, let me know if you need me to explain anything.

Thx man the code works perfect!! but am creating a aimbot for a game named Paintball 2.0, standalone verison of moded quake. Anyways when ever i run the code the mouse wont go directly to there clothes, aim at them. But for all other things other then the game it works perfect. can u help me with the game thou. I will give u the pictures this game uses as texture

Link to comment
Share on other sites

am creating a aimbot for a game known as paintball 2.0, standalone verision of Quake. Here is my following code

HotKeySet("{PAUSE}", "_click")

HotKeySet("{END}", "_stop")

Global $Started = False

While 1

Sleep(100)

Wend

Func _Stop()

If $started = true Then

$started = False

ConsoleWrite("Stopped script.")

Endif

EndFunc

Func _Click()

Local $search = 0

Local $coord = 0

If $Started = False then ;Let's start the script

$started = true ;toggles the start

While $Started = true

$search = PixelSearch(0, 0, 1018, 736, 16776960, 5)

If not @error Then ; Woohoo, found pixel/color

$Coord = PixelSearch(1, 1, 748, 1024, 0x3256B6 )

If not @error Then

MouseClick("left", $coord[0], $coord[1], 1, 0) ;this is one click, on the coord[0], coord[1]

; the mouse is moved instantly

ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf)

EndIf

EndIf

Wend

EndIf

EndFunc

The function of this code is to aim and mouse click on a pixel color i choose. I decided to choose the color blue to aim for and click on. So i set the code 3256B6, blue, to find and click. But for some reason it wont click on it, in game, it does click on the color when am viewing the image, The Game Doesn't Have Any protection Against Hacks!!!. this game doesn't block anything, i set the color to find brown and it did inside the game. But when i set it to blue it wont click on the player. Can someone please Edit this code so it will search and click on for the following colors, pictures on bottom.

Here is what the game uses as texture for the characters. Please set up my code so it could detect one of the colors. and if anyone could can u make the script search for blue, exp: if it cant find light blue it searches for dark blue, Different shades of blue. This aimbot does not go against the Terms of use of the game! this game is a free ware and is totally editable. Link of the game http://digitalpaint.planetquake.gamespy.com/news.php

Edited by Killzone21
Link to comment
Share on other sites

am creating a aimbot for a game known as paintball 2.0, standalone verision of Quake. Here is my following code

HotKeySet("{PAUSE}", "_click")

HotKeySet("{END}", "_stop")

Global $Started = False

While 1

Sleep(100)

Wend

Func _Stop()

If $started = true Then

$started = False

ConsoleWrite("Stopped script.")

Endif

EndFunc

Func _Click()

Local $search = 0

Local $coord = 0

If $Started = False then ;Let's start the script

$started = true ;toggles the start

While $Started = true

$search = PixelSearch(0, 0, 1018, 736, 16776960, 5)

If not @error Then ; Woohoo, found pixel/color

$Coord = PixelSearch(1, 1, 748, 1024, 0x3256B6 )

If not @error Then

MouseClick("left", $coord[0], $coord[1], 1, 0) ;this is one click, on the coord[0], coord[1]

; the mouse is moved instantly

ConsoleWrite("Found pixel matching color, X: " & $search[0] & " Y: " & $search[1] & @crlf)

EndIf

EndIf

Wend

EndIf

EndFunc

The function of this code is to aim and mouse click on a pixel color i choose. I decided to choose the color blue to aim for and click on. So i set the code 3256B6, blue, to find and click. But for some reason it wont click on it, in game, it does click on the color when am viewing the image, The Game Doesn't Have Any protection Against Hacks!!!. this game doesn't block anything, i set the color to find brown and it did inside the game. But when i set it to blue it wont click on the player. Can someone please Edit this code so it will search and click on for the following colors, pictures on bottom.

Here is what the game uses as texture for the characters. Please set up my code so it could detect one of the colors. and if anyone could can u make the script search for blue, exp: if it cant find light blue it searches for dark blue, Different shades of blue. This aimbot does not go against the Terms of use of the game! this game is a free ware and is totally editable. Link of the game http://digitalpaint.planetquake.gamespy.com/news.php

Link to comment
Share on other sites

I think that the game lightning and shadows are changing the colors, have you tried to increase the shade-variation range from 5 to for ex. 25 or higher ?? p.s-or add this parametr to the second search (coord)

Edited by Uriziel01
Link to comment
Share on other sites

  • Moderators

Lets keep to one topic for the same subject, 3 separate posts are a bit rediculous when they all pertain to the same thing.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...