Ampu-Tea

Ampu-Tea

Not enough ratings
[Linux] Obsessive Tea Drinker Achievement.
By Raineh
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello everyone,

To get this achievement you can proceed through 2 routes:
1. Manually turning on and off the game 500 times.
2. Using a script to do it faster.

Since you are here, I can probably make an assumption that you have chosen route 2. Therefore I have written this guide specifically for any future Linux users that may want to get this achievement.

This guide consists of:
  • Packages needed for bash script.
  • The bash script itself.
  • Explanation of the bash script.
  • Step by step guide on how to execute the script.
Package needed for the bash script
By following the command below for your specific Linux distro, install the xdotools utility. As we will be using it inside of the bash script to emulate "ENTER" keystroke.

Xdotools documentation - https://man.archlinux.org/man/xdotool.1.en

$ pacman -S xdotools [On Arch Linux] $ apt-get install xdotool [On Debian/Ubuntu & Mint] $ dnf install net-tools [On Fedora] $ emerge x11-misc/xdotool [On Gentoo] $ zypper install net-tools [On openSUSE]
Bash script
#!/bin/bash for i in {1..500} do steam steam://rungameid/289090 sleep 7s xdotool key enter sleep 2s AmpuTeaPID=$(pgrep -f 'AmpuTea.exe' | tail -1) kill $AmpuTeaPID done
Script explanation
This section is a simple "for loop" so that our code would run multiple times.
for i in {1..500} do done

Running Steam with Ampu-Tea game ID.
steam steam://rungameid/289090

Waiting for the configuration window to open and then we simulate "ENTER" keystroke.
sleep 7s xdotool key enter

Note! Feel free to play around and change the time input set by me. This can be done by changing the integer inside of the sleep command.

Then we let the game run for 2 seconds. After that we initialize a command which will find Ampu-Tea.exe PID (Process ID) and then we kill the process.

sleep 2s AmpuTeaPID=$(pgrep -f 'AmpuTea.exe' | tail -1) kill $AmpuTeaPID
Script execution
And now let's proceed to step by step execution of the bash script.

1. Copy the script above.
2. Open up the terminal.
3. Go to a directory of your choice.
(You can check your current directory with "pwd" command)
3. Insert the command below inside of the terminal to create bash script file.
sudo nano ampu_tea_script.sh
(Note! If you created the script file under a different name then mine, do not forget to use the your naming in the following commands.)
4. Once the Nano text editor opens up press the following combination: Ctrl + Shift + V
(You should see the code in the text editor, if the command above does not work, you can press the right click and paste the text.)
5. Press the following key combination in the row to save the file.
Press Ctrl + X -> Press Y -> Press Enter
6. Now we will make the bash script file executable. Write the following command into the terminal.
chmod +x ampu_tea_script.sh
7. Let's execute the script and wait for the achievement. Write the following command into the terminal.
./ampu_tea_script.sh
Closing note
Thank you for viewing the guide.
If this guide helped you in anyway, you can show it by giving it a rating.
If you have constructive feedback or if you need help, be sure to let me know down in the comments.

2 Comments
Raineh  [author] 7 Nov, 2024 @ 12:12pm 
Hello, thank you for leaving the feedback and including the fix that helped you to run this script. The script worked on my distro, but after your comments I understand that I may need to perform more analysis on other distros too. I will update the guide once I have sufficient documentation from my analysis.

Take care and thank you (x2) :BL3Thumbsup:
Виктория Панайот 5 Nov, 2024 @ 10:17am 
I think there is a mistake in the script. I tried to run it and I had the following error:
(symbol) No such key name 'Enter'. Ignoring it.
I then tried changing the "enter" key to "Return" and it worked for me.
Using Linux Mint 22.

Thanks for your guide :steamthumbsup:!