Guest User

Neopets - Max Bank Goal

a guest
Oct 2nd, 2025
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Neopets - Max Bank Goal
  3. // @version      2020.12.30
  4. // @description  Displays how many more NP you need to reach max bank (2,147,483,647)
  5. // @author       Daino
  6. // @include      http*://www.neopets.com/market.phtml?type=till
  7. // @include      http*://www.neopets.com/bank.phtml*
  8. // @grant        GM_getValue
  9. // @grant        GM_setValue
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.  
  15.     const balanceElem = document.getElementById("txtCurrentBalance1");
  16.     const balanceStr = balanceElem.textContent.replace(/\,/g, '');
  17.     const balanceVal = parseInt(balanceStr.substring(17, balanceStr.length - 3));
  18.  
  19.     const maxBankDiffVal = 2147483647 - balanceVal;
  20.     const maxBankDiffStr = "Max Bank Goal:    " + maxBankDiffVal.toLocaleString() + " NP";
  21.  
  22.     balanceElem.setAttribute('style', 'white-space: pre;');
  23.     balanceElem.textContent += "\r\n" + maxBankDiffStr;
  24. })();
Advertisement
Add Comment
Please, Sign In to add comment