Thread Rating:
  • 25 Vote(s) - 2.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My choco racing loop AHK
#1
You'll have to adjust for your UI and colors/positions and such. I borrowed a few things from around the gold saucer post to help me with this, so thank you for your input users! This has run flawlessly for me.

Semicoloned lines for different things you might want to do depending on your choco rating.
Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
WinGet, programid, List, FINAL FANTASY

CoordMode, ToolTip, Screen

; Control S to Start
^S::
looping=true
Loop
{
Queue:
    if looping=false
    break
    tooltip, `nCurrent Race # : %A_Index%`n, 0, 0
; Create Window Tool Tip to show # of Races
           sleep 1200
           ControlSend,,{Numpad0}, ahk_id %programid1%
           Sleep 1200
        ControlSend,,{Numpad0}, ahk_id %programid1%
           Sleep 1200
        ControlSend,,{Numpad0}, ahk_id %programid1%
           Sleep 1200
        ControlSend,,{Numpad0}, ahk_id %programid1%
           Sleep 1200
;    ControlSend,,{Numpad2}, ahk_id %programid1%
;    Sleep 1200
        ControlSend,,{Numpad0}, ahk_id %programid1%
          Sleep 1200
;    ControlSend,,{Numpad2}, ahk_id %programid1%
;    Sleep 1200
;    ControlSend,,{Numpad2}, ahk_id %programid1%
;    Sleep 1200
        ControlSend,,{Numpad0}, ahk_id %programid1%
           Sleep 1200
        ControlSend,,{Numpad4}, ahk_id %programid1%
           Sleep 1000
        ControlSend,,{Numpad0}, ahk_id %programid1%
        loop
    {
        sleep 1000
            PixelGetColor, color, 2931, 971
               if color = 0xd1dbde
        {
                    Sleep 5000
                       ControlSend,,{Numpad0}, ahk_id %programid1%
                   break
            }
               else    
               {
                   Sleep 500
                    continue
        }
    }
; Race Joined Wait to Skip Cutscene
    sleep, 15000
    ControlSend, , {Esc}, ahk_id %programid1%
    sleep, 2000
    ControlSend, , {Numpad0}, ahk_id %programid1%
    sleep, 18000
; Cutscene Skipped
; Wait to see Stamina Bar
    loop
    {
        PixelGetColor, color, 2030, 1124
        if color = 0x67dfff
        {
; Take the left lane if thats the fastest, else add semicolons
            ControlSend,,{a down}, ahk_id %programid1%
            sleep 3000
            ControlSend,,{a up}, ahk_id %programid1%
            break
        }
        else
        {
            continue
        }
    }
; Sprint until 10 percent and break in case stamina stays above 10% at race end
    loop
    {
        PixelGetColor, color, 2030, 1124
        if (color = 0x0b110b or color = 0x000000)
        {
            ControlSend,,{w up}, ahk_id %programid1%
            break
        }
        else
        {
            sleep 2000
            ControlSend,,{w down}, ahk_id %programid1%
            ControlSend,,{1}, ahk_id %programid1%
            continue
        }
    }
; Wait for race results screen to pop
    loop
    {
        PixelGetColor, color, 571, 359
        if (color = 0xd1dbdd or color = 0x000000)
        {
            Sleep 10000
            ControlSend,,{Numpad0}, ahk_id %programid1%
            Sleep 500
            ControlSend,,{Numpad0}, ahk_id %programid1%
            Sleep 10000
            break
        }
        else    
        {
            Sleep 1500
            continue
        }
    }
}

; ALT S to STOP
!s::
looping=false
Reply
 


