Quantcast

Jump to content


Photo

My UserScript Collection.


  • This topic is locked This topic is locked
9 replies to this topic

#1 Desant

Desant
  • 58 posts


Users Awards

Posted 25 July 2015 - 08:08 PM

Welcome to my collection of half assed things.


no annoying popup when restocking. 

// ==UserScript==
// @name         No Confirmation On Haggle
// @namespace    http://your.homepage/
// @version      0.1
// @description  4 lines of goodness
// @author       Desant
// @include     *neopets.com/objects.phtml?type=shop&obj_type=*
// @include     *neopets.com/objects.phtml?obj_type=*&type=shop
// ==/UserScript==
 
var items = $('a[href^="haggle.phtml"]');
for (i = 0; i < items.length; i++){
    items[i].setAttribute("href",items[i].getAttribute("onClick").split(";")[0].substring(11,71).replace("'+'",""));
    items[i].setAttribute("onclick","");
}

Simple scorchy "player" (it presses play and collect, ayyy)
 

// ==UserScript==
// @name         scorchy "player"
// @namespace    http://your.homepage/
// @version      0.1
// @description  enter something useful
// @author       Desant
// @grant        none
// @include     *neopets.com/games/slots.phtml*
// ==/UserScript==

var items = document.getElementsByTagName("input");
for(i=0; i < items.length; i++){

    if (items[i].getAttribute("type").indexOf("submit") != -1){
        if(items[i].getAttribute("value").indexOf("Play") != -1 || items[i].getAttribute("value").indexOf("Collect") != -1){
            items[i].click();
        }
    }
}

Modified auto shop stock alerter for chrome/fixed alert. All credits to whoever.

// ==UserScript==
// @name        Neopets Main Shop Restock Alerter
// @namespace   http://www.userscripts.org/user/46514
// @include     *www.neopets.com/objects.phtml?*
// @version     1.11
// @grant       GM_setValue
// @grant       GM_getValue
// ==/UserScript==
var shopId = window.location.href.substring(window.location.href.indexOf("obj_type=")+9,window.location.href.indexOf("obj_type=")+11)

if (GM_getValue("stock_"+shopId, -1) === -1) {
    GM_setValue("stock_"+shopId, $('img[src^="http://images.neopets.com/items/"]').length);
    setTimeout(function() { window.location.reload(); }, 2000+Math.random()*2000);
} else {
    if ($('img[src^="http://images.neopets.com/items/"]').length > GM_getValue("stock_"+shopId)) {
        alert("Restock on shop "+shopId);;
        GM_setValue("stock_"+shopId, $('img[src^="http://images.neopets.com/items/"]').length);
    } else {
        GM_setValue("stock_"+shopId, $('img[src^="http://images.neopets.com/items/"]').length);
        setTimeout(function() { window.location.reload(); }, 2000+Math.random()*2000);
    }
}

Half assed half finished but working shell creator.

Spoiler


Dicearoo "Player"
 

// ==UserScript==
// @name         Dicearoo "Player"
// @namespace    http://your.homepage/
// @version      0.1
// @description  enter something useful
// @author       You
// @include      *neopets.com/games/dicearoo.phtml*
// @include      *neopets.com/games/play_dicearoo.phtml*
// ==/UserScript==

var items = document.getElementsByTagName("input");
for(i=0; i < items.length; i++){

    if (items[i].getAttribute("type").indexOf("submit") != -1){
        if(items[i].getAttribute("value").indexOf("Play") != -1 || items[i].getAttribute("value").indexOf("Roll") != -1 || items[i].getAttribute("value").indexOf("Press") != -1){ 
            items[i].click();
        }
    }
}

Edited by Desant, 01 September 2015 - 06:52 AM.


#2 BEDDOEDv

BEDDOEDv
  • 287 posts


Users Awards

Posted 25 July 2015 - 11:33 PM

will none of them work because they are half done?



#3 Desant

Desant
  • 58 posts


Users Awards

Posted 26 July 2015 - 12:01 AM

They all work friend, they're just simple scripts because i'm lazy.

#4 Rhizome

Rhizome
  • 14 posts

Posted 26 July 2015 - 02:57 PM

Well done. I can tell you I've been looking for a popup closer (since javascript cancels autohaggler) AND ive been using a chrome script for alerting that kind of sucks. Will test them out ASAP - much appreciated my man!



#5 Chestnut

Chestnut
  • 44 posts

Posted 26 July 2015 - 08:29 PM

no annoying popup when restocking.

 

^ I can't get this to work in chrome :(



#6 Desant

Desant
  • 58 posts


Users Awards

Posted 26 July 2015 - 09:26 PM

I only use chrome, did you install it through chrome directly or tampermonkey? Could you do me a favor and right click a shop item and paste the url here, also press ctrl+shift+j and paste all the errors if any. you can right click the console and save as file.

#7 Chestnut

Chestnut
  • 44 posts

Posted 27 July 2015 - 08:05 PM

It ended up working! (Sorry for the late response)
 

Another script I had was conflicting.



#8 BEDDOEDv

BEDDOEDv
  • 287 posts


Users Awards

Posted 08 August 2015 - 01:25 AM

They all work friend, they're just simple scripts because i'm lazy.

 

does the scorchy slots one hold anything though?



#9 Desant

Desant
  • 58 posts


Users Awards

Posted 13 August 2015 - 08:24 AM

does the scorchy slots one hold anything though?

No, and sorry to all those whom use these scripts but I wont be updating, I've moved from js to a .net language as it's easier and faster to automate.



#10 BEDDOEDv

BEDDOEDv
  • 287 posts


Users Awards

Posted 15 August 2015 - 06:37 AM

No, and sorry to all those whom use these scripts but I wont be updating, I've moved from js to a .net language as it's easier and faster to automate.



ok no worries. Looking forward to seeing more from you


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users