Quantcast

What works and what is paused · Email is limited to account activation and password resets.

Jump to content


juvian

Member Since 29 Oct 2012
Offline Jun 16 2022 01:43 PM

#2031920 Userscript doubt

Posted by juvian on 03 August 2020 - 09:06 AM

The problem is the start, where the event listener of a click is added to item name for all the logic to happen. In other pages, the html is not the same so you would need to customize it based on every kind of format. 




#1994123 AAA's Revenge : How to get avatar in under 5 minutes

Posted by juvian on 08 October 2016 - 02:12 PM

Cool, i would be interested to hear of your ways :)

 

I am also wondering if anyone has tried this yet? I get a bit confused on what to do at around about step5. Share your sucess stories. :)

 5ZaHx2.jpg

 

 

 

The account in which I tested it from when I posted was never banned




#1993809 AAA's Revenge : How to get avatar in under 5 minutes

Posted by juvian on 29 September 2016 - 07:25 PM

Not sure if this should be under avatars or programming so mods feel free to move the topic.

Anyway, I can't say that you can't get banned for this, do it at your own risk as usual but at least client side, have not seen any security implemented. Unless they track when you open the game and when you send the score (hey, someone opened the game and then sent a score of 1000 in a minute) server-end, don't see any measure to detect that you have cheated. 

So, instructions:
1) Open the game
2) Play, get 3-10 score and loose
3) You are now seeing the game over screen -> DONT click submit score
4) Open developer console (usually f12)
5) Enter console.log(game.state.states.TiledState.prefabs.player.score)
6) If you see a number (the score you made), proceed with next step. If not, something is not working
7) Enter game.state.states.TiledState.prefabs.player.score = 1000
8) Hit Submit Score
9) Enjoy your avvie




#1943283 Why do you keep playing?

Posted by juvian on 02 February 2016 - 10:07 PM

I just need to catch'em all. Not stopping till then

Reasons to quit: friend leave, friends get frozen, nobody plays anymore




#1940867 [Help] Calling all Greasemonkey experts. Is this possible?

Posted by juvian on 26 January 2016 - 02:32 PM

Seems I got late. Thanks :)




#1931725 Item Database

Posted by juvian on 14 December 2015 - 08:16 AM

I believe Abrosia checks the prices of items in the background, while you're running it, so yes, if you AB you automatically contribute. As for rarity, I suppose we could do that, but I'm not sure how hard that would be to program into the database, since we'd have to get the rarity of every single item we're missing a rarity for, which could possibly be a very large number of items. I'm not exactly sure how many are missing rarity information. It would be nice if we could just manually edit that as well. 

Have scanned all np jn item info like 3 times and it takes less than an hour, could easily generate a json with the data and then parse to add missing data to db. Only "hard" part is that some items have either duplicate name or duplicate image, and jn does not provide ids publicly. Still, the combination of name+img is always unique, so I used something like that for one of my extensions




#1929238 Attention - Duped Items In Usershops!

Posted by juvian on 08 December 2015 - 05:25 PM

I don't think they can be bought, but it's interesting to look at lol.

If you try to buy it says you can't buy something priced at 0np :p. Before galleries existed, "gallery" items were in shop along with normal ones




#1926820 [chrome extension] NeoTools for your basic needs

Posted by juvian on 28 November 2015 - 04:53 PM


NeoTools



So, have been wanting to do this since charity corner, but it got more complex that expected and ended up with little time as I had a lot of exams. Now that the exams are over, was finally able to fix several bugs I still had (though it probably still has some) and so have decided that the current version is good enough to post here. Works the fastest it can be with javascript

Features it has:
 

  • quickStock: can deposit items from inventory really fast (have had trouble when I had over 1k items on inv myself, takes so long to do it manually). Can also just deposit items matching x such as "dung"
     
  • moneyTree: can try to get 10 random items from money tree donations that have not yet appeared on the donations page. Basically gets items from the "future", a few minutes before they should appear. Its a gamble, but for a daily its not bad and have gotten some nc items a few times
     
  • wishingWell: makes a donation of 21np of the item you want to the wishing well. If you haven't reached 7 cap limit, it auto-donates again
     
  • generalStore: autobuys the amount you want of an item from general store (used this to buy 5k jingle bells on charity event xD)
     
  • accountInfo: useless stats such as np, nc, username, activepet name
     
  • shopWizard: autobuys an item from user shops really efficiently. Can set min, max, exact or containing, qty of items to buy, qty of times to run the search, and wait time between searches


    ​

First version so expecting some feedback to add/fix things, feel free to comment ;)




How to install it:

 

  1. Extract the folder somewhere on your computer
  2. Open chrome and go to chrome://extensions/
  3. Click on the developer mode checkbox
  4. Click on load unpacked extension
  5. Select the folder you extracted on step 1
  6. Done



     


How to use it:

 

 

  1. Open chrome and go to chrome://extensions/
  2. Click reload under NeoTools
  3. Click inspect views: background.html (or the incognito version if you are in incognito (will have to click on allow in incognito))
  4. Developers tools should now be open. Go to console tab
  5. Enter neoTools.command
  6. Wait for results


     


​

Commands examples:

 

  • neoTools.quickStock() --> deposits all items in inv
     
  • neoTools.quickStock({match: "dung"}) --> deposits all items in inv that have dung in its name
     
  • neoTools.quickStock({all: false}) --> deposits only up to one page of items (70)
     
  • neoTools.quickStock({match: "dung", all: false, qty: 1, type: "stock"}) --> stocks in shop up to 1 item containing dung in its name. Available types: deposit, stock, donate, discard, gallery, closet, shed

     
  • neoTools.moneyTree() --> tries to get 10 random items from money tree from "the future"

     
  • neoTools.wishingWell("Neopets 16th Birthday Goodie Bag") --> makes a 21 np wish of Neopets 16th Birthday Goodie Bag until it has reached the cap limit

     
  • neoTools.loadAccountInfo() --> loads useless stats, only necessary if you haven't done any other command yet
     
  • neoTools.accountInfo --> view current np, nc, and such

     
  • neoTools.generalStore({name:"Jingly Bell", limit: 10}) --> tries to buy 10 Jingly Bell from general store

     
  • neoTools.shopWizard({name:"pile of dung"}) --> searches sw for a pile of dung and buys it
     
  • neoTools.shopWizard({name:"dung", criteria: "containing"}) --> searches sw for something containing dung until it finds one and buys it
     
  • neoTools.shopWizard({name:"pile of dung", min: 200, max: 1000}) --> searches sw for pile of dung between 200np and 1000np and buys it
     
  • neoTools.shopWizard({name:"pile of dung", qty: 10, max: 200}) --> searches sw for pile of dung for less than 200np and buys 10
     
  • neoTools.shopWizard({name:"pirate draik morphing potion",  stopWhenBanned: false}) --> searches sw until it buys a pirate draik morphing potion, and if banned will auto-run again when the banning time has ended
     
  • neoTools.shopWizard({name:"pile of dung", spendUntil: 200, qty: 100}) --> in theory it should buy pile of dungs until it has spent 200np or more on them, have't tested it much. Or stops if it buys 100 of them, whichever happens first
     
  • neoTools.shopWizard({name:"pile of dung", maxRuns: 10, max: 10}) --> will either buy a pile of dung for less than 10np, or will stop searching after 10 searches
     
  • neoTools.shopWizard({name:"pile of dung", waitTime: 1000*10}) --> waits 1000*10 milliseconds between each search, that means 10 seconds

     
  • neoTools.clearRequests() --> in case anything goes wrong, this should abort all active requests and erase pending requests





Sw autobuyer is not stopping or I accidentally put to buy 100 pile of dungs but did not put max on it so it could buy some for 99999 np

 

 

  1. do neoTools.clearRequests() --> should work 99% of cases
     
  2. do neoTools.requestManager.stop() --> won't do any further request until neoTools.requestManager.play() + (neoTools.requestManager.run() or any other command) is used
     
  3. go to chrome://extensions/ and click on reload, then close the developer tools window you had, and open it again
     
  4. exit chrome --> should never reach this point :p




     

