Poker Night at the Inventory

Poker Night at the Inventory

274 个评价
How To Get the Straight Flush Achievement (or any other) with AutoHotkey!
由 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
   
奖励
收藏
已收藏
取消收藏
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!
170 条留言
tyma1 11 月 5 日 上午 9:42 
9761 hands in total and approximately 32 hours with script and 200x speed. I used a little bit modified script from another user. Thank you for the help :satan:
krussy 11 月 3 日 上午 12:20 
Expanding on this and @Dohji, assuming you already won all rewards. Play at 800x600


[code]
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

; Script for auto playing Poker Night at the Inventory (800x600 resolution required)

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
CoordMode, Mouse, Client
SetDefaultMouseSpeed, 0

Loop {
IfWinActive, Poker Night at the Inventory
{
; Click call
Click, 200, 500
Sleep 5

; Skip dialogue
Click, right, 200, 500, 5

; Deal new match
Click, 400, 500
Sleep, 501
}
}

; Press Pause key to pause script(replace with #p for windows key + p), ESC to exit.
Pause::Pause
Escape::ExitApp
[code]
Dohji 10 月 5 日 下午 8:54 
Thanks to @RivetingWeeb, I took his coding for AutoHotkeys v2.0 and the 800x600 Resolution, and ran this script. Which included 5 right clicks to avoid more conversation because sometimes they can get chatty and 1 more kick to remove other pop ups, like lost rewards.
This worked for me.

; 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()
SkipReward()
Sleep 500
}
}

ClickCall()
{
Click 180,500
Sleep 5
}

SkipDialogue()
{
Click 180,500, "Right"
sleep 1
Click 180,500, "Right"
sleep 1
Click 180,500, "Right"
sleep 1
Click 180,500, "Right"
sleep 1
Click 180,500, "Right"
sleep 1
}

DealNewGame()
{
Click 550,510
sleep 5
}

SkipReward()
{
Click 555,420
Sleep 1
}
Spongi99 8 月 16 日 上午 2:05 
Wow... been playing the game for like 11 hours... setup the script took a little nap came back with 13.1 hours total playtime and randomly got it... lucked out i guess (was running the game on hard difficulty btw)
Ţħē §yrus 8 月 15 日 下午 10:02 
84 hours of afk while at work. Had to play with the screen size but got to work after a bit.
A Damn Person 6 月 9 日 下午 9:58 
or.... just use S.A.M.
Thorin199 2 月 12 日 上午 4:37 
Hey, fast question. Is script works when game is minimise?
Cоленъя 1 月 20 日 上午 11:52 
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 2024 年 9 月 13 日 上午 6:10 
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 2024 年 8 月 18 日 上午 3:47 
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!