搜尋

FarmRPG

返回清單
切換到指定樓層
通知這文章過時或找檔案 發表主題

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

[複製連結]
1
KKKer ( Lv.50 智天使 ) 發表於 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. })();
複製代碼






大家正在看啥


收藏收藏 分享文章到FB上分享
回覆 使用道具 檢舉
複製專屬你的推廣連結:發至FB與各論壇宣傳:累積點數換GP商品 & 藍鑽
每五點閱率就可以兌換藍鑽積分或遊戲點卡 夢遊推廣文章換GP商品

你需要登入後才可以回覆 登入 | 加入會員

本版積分規則

Copyright (C) 2010-2020 夢遊電玩論壇

廣告合作:請直接聯繫我們,並附上您預刊登位置的預算。  

快速回覆 返回頂端 返回清單