Advanced examples: (for coding users)

 

 

 

  • neoTools.quickStock({match: function(name){if(name== 'pile of dung' || name.indexOf('nerkmid') != -1){return true;}else{return false}}}) --> deposits all items matching the name pile of dung or items which name includes the word nerkmid
     
  • neoTools.shopWizard({name:"dung", qty: 1, criteria: "containing", max: 500, shouldBuy: function(id,stock,price,name, owner){
        if(name == "pile of dung"){
            return true
        }
        return false
    }}) --> searches for dung, but only buys if it's a pile of dung
     
  • neoTools.shopWizard({name:"secret laboratory map", qty: 10, shouldBuy: function(id,stock,price,name,owner){
        if(id == 8448 && price < 50000){
        return true;
        }else if(id == 8444 && price < 40000){
        return true;
        }else if(price < 1000){
        return true;
        }else{
        return false;
        }
    ​}}) --> searches secret laboratory map, and according to the id of the map piece and its price, it decides to buy or not. Useful for nerkmids, secret lab, paint brushes and such




Some Screenies:


w1K4O.jpg6WSfQ.jpg

Attached Files




#1916969 Charity Corner 2015

Posted by juvian on 06 October 2015 - 03:49 PM

Athayde asked me to let you all know that she's not answering anyone because she has no internet at home, and the computer at her job is acting strange, she doesn't know why or how to fix it.

The Universe is talking. It does not want the glitch to be known xD




#1916749 Charity Corner 2015

Posted by juvian on 05 October 2015 - 04:40 PM

Now I'm curious to know who rep my last post. I wonder if it's someone that found out about this too. :p

I think we got it, tbw.

Found it out last year, though this year is less permissive. You can check my post on trading forum :p




#1892737 [Tutorial] Python's Guide To Image Matching (and Mystery Pic)

Posted by juvian on 11 July 2015 - 05:56 PM

Ever wondered how some people know the mystery pic answer? Well, some are born with supernatural powers that allows them to realize which image is it just by the colors in it, but unfortunately I was not born with them so as soon as they released mystery pic again after months of absence, I started to wonder if it was possible to make a program that solves it. Of course a program can solve it, but wanted to have a solution that took less than a minute to solve it, so that's the hard part ;).

Even if it sounds hard, DON'T PANIC. If you read enough and try hard, all is possible. So, after some weeks of programming and testing a looot of possible solutions, I'm finally happy with the results and wanted to share them to the community.


I did this with python, with the help of several libraries:

  • PIL (pillow) -> this handles image reading convertion to rgb
  • urllib -> to download images
  • ThreadPool -> to make some things faster with pools
  • numpy -> this does a lot of array handling in c++ to make it faster


1) Downloading an item image from the internet:

def doWork(img): # download image and save on images folder with image name
	urllib.urlretrieve("http://images.neopets.com/items/"+img, "../images/"+img)


def downloadImages(arr): # pass array of item image names to download

	print "downloding " + str(len(arr)) + " images"

	p = ThreadPool(processes=50) # makes it faster

	p.map_async(doWork, arr).get(999999999)


2) Reading an image and converting to rgb:

def ImagetoRgb(name): # pass name of the image inside our images folder, open and return rgb conversion

    return Image.open("../images/"+name).convert('RGB')

3) Figuring out mystery pic "real" dimensions: (even if its a 150x150 px image, we actually only care about 5x5). The idea is that we check every row and every column, to check in how many pixels it changes color. When it changes, we save this count if it is lower than our max. So even if the image has repetead pixels, as we only pick the lowest distance from one color to another, we will actually pick the right count: 150/5 = 30


 

def getImagetoSolve(link):
	im = Image.open(link).convert('RGB') #open our image
	imx = im.load() // load pixel data

	minCount = 9999 # we start with a big number of our lowest pixel distance

	for x in range(im.size[0]): # img.size[0] is the width
		difColors = [] # colors we have checked on this row
		difColors2 = [] # colors we have checked on this column
		r1=1 # our current distance in row is 1
		r2=1 # our current distance in column is 1
		for y in range(im.size[1]): # img.size[1] is the height
			col = imx[x,y] # this gives the pixel in the x,y coordinates
			col2 = imx[y,x] # this gives the pixel in the y,x coordinates

			if col not in difColors: # if its a pixel we haven't seen
				difColors.append(col) # we add it as seen
				if r1 > 1: # if its not the case when we actually start, this means we reached a new color 
					minCount = min(minCount, r1) # we update our ditance
			else:
				r1+=1 # if not, we have traveled 1 pixel more without a new color
			
                        # the same but with column
			if col2 not in difColors2:
				difColors2.append(col2)
				if r2 > 1:
					minCount = min(minCount, r2)
			else:
				r2+=1


        # now we know the real distance between pixels, that is to say, every x pixels there is a new pixel color

	tileSize = im.size[0] / minCount # tileSize represents each pixel size in the 150x150 image (30 pixels if its 5x5)

	minCount = im.size[0] * 1.0 / tileSize # 150x150 in a 9x9 image is not a round number, so we fix the minCount to represent exact value

	pixelData = [] # real data we care about (5x5 or 9x9)

	print link, tileSize, minCount

	for y in range(tileSize): # here we add each pixel we care about to our grid
		pixelData.append([])
		for x in range(tileSize): # we pick the pixel at coordinates x*mincount,y*mincount but that might give a value with decimals so we do a little math fix
			pixelData[y].append(imx[math.floor(x*minCount)+1,math.floor(y*minCount)+1])


	arr1=numpy.array(pixelData) # we pass it to numpy array which is much faster
        
        #return useful stuff
	return { 
		"img": im,
		"imx" : imx,
		"tileSize": tileSize,
		"pixelData": arr1
	} 


4) Comparing the new 5x5, 9x9 or 10x10 pixel image we now have with an image we want to check:

This can be done with a simple pixel x pixel match, but this would take hours to solve if you want to compare against 100k images and check for rotations as well. So after a bit of searching, there is an awesome concept called integral image, which is really nicely explained on wikipedia, but the idea is that we want to match a 5x5 pixel image window over a 80x80 (as example). The idea of integral image is that instead of having a grid with all the pixels, we pass that to a grid of sum of pixels, in a way that we can easily know the sum of pixels on a 5x5 window of the 80x80 image.

So instead of checking against every pixel, we actually only check if the sum of pixels of  the 5x5 image is the same as the window we are looking on the 80x80 one. If it doesn't match, there is no need to check if all pixels match. If it matches, its possible that it is a perfect match, so we add that region as possible regions to analize later pixel by pixel (note that except extreme cases, if it gives a posible region it most likely will be the match we want)

And the awesome part is that the integral image of the 5x5 one is the same as its possible rotations, as we just sum up all the pixels values
 

def find_image(im, tpl): #check if matches, if it does it returns the location of the match. If not, throws an error . im is our 80x80 image, tpl is our 5x5 template

	im = numpy.atleast_3d(im) # we make sure it has at least a depth of 3 (red,green,blue)
	tpl = numpy.atleast_3d(tpl) # we make sure it has at least depth of 3 (red,green,blue)

	H, W, D = im.shape[:3] # we get the heigh, width and depth
	h, w, d = tpl.shape[:3]

	# Integral image and template sum per channel
	sat = im.cumsum(1).cumsum(0)
	

	# Calculate lookup table for all the possible windows
	iA, iB, iC, iD = sat[:-h, :-w], sat[:-h, w:], sat[h:, :-w], sat[h:, w:] 
	lookup = iD - iB - iC + iA


	# Possible matches
	tplsum = numpy.array([tpl[:, :, i].sum() for i in range(D)])

	possible_match = numpy.where(numpy.logical_and(*[lookup[..., i] == tplsum[i] for i in range(D)]))

	hastoCheck = False

	for possibility in possible_match: # if there isn't a possible match, we don't have to check anything else
		if len(possibility) > 0:
			hastoCheck = True

	if hastoCheck: # if there is a possible match, we have to check pixel by pixel against the 5x5 one, and its possible rotations 
		zipped = zip(*possible_match)
		tp2 = numpy.rot90(tpl)
		tp3 = numpy.rot90(tp2)
		tp4 = numpy.rot90(tp3)
		for tp in [tpl,tp2,tp3,tp4]:

			# Find exact match
			for y, x in zipped:
				if numpy.all(im[y+1:y+h+1, x+1:x+w+1] == tp):

					return (y+1, x+1)



	raise Exception("Image not found")

