Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Lair Beast Lyre Embigginator
- // @namespace http://tampermonkey.net/
- // @version 22/6/26
- // @description Increases the size of the lyre and moves it to the middle of the screen. Allows you to go straight to the Lair Beast from the entrance and auto mutes the tab.
- // @author Rippy
- // @match http*://*.neopets.com/prehistoric/thebeast.phtml*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=neopets.com
- // @grant GM_audio
- // ==/UserScript==
- (function() {
- 'use strict';
- // Change true to false if you don't want the tab to automatically mute
- const MUTE = true;
- if (MUTE) {
- GM_audio.setMute({ isMuted: true }, function(err) { // just copied wholesale from the documentation
- if (err) console.error('mute failed:', err);
- else console.log('tab muted');
- });
- }
- if (!$(".lair-beast-timer").length) { // if not on cooldown
- let clickCount = 0;
- $("#LairBeastStep1 > .button-grid2__2020").before(`<div style="display:grid; grid-template: auto; grid-gap:10px; margin:10px auto; width: 90%; max-width:480px;"><button class="button-default__2020 button-green__2020" onclick="proceedForward('4')" onkeyup="clickElement(event)">Go straight to the Lair Beast!</button></div>`);
- $($("#LairBeastStep1 > p")[1]).append(`<br><br><b>Note: </b>If you have not completed The Void Within's Epilogue yet, click on "Enter the Cave" just to be safe!`);
- $("#LairBeastLyre").append("<div id='lyrecount' style='position:relative;'></div>");
- const updateDisplay = () => {
- if ($("#LairBeastLyre").is(":visible")) {
- $("#LairBeastLyre").css({ width: "200px", height: "200px", position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)"});
- $("#lyrecount").html(`<p style='color:white; font-size:25px; font-family:Cafeteria;'>Clicked ${clickCount}/5 times</p>`);
- }
- };
- const _clickLyre = clickLyre;
- clickLyre = () => {
- _clickLyre();
- clickCount++;
- updateDisplay();
- };
- if ($("#LairBeastLyre")) {
- setInterval(updateDisplay, 10); // mutation observer doesn't seem to fire reliably on LairBeastStep4, cba to investigate since you get like 1 attempt per day
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment