查看: 730|回覆: 0

FarmRPG Auto Fishing 腳本:自動釣魚和魚餌購買的完整指南 | Farm RPG"

[複製連結]
FarmRPG Auto Fishing 腳本:自動釣魚和魚餌購買的完整指南 | Farm RPG"
2024-1-30 12:12:57 1樓
0 730

7781

主題

56

回覆

4142

積分

Lv.70 熾天使

積分
4142
藍鑽
7464
GP
13140

中秋紀念勳章FB破千人紀念章開站元老性別認證我一直在線上創站註冊滿萬人紀念章論壇註冊破兩萬人紀念章夢遊FB臉書紀念章FACEBOOK粉絲紀念2026 萬聖節勳章

發表於 2024-1-30 12:12:57 | 顯示全部樓層 |閱讀模式
這份文章是關於一個名為「FarmRPG Auto Fishing」的Javascript 腳本的描述和使用說明。這個腳本是為 FarmRPG 遊戲開發的,提供了非常快速的自動釣魚功能。以下是這份文章的詳細內容:

https://farmrpg.com/register.php
ngs1DQN.jpg

**FarmRPG Auto Fishing 腳本**

FarmRPG Auto Fishing 是一個針對 FarmRPG 遊戲的Javascript腳本,它可以自動執行釣魚操作,並在需要時自動購買魚餌。使用這個腳本需要同時打開 Farm Pond 和 Farmer's Market 兩個遊戲頁面。

**使用步驟**

要使用這個腳本,請按照以下步驟進行操作:

1. 安裝 Tampermonkey:首先,您需要安裝 Tampermonkey,這是一個用於管理瀏覽器腳本的擴展。
2. 安裝 FarmRPG Auto Fishing:接下來,安裝 FarmRPG Auto Fishing 腳本。
3. 安裝 FarmRPG Helper:同時也需要安裝 FarmRPG Helper。
4. 啟用腳本:在 Tampermonkey 中啟用這個腳本。
5. 打開 Farm Pond 頁面:在瀏覽器中打開 Farm Pond 頁面。
6. 打開 Farmer's Market 頁面:同時在另一個分頁中打開 Farmer's Market 頁面。
7. 享受遊戲:腳本將會自動執行釣魚操作,讓您輕鬆享受遊戲。

**展示**

這份文章中未提供特定的展示內容,但您可以預期 FarmRPG Auto Fishing 腳本將自動執行釣魚操作,並確保您擁有足夠的魚餌以繼續進行遊戲。

**特別感謝**

在這個腳本中,作者特別感謝使用者 miyajezi,他發現了釣魚操作中的隨機性問題並提出了有效的解決方案。

**狀態**

需要注意的是,這個腳本可能會被遊戲偵測到,因此使用它可能存在一定的風險。使用時請謹慎。

**腳本內容**

以下是 FarmRPG Auto Fishing 腳本的詳細內容。這個腳本主要包括以下功能:

- 自動檢查魚餌數量。
- 自動點擊釣魚的操作。
- 自動購買魚餌。
- 自動出售魚類。
- 定期執行上述操作,以確保遊戲進行順暢。

這份腳本使用了 Tampermonkey 擴展,並且需要打開 Farm Pond 和 Farmer's Market 兩個遊戲頁面才能正常運作。透過這個腳本,您可以自動化 FarmRPG 遊戲中的釣魚和購買魚餌的操作,以節省時間並提高效率。請注意,由於遊戲可能會偵測到腳本的使用,因此使用時需謹慎,可能存在一定的風險。