Between this and a bit of threading, I was able to match a 5x5 image against 45723 item images I obtained in just 12 seconds using 100% cpu. Took more to read the images and start the threads than the actual matching which takes less than 0.02 seconds each. Using 50% cpu it took 20 seconds

So this awesome method of image matching is great for our purpose and quite useful for a lot of things in general when we want to match something exactly in an efficient way

However, all this image matching is not actually really necessary to match in less than a minute. Another choice is using a database and storing the images in a way we can filter the ones that do not even have the pixels that the 5x5 image has. Why check an image with no blue pixel if the 5x5 one has a blue pixel? That's the general idea, and I tried over 10 methods of doing probability filters and things like that but they all took a lot (30-60 seconds, which is more than manually matching) and besides were a pain to set up the data on the db.

Finally, in my last try I decided to go with a pretty straightforward and simple structure, just make a row on a images table with image name and all its unique pixels data. Then, I check the unique pixels of the 5x5 image and query the images that have all those pixels on it. With this, the program took 10 seconds and the actual query on mysql took 3-4 seconds.

The best part of this approach is that it will work better when you need to match against more than 40k images, and surprisingly enough, with the last 3 mystery pic competitions when I made the query on the db, only the picture that was the actual solution wasn't filtered out! This says a lot about the uniqueness of pixels, even if the 5x5 image had only 6 different pixels, from the 47k images I had only 1 had exatly the same pixels in them

All in all, my program is 400 lines, with both the db and integral image approach.

Feel free to ask any questions or give an idea for an ever better solving! I'm pretty sure this would solve any mystery pic in under a minute with all neo pictures though :)

 




#1889764 filters are off and mods are gone

Posted by juvian on 29 June 2015 - 06:21 PM

Not sure if this was already posted:

z2dycDR.jpg




#1888658 Altador Cup X

Posted by juvian on 26 June 2015 - 03:14 PM

Staff tourney prizes are up! Had 17k points so wanted to get 17 books, but was too lazy to make so many clicks so got them repeating fast the same request. Ended up with 23 in inv xD. Will not get you millions of np but still fun it happened, duping might be possible in the future if they keep like this... wonder if it will work on real ac prizes as well




#1862689 Altador Cup X

Posted by juvian on 08 May 2015 - 07:05 PM

And remember to spend points from last year, will be worthless in a few weeks ;)




#1850369 [chrome extension] Neopets Item Helper

Posted by juvian on 27 February 2015 - 04:10 PM

With tens of thousands of items on Neopets, I'm sure many of you have at times spotted items and caught yourself wondering

if they were absolute junk or a real treasure: If you are one of those people, this extension is for you!

 

This Chrome extension adds a coloured border around the item image of every item,

based on the price it retrieves from my (ssw-based) item price database.

 

The ssw prices were retrieved approx. two months ago, so while this may not be ideal as a restocking supplement,

it does help you quickly identify junk from value, especially for items older than half a year.

 

Optionally, if enough people are interested and the NeoCodex staff approves of the script,

we could look into hooking up this script to the NeoCodex price database.

 

The price legend is as follows (and if an item is buyable, the price will be shown on hover):


Green >> item worth 1np-50000np

Yellow >> item worth 50000np-90000np

Red >> item worth 90000np-99999np

Black >> UB item

Purple >> item not in my database (NC or new item)

 

The extension currently works in the Trading Post, Auctions, Inventory, Safety Deposit Box, User Shops, NPC Shops and in Galleries.


Here are some screenshots of the extension in use:

dZhSx.jpgEhxDd.jpg

 

(click the images to see their enlarged versions)
 

 

To install the extension, you have to do the following:

 

1) Go to http://chrome://extensions/

2) Select the 'Developer Mode' checkbox

3) Unzip attached file

4) Select 'Load unpacked extension'

5) Browse folder you have just extracted and select

6) Done! Go to neo and enjoy

 

Please note: I made this extension for personal use, but after chatting about it with friends realised it may be of use to other players,

so I decided to share it. Feedback/comments are therefore highly appreciated!

 

 

 

Attached Files