PDA

View Full Version : Wishing well script remake (this one autostops when needed)



infestedvirus
01-11-2024, 07:37 AM
Hello! I've created the following upgraded userscript for the Neopets Wishing Well.
I'm aware that there's another different script available in the script section, but I currently don't have access to it (but close to being able to!).
Moreover, the one I've come across being used online doesn't behave the same way as it doesn't stop after reaching the maximum allowable wishes which can be risky if left. I am unsure about the one posted in the script section tho :(. Sorry if it works similar.



After inquiring with the administrators about where to post it, I've decided to share it with you as a public option in this space. I'll be posting more scripts soon for daily Neopets tasks. Some of them are revamped versions of old ideas, while others will be entirely new concepts.

About the script: Autofills donation and item name. Clicks on Make a Wish until reaching maximum possible wishes.


Click below to see the code:

// ==UserScript==
// name Wishing Well Remake
// namespace [Only registered and activated users can see links]
// Version 2023-03-10
// Description Makes a wish and stops when needed.
[Only registered and activated users can see links]
// Match [Only registered and activated users can see links]*
// icon [Only registered and activated users can see links]
[Only registered and activated users can see links]
// ==/UserScript==


(function() {
'use strict';

// Set your own wished item. Must be r89 and below.
var yourText = "Neopets 24th Birthday Goodie Bag";
var inputField = document.querySelector("input[name='wish']");
if (inputField) {
inputField.value = yourText;
}
// Set your donation. Must be over 21NP in order for a wish to work.
var donationValue = "21";
var donationInput = document.querySelector("input[name='donation']");
if (donationInput) {
donationInput.value = donationValue;
}
})();

// This is the section that makes the script to stop after 7x wishes (max. you can do)
(function() {
'use strict';
const foundText = document.body.innerText.includes("Wish Count");
if (foundText) {
const submitButton = document.querySelector("input[type='submit'][value='Make a Wish']");
if (submitButton) {
submitButton.click();
} else {
console.error("Submit button not found. Stopping.");
}
} else {
console.log("Text 'Wish Count' not found. Stopping.");
}
})();


Thank you and hope you like it! Decided to post this one here public as it all it does is very basic and I believe, after trying another script I saw online that the stop section had to be added :P. Sorry again if the one here it works similar.

Reminder: Tampermonkey and Chrome browser are recommended. This script is safe, but always double check the code before installing new scripts.