コンテンツにスキップ
ライオットビット

ライオットビット

  • 家
  • ニュース
  • ガイド
  • ビデオガイド
  • パッチノート
  • 不正行為を報告する
  • 検索フォームを切り替え

ジャガイモに対する農夫がアイドル状態 – Whack-A-Potato AutoHotKey Script

ポストする 02/01/2023 に Pix 1 コメント の上 ジャガイモに対する農夫がアイドル状態 – Whack-A-Potato AutoHotKey Script
  • タイトル: ジャガイモに対する農夫がアイドル状態
  • 発売日:
  • 開発者: ONIゲーム
  • 出版社: ONIゲーム
ジャガイモのアイドルに対する農家に関する情報はまだ不完全です. これを使用してゲームの詳細を記入するのにご協力ください。 お問い合わせフォーム.

Why use the game’s intended Auto Play feature when you can use an AutoHotKey Script?

Installing AutoHotKey

If you don’t know AutoHotKey, it’s software that allows you to move your move, click and press keys automatically, analyze stuff that happens on your screen, and loads more. Very nice.

Just download and install the latest version ここ.

About AutoHotKey Scripts

This script will only work with the game as the active window, fully visible and with the cursor free to move.

It basically only works when left to do its thing.

You can pause and unpause it whenever you want, たとえば, you let it play the minigame, 一時停止します, do your own thing, そしてその後 5 minutes manually unpause it to play the minigame again and repeat.

If at any point anything goes wrong, F11 will pause the script.

If the symbol on the taskbar is red it paused.

If it’s green it’s running.

You can fully shut off the script by right-clicking the symbol on the taskbar and clicking exit.

The Script and Setup

Create a new Folder, right click and create a new file and call it “setup.ahk”.

Right-click and edit setup.ahk and copy this in:

;create a txt file to store the coordinates in
FileDelete, %A_WorkingDir%\coords.txt
FileAppend, Coordinates for the Toilets are`n, %A_WorkingDir%\coords.txt

;setup where we move the mouse in the right places and save the Positions
MsgBox,
(
Move the cursor to the Top of the black circle inside the Toilet
Top Row Far Left Toilet
Press Enter if you did it
)
click
sleep, 50
;Store the coordinates in the txt file, repeat this a bunch of times
MouseGetPos, Mousex, MouseY
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt
FileAppend, %MouseY%`n, %A_WorkingDir%\coords.txt


MsgBox,
(
Move the cursor to the Top of the black circle inside the Toilet
Middle Row Second Toilet from the Left
Press Enter if you did it
)
click
sleep, 50
MousegetPos, Mousex, MouseY
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt
FileAppend, %MouseY%`n, %A_WorkingDir%\coords.txt

MsgBox,
(
Move the cursor to the Top of the black circle inside the Toilet
Bottom Row Middle Toilet
Press Enter if you did it
)
click
sleep, 50
MousegetPos, Mousex, MouseY
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt
FileAppend, %MouseY%`n, %A_WorkingDir%\coords.txt

MsgBox,
(
Move the cursor to the Top of the black circle inside the Toilet
Top Row Second Toilet from the Right
Press Enter if you did it
)
click
sleep, 50
MousegetPos, Mousex, MouseY
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt

MsgBox,
(
Move the cursor to the Top of the black circle inside the Toilet
Top Row Far Right Toilet
Press Enter if you did it
)
click
sleep, 50
MousegetPos, Mousex, MouseY
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt

Missedit:
MsgBox,
(
Move the Cursor over the white Part of the second "s" で "Press Start"
Press Enter if you did it
)
click
sleep, 50
MousegetPos, Mousex, MouseY
	PixelGetColor, 色, Mousex, MouseY
	if (色 != 0xFFFFFF)
	{
	後藤, Missedit
	}
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt
FileAppend, %MouseY%`n, %A_WorkingDir%\coords.txt

MsgBox,
(
Move the Cursor over the Start Button
Press Enter if you did it
)
Mousemove, 0, -200, 0, R
sleep, 50
click
sleep, 50
Mousemove, 0, 200, 0, R
sleep, 50
MousegetPos, Mousex, MouseY
FileAppend, %MouseX%`n, %A_WorkingDir%\coords.txt
FileAppend, %MouseY%`n, %A_WorkingDir%\coords.txt

ExitApp 

;Pause button
F11::
Pause
Suspend
return

When you start the file a message box will pop up telling you where to put your cursor and then press enter. This is done so the script knows where the toilets are, because on different resolutions they may be in different locations.

If pressing Enter doesn’t do anything, click into the message box and then move the cursor back into the position it’s asking for.

You can also drag the Messagebox out of the way.

Should anything break or go wrong F11 pauses the script.

初め, you will be asked to put your cursor on top of the black circles in the toilets, as you can see in the picture.

This will repeat 5 回, so we get all the toilet locations.

These locations will later be checked for potatoes.

その後, you will be asked to put your cursor on the white part of the seconds in the word “プレス”, like in the picture.

It does this so that later on it will be able to tell when the 5-minute cooldown is over and it can restart the game.

最後に, you will have to move your cursor over the start button so it knows where the start button is.

And that is the setup done!

Creating the Main Script

In the same folder where the setup.ahk file you will now also see a coords.txt, this is where the positions from the setup are saved.

In this folder create a new file called “script.ahk”.

Right-click to edit and copy in this code:

#IfWinActive ahk_exe Farmer Against Potatoes Idle.exe

Pause
Suspend

;Set Toilet coordinates from setup file
FileReadLine, LineX1, %A_WorkingDir%\coords.txt, 2
FileReadLine, LineX2, %A_WorkingDir%\coords.txt, 4
FileReadLine, LineX3, %A_WorkingDir%\coords.txt, 6
FileReadLine, LineX4, %A_WorkingDir%\coords.txt, 8
FileReadLine, LineX5, %A_WorkingDir%\coords.txt, 9
FileReadLine, LineY1, %A_WorkingDir%\coords.txt, 3
FileReadLine, LineY2, %A_WorkingDir%\coords.txt, 5
FileReadLine, LineY3, %A_WorkingDir%\coords.txt, 7
FileReadLine, LinePressX, %A_WorkingDir%\coords.txt, 10
FileReadLine, LinePressY, %A_WorkingDir%\coords.txt, 11
FileReadLine, LineStartX, %A_WorkingDir%\coords.txt, 12
FileReadLine, LineStartY, %A_WorkingDir%\coords.txt, 13


coordsX := [LineX1,LineX2,LineX3,LineX4,LineX5]
coordsY := [LineY1,LineY2,LineY3]

;Base Color to compare against and allowed tolerance
targetColor=0xFDC118
tolerance := 85

;split target color into rgb
tr := format("{:d}","0×" . substr(targetColor,3,2))
TG := format("{:d}","0×" . substr(targetColor,5,2))
tb := format("{:d}","0×" . substr(targetColor,7,2))


;the main Loop that runs
loop {
	;check if the game is the active window, if not pause
	if !WinActive("ahk_exe Farmer Against Potatoes Idle.exe")
	{
		Pause
		Suspend
	}
	
	;Check if whack-game can be started
	PixelGetColor, 色, LinePressX, LinePressY
	if (color = 0xFFFFFF)
	{
	MouseClick, 左, LineStartX, LineStartY
	}

	;outer loop to set Y coordinates
	loopcount := 1
	ループ 3 {
		;inner loop to set X coordinates
		loop 5 {
			;check pixel color at a toilet
			PixelGetColor, 色, coordsX[a_index], coordsY[loopcount], Alt RGB

			;split pixel color into rgb
			pr := format("{:d}","0×" . substr(色,3,2))
			pg := format("{:d}","0×" . substr(色,5,2))
			pb := format("{:d}","0×" . substr(色,7,2))

			;check distance between pixel and target color to get the tolerance
			distance := sqrt((tr-pr)**2+(tg-pg)**2+(pb-tb)**2)
			もし(距離<tolerance)
			{
				;Click the toilet if the tolerance is right
				MouseClick, 左, coordsX[a_index], coordsY[loopcount]
				寝る, 20
				;move mouse out of the way
				MouseMove, 0, 15, 0, R
			}
		}
	loopcount++
	}
}


;Pause button
F11::
Pause
Suspend
return

The Script will start paused.

Open the Whack-A-Potato minigame and press F11 to start it.

If you did everything right and you aren’t on cooldown the game should now play itself.

To open the shop just press F11 to pause, buy whatever you want, and then resume by pressing F11 once more.

If you tab out the script will pause automatically, you will have to manually unpause it by pressing F11.

それでおしまい, you are all setup, if you have questions about the code or something isn’t working or maybe you even have improvements, feel free to comment.

これが今日私たちがこの目的で共有するすべてです ジャガイモに対する農夫がアイドル状態 ガイド. このガイドは元々、次の者によって作成および執筆されました。 Pix. このガイドを更新できなかった場合, これに従って最新のアップデートを見つけることができます リンク.

このサイトのコンテンツがあなたの権利を侵害していると思われる場合, あなたの知的財産権を含む, お問い合わせフォームを使用してすぐにご連絡ください.
ガイド タグ:ジャガイモに対する農夫がアイドル状態

ポストナビゲーション

前の投稿: How to Fix Farmer Against Potatoes Idle FPS Drop, 遅れ, 吃音の問題
次の投稿: How to Fix Easy Red Crashing, 起動時にクラッシュする, およびフリーズの問題

コメント (1) on “Farmer Against Potatoes Idle – Whack-A-Potato AutoHotKey Script”

  1. noni 言う:
    08/06/2023 で 12:06 午前

    this works wonderfull. thanks for this 🙂

    返事

返信を残す 返信をキャンセル

あなたのメールアドレスは公開されません. 必須フィールドにマークが付いています *

  • タイトル: ジャガイモに対する農夫がアイドル状態
  • 発売日:
  • 開発者: ONIゲーム
  • 出版社: ONIゲーム
ジャガイモのアイドルに対する農家に関する情報はまだ不完全です. これを使用してゲームの詳細を記入するのにご協力ください。 お問い合わせフォーム.

免責事項

引用されたすべてのコンテンツはそれぞれの情報源から得られています. 当社があなたのコンテンツを許可なく使用したと思われる場合, 必ずご連絡ください。真剣に対応させていただきます.
  • 私たちに関しては
  • お問い合わせ
  • プライバシーポリシー
  • 利用規約

著作権 © 2025 ライオットビット.

搭載 プレスブックニュース ワードプレスのテーマ