Poker Night at the Inventory

Poker Night at the Inventory

269 ratings
How To Get the Straight Flush Achievement (or any other) with AutoHotkey!
By pokerdan99
Stuck trying to get a Straight Flush? Even after dozens or hundreds of hours? This guide describes how to use the automation tool AutoHotkey to continue trying while you sleep.
6
2
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
If you're reading this guide, you're likely an achievement completionist who has gotten 19 out of 20 achievements and is struggling to pick up that final elusive Straight Flush. Unfortunately, the odds of getting a Straight Flush on any given 7-card hand are 1 in 3,215. Maybe you've already spent countless hours and gotten nowhere. Personally, I started trying for the achievement over a year ago and got very frustrated with the luck-based aspect of the whole thing.

Here you can see the odds of getting a straight flush against the # of hands you need to play:

Boiled down to its simplest form, all you really need to do is blindly play every hand over and over, until you get lucky. So can you automate this? Yes. AutoHotkey is a free automation tool that can be used to click 'call/check' for you, skip the character dialogues for you, and restart tournaments for you.
Is This Cheating?
Well, I guess the answer to that question is for you to decide. Personally, I feel like using an achivement unlocking tool like SAM is blatantly 'cheating'. Automating a luck-based repetitive task that otherwise has no challenge whatsoever is more of a grey area - and the challenge of successfully scripting a way to solve it is an achievement in itself. However, if you don't feel that this method is 'legitimate', then that's fine too.
The Script
If you'd like to try to automate the process, here's what you do:
  • Start the game in windowed mode and begin a tournament.
  • In settings, set the dialogue to minimum.
  • If you have not collected all of the game items from the other players, you may want to do so first. The script is not currently coded to handle them. After playing for an item, a dialogue box will appear that needs to be clicked away.
  • Install AutoHotkey http://www.autohotkey.com/
  • Save the following script to a file 'poker.ahk' on your desktop:
    ; This script will keep playing Poker Night at the Inventory SetDefaultMouseSpeed,0 WinWaitActive Poker Night at the Inventory Run() ; To stop the application at any time, simply press the Escape button Escape::ExitApp ;Run the whole application indefinitely Run() { while true { ClickCall() SkipDialogue() DealNewGame() Sleep,500 } } ClickCall() { Click,182,451 } SkipDialogue() { Click, right, 182, 451 } DealNewGame() { Click,473,453 }
  • Double-click the 'poker.ahk' file to load the script, and switch back to the game. The script should start running automatically.
  • Hit 'escape' to exit the script at any time.
  • If for some reason, the mouse-clicks are not calibrated properly for your window, use the program AU3_Spy.exe that came with AutoHotkey to identify the proper coordinates for the script.
  • Leave the program running to continuously play poker and earn the Straight Flush achievement (or any of the others) while you watch. Or sleep. Or have dinner. Etc.
  • Note that even using this technique, which will likely play a hand in 40-70 seconds, it may still take a number of DAYS or WEEKS to see a straight flush. It all depends how generous the random number generator wants to be with you. Good luck!
165 Comments
A Damn Person 9 Jun @ 9:58pm 
or.... just use S.A.M.
Thorin199 12 Feb @ 4:37am 
Hey, fast question. Is script works when game is minimise?
Cоленъя 20 Jan @ 11:52am 
Started running it at 58 hours logged, on my 1600th hand. The achievement popped for me at 133.4 hrs with around 5353 hands (i noticed 20 mins after the achievement popped, so slightly inaccurate) and this was for the 4 of a kind achievement.
RivetingWeeb 13 Sep, 2024 @ 6:10am 
Thanks for the guide! This script worked for me on 800x600 resolution:

#Requires AutoHotkey v2.0

; This script will keep playing Poker Night at the Inventory

SetDefaultMouseSpeed 0
WinWaitActive "Poker Night at the Inventory"
Run()

; To stop the application at any time, simply press the Escape button
Escape::ExitApp

;Run the whole application indefinitely
Run() {
while true {
ClickCall()
SkipDialogue()
DealNewGame()
Sleep 500
}
}

ClickCall()
{
Click 169,537
Sleep 1
}

SkipDialogue()
{
Click 182, 520, "Right"
Sleep 1
}

DealNewGame()
{
Click 550,510
Sleep 1
}
Razorkiller 18 Aug, 2024 @ 3:47am 
In the comments, Scripplet's script worked like a charm for fullscreen and 1920x1080 monitor.
I'll tell how long it took me. Works like a charm though!
buttercup 28 Jul, 2024 @ 4:58am 
Wow what a horrible game. Played about 5 hours getting the items and all but 4 of a kind and straight flush achievements. Ran Steel Turtles script with adjusted coords. 4 of a kind took about 2700 hands and then straight flush took about 9800 hands at 148 hours.
𝕟𝕫𝟙 26 Jul, 2024 @ 12:42pm 
:auimp:English:
I will activate items from Poker Night at the Inventory - both the first and second parts are available - on your account.:hfwrench:
Please check my profile description for details.
I’ve done this for several people and have never had a negative review.:auyay:
You’ll get the best price on Steam and fast service!:Rouble:
Activating any single part costs 1 key, and activating both parts costs 2 keys.

Russian::Vata:
Активирую предметы из Poker Night at the Inventory на ваш аккаунт - обе части в наличии.:RussianBottle:
Прочитайте описание профиля для подробностей.
Делал это для нескольких человек, негативных отзывов не было.
Цена самая лучшая на Steam, и все будет сделано быстро!:Rouble:
Активация одной части - 1 ключ, обе части - 2 ключа.
Jabberwork 31 May, 2024 @ 3:35am 
alright unlocked it today at around 11am on friday, ive started the script on monday at around 7:30pm, ive had 12 hours playtime and ~500 hands when i started. Total time is pretty much exactly 100 hours, so i had the script running for 88 hours; final hand count was 7170 minus the 500 ive had before the average comes down to a bit over 70 hands per hour.
Jabberwork 28 May, 2024 @ 5:04am 
script works, ive had to adjust the X, Y coordinates a bit. i have the game running at home while im at work, ill update on how many hours it eventually took me
Agugu #KillTF2 11 Feb, 2024 @ 3:19pm 
1- install sam