Thread Rating:
  • 30 Vote(s) - 2.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chocobo AHK
#1
Updating Chocobo AHK Macro: Couldn't update the forum in downloads unfortunately as permission was denied so recreated this.

** Adjustment **
Changed the break when results screen pops to negate the more or less stam issue. It will break when it sees the screen pop irregardless.
Changed Loop to be a bit more efficient

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance force    ;Skips the dialog box and replaces the old instance automatically
#Persistent

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, Pixel, Screen
;Initial state is Relative. Frustration awaits if you set Mouse to Screen and then use GetPixelColor because you forgot this line. There are separate ones for: Mouse, Pixel, ToolTip, Menu, Caret

; Control S to Start
^S::
looping=true
Loop
{
Queue:
    if looping=false
    break
        tooltip, Current Race # : %A_Index%`n, 0, 0, 1 ;Create Window Tool Tip to show # of Races
        tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
        StatusTip := "Asking for Race"
        tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
        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,,{Numpad0}, ahk_id %programid1%
        Sleep 1200
        ControlSend,,{Numpad0}, ahk_id %programid1%
        Sleep 1200
        ControlSend,,{Numpad4}, ahk_id %programid1%
        Sleep 1000
        ControlSend,,{Numpad0}, ahk_id %programid1%
        StatusTip := "Waiting for Race Ready"
                tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
        loop
        {
        sleep 1000
        ; Look for Purple Balloon in Race Ready
        PixelGetColor, color, 1560, 510
        tooltip, Race Ready Color: %color%`n, 0, 50, 3 ;Create Window Tool Tip to show color at location
        if color = 0xD6226B
        {
            StatusTip := "Race Ready"
                    tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
            Sleep 2000
               ControlSend,,{Numpad0}, ahk_id %programid1%
            Sleep 2000
            ControlSend,,{Numpad0}, ahk_id %programid1%
            break
        }
        else    
        {
                    Sleep 500
                    continue
        }
    }
    StatusTip := "Joined Race"
            tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
; Race Joined Wait to Skip Cutscene
    sleep, 13000
    ControlSend, , {Esc}, ahk_id %programid1%
    sleep, 2000
    ControlSend, , {Numpad0}, ahk_id %programid1%
    sleep, 14000
; Cutscene Skipped
    StatusTip := "Finding Stamina Bar"
            tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status

; Sprint until 10 percent and break in case stamina stays above 10% at race end
    loop
    {
        ; check for break color at the race results section.  If race results is up break the whole thing.
        ; should match color in the race results portion @ line 132
        PixelGetColor, colorbreak, 892, 380
        if (colorbreak = 0x3DB3C6) {
                break
        }
        ; Look at stam bar around 15% marker and if the background turns to Black/Stam Bar Empty Color
        ; Then raise on W.  Two values are base on flashes of bar BLACK/Color of empty spot at 15%
        ; This also means it will resume pressing on the key if it gets a stam boost
        PixelGetColor, color, 783, 983
        tooltip, Stam Color: %color%`n, 0, 50, 3 ;Create Window Tool Tip for Stam Sprint/Walk Color
        ; Check Stamina Color
        if (color = 0x101418)
        {
            StatusTip := "WALKING"
            tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
            ControlSend,,{w up}, ahk_id %programid1%
              ControlSend,,{1}, ahk_id %programid1%
        }
        else
        {
            StatusTip := "SPRINTING"
                    tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
            ;Press W Down otherwise
            sleep 2000
            ControlSend,,{w down}, ahk_id %programid1%
            PixelGetColor, colorbreak, 892, 380 ; check for break color at the race results section.  If race results is up break the whole thing.
            ControlSend,,{1}, ahk_id %programid1%
            ControlSend,,{2}, ahk_id %programid1%
            ControlSend,,{3}, ahk_id %programid1%
        }
    }
; Wait for race results screen to pop
    loop
    {
    StatusTip := "Waiting for Race Results"
            tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
        PixelGetColor, color, 892, 380
        tooltip, Race CompleteColor: %color%`n, 0, 50, 3 ;Create Window Tool Tip to show color at location
; Look for Yellow XP Coin on Race Complete Screen
        if (color = 0x3DB3C6)
        {
            StatusTip := "Race Complete"
                    tooltip, Status: %StatusTip%`n, 0, 25, 2 ;Create Window Tool Tip for Status
            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
Chocobo AHK - by edb6377 - 04-13-2015, 07:04 AM
RE: Chocobo AHK - by KaWeNGoD - 04-13-2015, 07:14 AM
RE: Chocobo AHK - by edb6377 - 04-13-2015, 07:16 AM
RE: Chocobo AHK - by jony_stunner - 04-13-2015, 12:02 PM
RE: Chocobo AHK - by Night2020 - 04-13-2015, 12:24 PM
RE: Chocobo AHK - by KaWeNGoD - 04-13-2015, 12:28 PM
RE: Chocobo AHK - by imabothonest - 04-13-2015, 06:27 PM
RE: Chocobo AHK - by KaWeNGoD - 04-13-2015, 06:30 PM
RE: Chocobo AHK - by imabothonest - 04-13-2015, 07:37 PM
RE: Chocobo AHK - by KaWeNGoD - 04-13-2015, 09:39 PM
RE: Chocobo AHK - by bumpouz - 04-13-2015, 11:21 PM
RE: Chocobo AHK - by dNh301 - 04-14-2015, 12:39 AM
RE: Chocobo AHK - by KaWeNGoD - 04-14-2015, 07:08 AM
RE: Chocobo AHK - by imabothonest - 04-14-2015, 07:22 AM
RE: Chocobo AHK - by imabothonest - 04-14-2015, 08:45 AM
RE: Chocobo AHK - by KaWeNGoD - 04-14-2015, 09:34 AM
RE: Chocobo AHK - by bandit420 - 04-14-2015, 09:49 AM
RE: Chocobo AHK - by KaWeNGoD - 04-14-2015, 10:04 AM
RE: Chocobo AHK - by bandit420 - 04-14-2015, 12:47 PM
RE: Chocobo AHK - by bumpouz - 04-14-2015, 07:39 PM
RE: Chocobo AHK - by KaWeNGoD - 04-14-2015, 07:57 PM
RE: Chocobo AHK - by bumpouz - 04-15-2015, 12:25 AM
RE: Chocobo AHK - by Jarrick - 04-15-2015, 04:39 PM
RE: Chocobo AHK - by lilmonkey - 04-15-2015, 01:13 AM
RE: Chocobo AHK - by bumpouz - 04-15-2015, 06:42 PM
RE: Chocobo AHK - by KaWeNGoD - 04-15-2015, 09:23 PM
RE: Chocobo AHK - by bumpouz - 04-16-2015, 12:13 AM
RE: Chocobo AHK - by lilmonkey - 04-16-2015, 03:12 AM
RE: Chocobo AHK - by KaWeNGoD - 04-16-2015, 09:23 AM
RE: Chocobo AHK - by lilmonkey - 04-16-2015, 12:10 PM
RE: Chocobo AHK - by Kugata - 04-18-2015, 04:59 PM
RE: Chocobo AHK - by kagebane - 04-23-2015, 12:28 AM
RE: Chocobo AHK - by samburhan - 04-24-2015, 11:45 PM
RE: Chocobo AHK - by Exerlos - 05-17-2015, 07:01 PM
RE: Chocobo AHK - by Exerlos - 05-18-2015, 05:37 AM
RE: Chocobo AHK - by CleanWipes - 07-13-2015, 06:32 AM
RE: Chocobo AHK - by CleanWipes - 07-17-2015, 04:37 AM
RE: Chocobo AHK - by edb6377 - 07-20-2015, 01:09 PM
RE: Chocobo AHK - by ClamClap - 08-02-2015, 05:33 PM
RE: Chocobo AHK - by ClamClap - 08-10-2015, 01:33 PM
RE: Chocobo AHK - by kitanoi - 08-13-2015, 07:47 AM
RE: Chocobo AHK - by LostZeit - 08-15-2015, 01:37 PM
RE: Chocobo AHK - by ClamClap - 08-15-2015, 07:56 PM
RE: Chocobo AHK - by kitanoi - 08-15-2015, 02:05 PM
RE: Chocobo AHK - by brocklesnar - 08-15-2015, 08:27 PM
RE: Chocobo AHK - by ClamClap - 08-15-2015, 09:07 PM
RE: Chocobo AHK - by Waldstein - 08-15-2015, 08:38 PM
RE: Chocobo AHK - by brocklesnar - 08-15-2015, 09:12 PM
RE: Chocobo AHK - by ClamClap - 08-15-2015, 09:20 PM
RE: Chocobo AHK - by Locust67 - 09-16-2015, 11:39 PM
RE: Chocobo AHK - by azimoto9 - 09-22-2015, 04:41 AM
RE: Chocobo AHK - by timothyhost - 04-27-2016, 05:11 AM
RE: Chocobo AHK - by atmarkham - 09-13-2016, 11:27 AM
RE: Chocobo AHK - by piffles - 12-12-2016, 01:16 PM
RE: Chocobo AHK - by Zero-121 - 01-21-2017, 07:30 PM
RE: Chocobo AHK - by KaWeNGoD - 01-24-2017, 05:09 PM
RE: Chocobo AHK - by zhangxi689 - 01-25-2017, 09:24 PM
RE: Chocobo AHK - by noescape - 07-26-2017, 05:51 AM

Forum Jump:


Users browsing this thread: 10 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products