Messages In This Thread
My choco racing loop AHK - by Chunky - 03-18-2015, 06:37 PM
RE: My choco racing loop AHK - by brooklynbase - 03-18-2015, 08:01 PM
RE: My choco racing loop AHK - by bauer6644 - 03-18-2015, 08:32 PM
RE: My choco racing loop AHK - by brooklynbase - 03-18-2015, 09:02 PM
RE: My choco racing loop AHK - by brooklynbase - 03-18-2015, 10:45 PM
RE: My choco racing loop AHK - by Chunky - 03-19-2015, 06:09 PM
RE: My choco racing loop AHK - by Jeeta - 03-20-2015, 12:20 AM
RE: My choco racing loop AHK - by brooklynbase - 03-20-2015, 12:55 AM
RE: My choco racing loop AHK - by smils - 03-20-2015, 11:19 AM
RE: My choco racing loop AHK - by Jeeta - 03-20-2015, 02:07 PM
RE: My choco racing loop AHK - by Chunky - 03-20-2015, 02:44 PM
RE: My choco racing loop AHK - by Jeeta - 03-20-2015, 03:05 PM
RE: My choco racing loop AHK - by Jeeta - 03-20-2015, 10:31 PM
RE: My choco racing loop AHK - by Chunky - 03-20-2015, 11:00 PM
RE: My choco racing loop AHK - by Cichard - 03-21-2015, 02:22 AM
RE: My choco racing loop AHK - by Rustyclippers - 03-21-2015, 08:20 AM
RE: My choco racing loop AHK - by Chunky - 03-21-2015, 04:09 AM
RE: My choco racing loop AHK - by Cichard - 03-21-2015, 04:21 AM
RE: My choco racing loop AHK - by Chunky - 03-21-2015, 05:45 AM
RE: My choco racing loop AHK - by edb6377 - 03-22-2015, 10:53 AM
RE: My choco racing loop AHK - by Jeeta - 03-22-2015, 06:06 PM
RE: My choco racing loop AHK - by zhangxi689 - 03-23-2015, 06:30 AM
RE: My choco racing loop AHK - by thomasklij - 03-26-2015, 02:41 PM
RE: My choco racing loop AHK - by Tru14 - 03-26-2015, 07:41 PM
RE: My choco racing loop AHK - by edb6377 - 03-27-2015, 01:51 PM
RE: My choco racing loop AHK - by Tru14 - 03-28-2015, 04:50 PM
RE: My choco racing loop AHK - by Tru14 - 03-31-2015, 03:11 PM
RE: My choco racing loop AHK - by Cichard - 03-31-2015, 04:28 PM
RE: My choco racing loop AHK - by KaWeNGoD - 03-31-2015, 11:38 PM
RE: My choco racing loop AHK - by edb6377 - 04-01-2015, 11:20 AM
RE: My choco racing loop AHK - by Cichard - 04-01-2015, 05:54 PM
RE: My choco racing loop AHK - by Rustyclippers - 04-02-2015, 03:45 PM
RE: My choco racing loop AHK - by Cichard - 04-06-2015, 02:30 PM
RE: My choco racing loop AHK - by edb6377 - 04-06-2015, 03:20 AM
RE: My choco racing loop AHK - by darkcatcat - 03-31-2015, 05:40 PM
RE: My choco racing loop AHK - by lantus - 03-31-2015, 06:22 PM
RE: My choco racing loop AHK - by Tru14 - 03-31-2015, 08:53 PM
RE: My choco racing loop AHK - by lantus - 04-01-2015, 01:45 AM
RE: My choco racing loop AHK - by duo424 - 04-01-2015, 05:06 AM
RE: My choco racing loop AHK - by Rustyclippers - 04-06-2015, 03:40 PM
RE: My choco racing loop AHK - by Cichard - 04-06-2015, 03:53 PM
RE: My choco racing loop AHK - by Rustyclippers - 04-06-2015, 04:06 PM
RE: My choco racing loop AHK - by Cichard - 04-07-2015, 01:06 AM
RE: My choco racing loop AHK - by Rustyclippers - 04-07-2015, 01:41 AM
RE: My choco racing loop AHK - by Cichard - 04-07-2015, 01:42 AM
RE: My choco racing loop AHK - by Chunky - 04-06-2015, 10:30 PM
RE: My choco racing loop AHK - by Rustyclippers - 04-07-2015, 02:00 AM
RE: My choco racing loop AHK - by Cichard - 04-07-2015, 04:08 AM
RE: My choco racing loop AHK - by Rustyclippers - 04-07-2015, 08:09 AM
RE: My choco racing loop AHK - by Cichard - 04-07-2015, 12:28 PM
RE: My choco racing loop AHK - by Rustyclippers - 04-07-2015, 07:09 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products