Sign in to follow this  
Followers 0
go0b3r

press tab until....

9 posts in this topic

ok heres what id like to do. I know the basic commands, but dont know how to put it all together. I need it to (pixlesearch( 412, 35, 505, 47, 0x6CAD00 ) and i need it to press Tab UNTIL it finds that color, then it needs to press Q. Also on a side note. if im making it check the hp bar, how can i make it tell if my hp is low? Heres the info on the hp bar. (pixlesearch( 6, 40, 13, 145, FF0029 ) then when it sees that its like 1/2 full to press X, wait 3 seconds, and press 1. Also ( i know this is getting confusing) but i need it to then wait 16 seconds, and press X again until the hp bar is full. This script is WAY over my head lol, i know how i want it to work but dont know how to put it together. ty for any help

Share this post


Link to post
Share on other sites



do you have anything started

show us what you have so far

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

do you have anything started

show us what you have so far

8)

just the pixle searches unfortunatly :)

to make it send tab over and over do i do something like this?

do

send( {tab} )

sleep(1000)

Until $color = 1

sorry im terrible with this stuff, hell i dont even know what the color = 1 thing means lol, ive seen ppl do it so im guessing i need to. plz help i seriously dont know where to start.

Share this post


Link to post
Share on other sites

You should definately read the tutorial and try Valuator's AutoIt 123... then try some practice stuff before you try to actually make something work for your game.

Gotta Walk Before You Run...


[center]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.[/center]

Share this post


Link to post
Share on other sites

I dont know, if it works, but anyway, here it is:

Do
    $pix = pixelsearch( 412, 35, 505, 47, 0x6CAD00 )
    send("{TAB}")
Until $pix = 1
Send("Q")
If PixelGetColor(6, 80) <> "16711721" Then
    Send("X")
    Sleep(3000)
    Send("1")
    Do
        Send("X")
        $pix = PixelGetColor(6, 144)
    Until $pix = "16711721"
EndIf

I think it wont work...

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I dont know, if it works, but anyway, here it is:

Do
    $pix = pixelsearch( 412, 35, 505, 47, 0x6CAD00 )
    send("{TAB}")
Until $pix = 1
Send("Q")
If PixelGetColor(6, 80) <> "16711721" Then
    Send("X")
    Sleep(3000)
    Send("1")
    Do
        Send("X")
        $pix = PixelGetColor(6, 144)
    Until $pix = "16711721"
EndIf

I think it wont work...

ty for trying, ill test it out

edit: nope didn't work :) ty anyways

Edited by go0b3r

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I dont know, if it works, but anyway, here it is:

Do
    $pix = pixelsearch( 412, 35, 505, 47, 0x6CAD00 )
    send("{TAB}")
Until $pix = 1
Send("Q")
If PixelGetColor(6, 80) <> "16711721" Then
    Send("X")
    Sleep(3000)
    Send("1")
    Do
        Send("X")
        $pix = PixelGetColor(6, 144)
    Until $pix = "16711721"
EndIf

I think it wont work...

Why use a heximal 0x6CAD00 then a Decimal 16711721?
Do
    $pix = pixelsearch( 412, 35, 505, 47, 0x6CAD00 )
    send("{TAB}")
Until IsArray($pix)
:) Edited by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

i know the color/set is not perfect .. but this should help

; Press Esc to terminate script, Pause/Break to "pause"

#include <GuiConstants.au3>

Global $Paused, $Go, $begin

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

; When check box is marked, call function "Go"
While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then Exit
    
    $ans = PixelSearch( 412, 35, 505, 47, 0x6CAD00 ) 
    If Not @error Then
        Send("Q",1)
    Else
        Send("{TAB}")
    EndIf
    
    If PixelGetColor( 6, 40) = 0xFF0029 Then
        Send("X",1)
        Sleep(3000)
        Send("1",1)
        $Go = 1
        $begin = TimerInit()
    EndIf
    
    If $Go Then Go()
    
WEnd

; =================== Functions =============

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   

Func Go()
    $dif = TimerDiff($begin)
    If $dif >= 16000 Then
        If PixelGetColor(6, 40) = 0xFF0029 Then
            Send("X", 1)
            $begin = TimerInit()
        Else
            $Go = 0
        EndIf
    EndIf
EndFunc  

Func Terminate()
    Exit
EndFunc

just bored..

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I stand by my post of "Do the tutorials" rather than waisting time on something you don't even know how to edit to suit your needs.


[center]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.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0