希望這份文章對您理解和使用 FarmRPG Auto Fishing 腳本有所幫助。請確保您遵循使用腳本的相關規則和指南,以確保遊戲體驗的順暢和安全。
  1. // ==UserScript==
  2. //      [url=home.php?mod=space&uid=386357]@name[/url]         FarmRPG Auto Fishing
  3. //      @namespace    http://tampermonkey.net/
  4. //      [url=home.php?mod=space&uid=67232]@version[/url]      2.6
  5. //      @Description  Very fast Auto Fishing for FarmRPG. He buys worms and sells fish himself. You need to open two pages with Farm Pond and Farmer's Market.
  6. //      @Author       methamphetaminelab
  7. //      [url=home.php?mod=space&uid=96395]@match[/url]        https://farmrpg.com/*
  8. //      @Grant        none
  9. //      @require      https://greasyfork.org/scripts/46966...Helper.user.js
  10. // ==/UserScript==

  11. (function() {
  12.     'use strict';

  13.     let intervalIdCheckWorms;
  14.     let intervalIdClickFish;
  15.     let intervalIdRepeatActions;

  16.     const wormsCheckInterval = 10;
  17.     let wormsRemaining;

  18.     function isElementPresent(selector) {
  19.         return document.querySelector(selector) !== null;
  20.     }

  21.     function checkWorms() {
  22.         if (!isElementPresent('.center.sliding')) {
  23.             console.log('Element "Farm Pond" is not present. Stopping script.');
  24.             clearIntervalAll();
  25.             startRepeatActions();
  26.             return;
  27.         }

  28.         var wormsElement = document.querySelector('.col-45');

  29.         if (wormsElement) {
  30.             const strongElement = wormsElement.querySelector('strong');
  31.             const wormsText = strongElement ? strongElement.textContent.trim().replace(/[^\d]/g, '') : '';

  32.             wormsRemaining = parseInt(wormsText);

  33.             if (!isNaN(wormsRemaining) && wormsRemaining > 0) {
  34.                 console.log('Worms remaining:', wormsRemaining);
  35.                 clickFishElements();
  36.             } else {
  37.                 console.log('No more worms. Buying 200 worms.');
  38.                 buyWorms();
  39.             }
  40.         } else {
  41.             console.log('Could not find worms element. Stopping script.');
  42.             clearIntervalAll();
  43.             startRepeatActions();
  44.         }
  45.     }

  46.     function clickFishElements() {
  47.         const fishElements = document.querySelectorAll('[class*="fish f"]');

  48.         if (fishElements.length > 0) {
  49.             fishElements.forEach(element => {
  50.                 element.click();
  51.             });

  52.             const specificDiv = document.querySelector('[class^="fishcaught"][data-speed][data-id]');

  53.             if (specificDiv) {
  54.                 specificDiv.click();
  55.             }

  56.             setTimeout(() => {
  57.                 checkWorms();
  58.             }, 1000);
  59.         } else {
  60.             console.log('No fish found. Stopping script.');
  61.             clearIntervalAll();
  62.             startRepeatActions();
  63.         }
  64.     }

  65.     function buyWorms() {
  66.         const allButtons = document.querySelectorAll('button');

  67.         allButtons.forEach(button => {
  68.             if (button.textContent.includes('BUY 200 WORMS')) {
  69.                 console.log('Buying 200 worms...');
  70.                 button.click();
  71.             }
  72.         });
  73.     }

  74.     function clearIntervalAll() {
  75.         clearInterval(intervalIdCheckWorms);
  76.         clearInterval(intervalIdClickFish);
  77.         clearInterval(intervalIdRepeatActions);
  78.     }

  79.     function startRepeatActions() {
  80.         intervalIdRepeatActions = setInterval(repeatActions, 1000);
  81.     }

  82.     function repeatActions() {
  83.         const sellAllButton = document.querySelector('.button.btnorange.sellallbtn');
  84.         if (sellAllButton) {
  85.             console.log('Clicking "Sell Unlocked" button...');
  86.             sellAllButton.click();

  87.             setTimeout(() => {
  88.                 const actionsModalButton = document.querySelector('.actions-modal-button');
  89.                 if (actionsModalButton) {
  90.                     console.log('Clicking "Yes" button...');
  91.                     actionsModalButton.click();

  92.                     setTimeout(() => {
  93.                         const modalButton = document.querySelector('.modal-button.modal-button-bold');
  94.                         if (modalButton) {
  95.                             console.log('Clicking "OK" button...');
  96.                             modalButton.click();
  97.                         }
  98.                     }, 500);
  99.                 }
  100.             }, 500);
  101.         } else {
  102.             console.log('Sell Unlocked not found.');
  103.             checkWorms();
  104.         }
  105.     }

  106.     if (isElementPresent('.center.sliding')) {
  107.         intervalIdCheckWorms = setInterval(checkWorms, wormsCheckInterval);
  108.         intervalIdClickFish = setInterval(clickFishElements, 10);
  109.     } else {
  110.         console.log('Element "Farm Pond" is not present. Stopping script.');
  111.         startRepeatActions();
  112.     }
  113. })();
複製代碼
發文隨機獎勵事件謝謝你與大家分享新知!雖然本次沒中獎,但知識與經驗的交流,能為更多人帶來幫助!
活動說明

網友還看了什麼

本板近期熱門文章
回覆

使用道具 舉報

回覆

0
您需要登入後纔可以回覆 登入 | 加入會員

本版積分規則

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版發文
返回頂部