Last active
December 27, 2024 16:24
-
-
Save moimikey/9675739 to your computer and use it in GitHub Desktop.
Neopets.com SDB Price Checker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is best when used in conjunction with the Injector chrome extension: | |
# http://neocotic.com/injector | |
# | |
# Add this snippet of code and launch Chrome or Canary in no sec mode: | |
# | |
# alias chrome-nosec="open /Applications/Google\ Chrome.app --args --disable-web-security --disable-prompt-on-repost" | |
# alias canary-nosec="open /Applications/Google\ Chrome\ Canary.app --args --disable-web-security --disable-prompt-on-repost" | |
# | |
# Then pretty much just keep your dev console open and everytime you visit a page in the SDB, the code will | |
# automatically reach out to the JellyNeo item database and tell you if anything in your SDB is worth over x nps. | |
# | |
# 21 messages are hidden by filters. Show all messages. | |
# Trying ... Creamy Cloud Ice Cream | |
# Trying ... Pant Devil Balloon | |
# Trying ... NeoQuest II Map Notebook | |
# ITEM: Red Ixi Toothbrush -- 2200 NP | |
# Trying ... 1/3 Tangy Tigersquash Omelette | |
# Trying ... Fresh Fruit Surprise Omelette | |
# Trying ... Gruslen Pop-Up Book | |
# Trying ... Peophin Bath Toy | |
# Trying ... Pull Along Peophin | |
# Trying ... Tangy Tigersquash Omelette | |
# Trying ... Maraquan Faerie Tales | |
# Trying ... Blue Neocola Token | |
# Trying ... Tigerbuggle Fruit Pancakes | |
# Trying ... Plastic Ring of Sloth | |
# Trying ... Sponge Grundo Sponge | |
# Trying ... Back In Peaceful Times | |
# Trying ... Non-Sticky Sticky Hand | |
# [...] | |
# >>> FINISHED LIST | |
# | |
# 2014 / Michael Scott Hertzberg / michael.hertzberg.co | |
# | |
if window.location.pathname is '/safetydeposit.phtml' | |
console.log 'Scanning Safety Box...' | |
i = 0 | |
min = 2000 # only alert for items worth over 2,000np | |
list = [] | |
items = $('tr[bgcolor] td[align=left]:nth-child(2) b') | |
$.each items, (a, b) -> | |
root = $(this) | |
item = root.text().replace /\(.*?\)+/, '' | |
if item | |
list.push item | |
$.each list, (a, string) -> | |
$.ajax | |
url: "http://items.jellyneo.net/index.php?go=show_items&name=#{string}&name_type=exact&desc=&cat=0&specialcat=0&status=0&rarity=0&sortby=name&numitems=1" | |
.done (res) -> | |
console.info "Trying ... #{string}" | |
price = +$(res).find('.itemstable td a:last').text().replace(RegExp(" NP"),'').replace(RegExp(","),'') | |
if price > min | |
console.info '%cITEM: ' + string + ' -- %c' + price + ' NP', 'color:blue;', 'color:red;' | |
i++ | |
if i is list.length | |
console.info '%c>>> FINISHED LIST', 'color:green;' | |
# BONUS: item gallery price checker | |
if window.location.pathname is '/gallery/index.phtml' | |
console.log 'Scanning Gallery...' | |
i = 0 | |
list = [] | |
items = $('b.textcolor') | |
$.each items, (a, b) -> | |
root = $(this) | |
item = root.text().replace /\(.*?\)+/, '' | |
if item | |
list.push item | |
$.each list, (a, string) -> | |
$.ajax | |
url: "http://items.jellyneo.net/index.php?go=show_items&name=#{string}&name_type=exact&desc=&cat=0&specialcat=0&status=0&rarity=0&sortby=name&numitems=1" | |
.done (res) -> | |
price = +$(res).find('.itemstable td a:last').text().replace(RegExp(" NP"),'').replace(RegExp(","),'') | |
if price > 0 | |
console.info '%cITEM: ' + string + ' -- %c' + price + ' NP', 'color:blue;', 'color:red;' | |
i++ | |
if i is list.length | |
console.info '%c>>> FINISHED LIST', 'color:green;' | |
# i made aber and | |
# also an crombie fitch . . . | |
# just holla |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment