I have decided to modify ratdo's script (thanks to him and brooklynbase) slightly, namely to fix the issue with the camera spinning out and breaking the script. I have tested this for 30 hours straight with no glaring issues. Changes below if you care about that stuff.
Download link: Here
Download link: Here
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
;
;
; Please read!
; When you modify the script for you setup, be sure
; to leave the "RGB" at the end of the PixelGetColor
; as well as the "0x" before the RGB values
; AHK uses BGR by default, but the Window Spy gives RGB values, so I made it easier to use
;
; I used and modified brooklynbase's script, so huge thanks to him
; Feedback would be appreciated @ http://www.mmominion.com/Thread-Gold-Saucer (script's posted on page 13)
;
; Deck is: Alphinaud, Urianger, Thancred, Y'shtola, Papalymo
;
; -ratdo
;
; Win Z to Start
#Z::
; Create Window Tool Tip to show # of Games
sleep 2000
ControlSend,,{Numpad0}, ahk_id %programid1%
Sleep 2000
ControlSend,,{Numpad0}, ahk_id %programid1%
Sleep 2000
ControlSend,,{Numpad0}, ahk_id %programid1%
Sleep 2000
ControlSend,,{Numpad0}, ahk_id %programid1%
Sleep 2500
ControlSend,,{Numpad0}, ahk_id %programid1%
Sleep 2000
ControlSend,,{Numpad0}, ahk_id %programid1%
Sleep 2000
ControlSend,,{Numpad0}, ahk_id %programid1%
Loop
{
Sleep 10500
; Game started, Alphinaud
{
Sleep 2500
PixelGetColor, color, 1115, 657, RGB ; Put a color with respective coords from empty bottom right
if color = 0xC8C9C1
{
Click, 484, 526 ; Pick up Alphinaud
Sleep 1
Click, 484, 526 ; Pick up Alphinaud
Sleep 1
Click, 1115, 657 ; Drop Alphinaud bottom right
}
else
{
PixelGetColor, color, 980, 658, RGB ; Put a color with respective coords from empty middle bottom
if color = 0xDEDFD6
{
Click, 484, 526 ; Pick up Alphinaud
Sleep 1
Click, 484, 526 ; Pick up Alphinaud
Sleep 1
Click, 980, 658 ; Drop Alphinaud middle bottom
}
else
{
Click, 484, 526 ; Pick up Alphinaud
Sleep 1
Click, 484, 526 ; Pick up Alphinaud
Sleep 1
Click, 844, 658 ; Drop Alphinaud bottom left
}
}
}
Sleep 5500 ; Imperial turn
; Our turn, Urianger
{
Sleep 2500
PixelGetColor, color, 980, 523, RGB ; Put a color with respective coords from empty middle
if color = 0xB9B8AD
{
Click, 598, 521 ; Pick up Urianger
Sleep 1
Click, 598, 521 ; Pick up Urianger
Sleep 1
Click, 980, 523 ; Drop Urianger middle
}
else
{
PixelGetColor, color, 1117, 521, RGB ; Put a color with respective coords from empty middle right
if color = 0xD6D6CB
{
Click, 598, 521 ; Pick up Urianger
Sleep 1
Click, 598, 521 ; Pick up Urianger
Sleep 1
Click, 1117, 521 ; Drop Urianger middle right
}
else
{
Click, 598, 521 ; Pick up Urianger
Sleep 1
Click, 598, 521 ; Pick up Urianger
Sleep 1
Click, 980, 658 ; Drop Urianger middle bottom
}
}
}
Sleep 6000 ; Imperial turn
; Our turn, Thancred
{
Sleep 2500
PixelGetColor, color, 1115, 387, RGB ; Put a color with respective coords from empty top right
if color = 0xB9B8AD
{
Click, 703, 524 ; Pick up Thancred
Sleep 1
Click, 703, 524 ; Pick up Thancred
Sleep 1
Click, 1115, 387 ; Drop Thancred top right
}
else
{
PixelGetColor, color, 978, 385, RGB ; Put a color with respective coords from empty top middle
if color = 0xD6D6CB
{
Click, 703, 524 ; Pick up Thancred
Sleep 1
Click, 703, 524 ; Pick up Thancred
Sleep 1
Click, 978, 385 ; Drop Thancred top middle
}
else
{
Click, 703, 524 ; Pick up Thancred
Sleep 1
Click, 703, 524 ; Pick up Thancred
Sleep 1
Click, 843, 385 ; Drop Thancred top left
}
}
}
Sleep 5500 ; Imperial turn
; Our turn, Yshtola
{
Sleep 2500
PixelGetColor, color, 980, 658, RGB ; Put a color with respective coords from empty middle bottom
if color = 0xDEDFD6
{
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 980, 658 ; Drop Yshtola middle bottom
}
else
{
PixelGetColor, color, 844, 659, RGB ; Put a color with respective coords from empty bottom left
if color = 0xB9B8AD
{
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 844, 659 ; Drop Yshtola bottom left
}
else
{
PixelGetColor, color, 845, 521, RGB ; Put a color with respective coords from empty middle left
if color = 0xD6D6CB
{
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 845, 521 ; Drop Yshtola middle left
}
else
{
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 537, 659 ; Pick up Yshtola
Sleep 1
Click, 845, 385 ; Drop Yshtola top left
}
}
}
}
Sleep 8500 ; Imperial turn
; If Imperial played first, we won't be playing Papalymo, we will set up next game
; Else we will play our last Papalymo card
; Here I used the timer bar in our side to know if we have to play or not, the color & coords are from around 30% of the bar (If it's yellow/green, then we can play, so we play. If not, we don't play)
PixelGetColor, color, 641, 619, RGB
if color = 0x3A5A7A
{
PixelGetColor, color, 844, 659, RGB ; Put a color with respective coords from empty bottom left
if color = 0xB9B8AD
{
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 844, 659 ; Drop Papalymo bottom left
Sleep 6000
}
else
{
PixelGetColor, color, 845, 521, RGB ; Put a color with respective coords from empty middle left
if color = 0xD6D6CB
{
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 845, 521 ; Drop Papalymo middle left
Sleep 6000
}
else
{
PixelGetColor, color, 978, 385, RGB ; Put a color with respective coords from empty top middle
if color = 0xD6D6CB
{
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 978, 385 ; Drop Papalymo top middle
Sleep 6000
}
else
{
PixelGetColor, color, 1117, 521, RGB ; Put a color with respective coords from empty middle right
if color = 0xD6D6CB
{
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 1117, 521 ; Drop Papalymo middle right
Sleep 6000
}
else
{
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 625, 676 ; Pick up Papalymo
Sleep 1
Click, 845, 385 ; Drop Papalymo top left
Sleep 6000
}
}
}
}
}
else
{
Sleep 1
}
PixelGetColor, color, 835, 289, RGB ; Rematch check
if color = 0x474A47
{
Click, 889, 501 ; Rematch button
Sleep 1
Click, 889, 501 ; Rematch button
Sleep 1
Click, 889, 501 ; Rematch button
}
else
{
Sleep 1000
Click, 889, 501 ; Rematch button
Sleep 1
Click, 889, 501 ; Rematch button
Sleep 1
Click, 889, 501 ; Rematch button
}
Sleep 2500
PixelGetColor, color, 911, 578, RGB ; Match info check
if color = 0x4E4E25
{
Click, 870, 644 ; Confirm button
Sleep 1
Click, 870, 644 ; Confirm button
Sleep 1
Click, 870, 644 ; Confirm button
}
else
{
Sleep 1000
Click, 870, 644 ; Confirm button
Sleep 1
Click, 870, 644 ; Confirm button
Sleep 1
Click, 870, 644 ; Confirm button
}
Sleep 2500
PixelGetColor, color, 1052, 387, RGB ; Deck screen check
if color = 0xFEEED9
{
Click, 967, 377 ; First deck selected
Sleep 1
Click, 967, 377 ; First deck selected
Sleep 1
Click, 967, 377 ; First deck selected
}
else
{
Sleep 1000
Click, 967, 377 ; First deck selected
Sleep 1
Click, 967, 377 ; First deck selected
Sleep 1
Click, 967, 377 ; First deck selected
}
}
- Fixed camera spinning issue by adding multiple clicks at certain points
- Removed the use of numpad 0 to restart a match, now checks RGB values to ensure the right menu is up before clicking
- Fixed an issue with cards not being picked up before the placement occurred (biggest culprit of script breaks alongside the camera)
- Changed the way Yshtola's turn plays out, increases winning rate slightly
- Removed the use of numpad 0 from Papalymo's turn, speeds up the game and won't break the script if your mouse moves
- Tweaked sleep timers to maximise MGP, you can lower them some more if you have low latency