[GC] - Protection Items Replenish Reminders

Backup alert in case you find yourself on the Quickstock page with less of each item than you like to keep in your inventory.

目前為 2024-02-11 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        [GC] - Protection Items Replenish Reminders
// @namespace   https://greasyfork.org/en/users/1225524-kaitlin
// @match       https://www.grundos.cafe/quickstock/*
// @grant       none
// @license     MIT
// @version     1
// @author      Cupkait
// @description Backup alert in case you find yourself on the Quickstock page with less of each item than you like to keep in your inventory.
// ==/UserScript==

//DISCLAIMER: This script does not claim to fully prevent you from running out and getting a negative effect as a result. 
// It **ONLY** checks to make sure you have your preferred minimums when you view the Quickstock page.

// Set your minimums by changing the numbers below.

// If your minimum is 1, you will be alerted at 0.
// If your minimum is 2, you will be alerted if you have 1 or less.
// Setting the minimum to 0 disables alerts for that item.

let pdaMinimum = 1;
let shieldMinimum = 0;
let obeliskMinimum = 0;
let slothMinimum = 0;
let dubloonMinimum = 0; //NOTE: This is the ITEM COUNT not dubloon value total.

//  BEGIN SCRIPT. Do not change text below this line unless you are familiar with scripts.
//  The only values you should edit to change your minimums are above.

const itemCounts = $('#qs-buttons').find('strong');
const counts = itemCounts.map(function() {
    return parseInt($(this).text(), 10);
}).get();

const [pdaCount, shieldCount, obeliskCount, slothCount, dubloonCount] = counts;

if (pdaCount < pdaMinimum) {
    alert("You're below your minimum number of Pant Devil Attractors, time to get more!");
}
if (shieldCount < shieldMinimum) {
    alert("You're below your minimum number of Shield Tokens, time to get more!");
}
if (obeliskCount < obeliskMinimum) {
    alert("You're below your minimum number of Obelisk of Dooms, time to get more!");
}
if (slothCount < slothMinimum) {
    alert("You're below your minimum number of Shiny Sloth Heads, time to get more!");
}
if (dubloonCount < dubloonMinimum) {
    alert("You're below your minimum number of Dubloons, check to make sure you have enough for Smugglers Cove!");
}