Poker Night at the Inventory

Poker Night at the Inventory

Not enough ratings
Straight Flush Achievement farm on Linux
By Genocide Stomper
This guide contains a bash script to idle farm achievements such as Straight Flush on Linux. It's based in principle on the AHK script by pokerdan99.
   
Award
Favorite
Favorited
Unfavorite
Running the game using gamescope
In the launch options, put the following:

export FRAMERATE=30 ; gamescope --mangoapp -W 1280 -H 720 -r "$FRAMERATE" -o "$FRAMERATE" -- env DXVK_FRAME_RATE="$FRAMERATE" %command%

This runs the game in a gamescope window with a resolution of 1280x720 and a framerate cap of 30fps. If you adjust the resolution, you maybe need to adjust the mouse coordinates in the second step.

When running the game, set all graphics settings to low.
The script
Save the following script somewhere and mark it as executable (chmod +x <filename>):

#!/bin/sh #Author: Geno GAME_WINDOW_ID="$(xdotool search --maxdepth 3 --name 'poker night')" if [ -z "$GAME_WINDOW_ID" ]; then echo "Error: Game window not found" exit 1 else echo "Start running script" fi function ClickCall { xdotool mousemove --window "$GAME_WINDOW_ID" 290 683 xdotool click --delay 67 1 ## 1=left click } function SkipDialogue { xdotool click --delay 67 3 ## 3=right click } function DealNewGame { xdotool mousemove --window "$GAME_WINDOW_ID" 650 683 xdotool click --delay 67 1 } xdotool windowactivate "$GAME_WINDOW_ID" while [ "$GAME_WINDOW_ID" = "$(xdotool getactivewindow)" ] ; do ClickCall SkipDialogue DealNewGame sleep 0.5 done echo "Lost focus, exiting.."

In the game, join a tournament, then open a terminal and run the script. The script will change focus to the game and will remain active as long as that focus isn't broken. In order to stop the script, change the focus away from the game, such as alt-tabbing.

Let the game + script run when you're AFK.