Quantcast

Jump to content


Photo

syaopup's Packrat buyer


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

#1 syaopup

syaopup
  • 61 posts

Posted 13 April 2012 - 08:36 PM

*
POPULAR POST!

Main features:
- Import item list from text file
- Checks SDB for amount of different items and items already owned
- Buys just enough to reach 1000 items in SDB
- Deposits items whenever inventory is full
- If option to check SDB isn’t chosen, it’ll just buy everything on the list
- Waits for shop wiz ban to be over before continuing*

*For shop wiz ban, I wasn’t able to test it out myself but it should work, theoretically. Bought over 300 items in one hour and hit 1000 items before I was banned. :/
It's scripted in VC# so.... sorry non windows users. :x

Attached File  Packrat buyer.zip   46.97KB   401 downloads
Posted Image

Instructions:
- If you choose to use a proxy, only login after testing it to make sure the program registered it and that it is working.
- Import a list of 1000 cheap items. You can find Neocodex’s here, or you can use the one included in the zip file. (Note: The item 'Misdirected Sign Post' should be named 'The Way to Adventure Sign Post', the itemdb needs to be updated.)
- Make sure you have at least 15,000np on hand before starting (30,000np to be safe), as the program will stop if you run out of np.
- Check the checkbox if you want to check through your SDB for the number of different items you have and already own, and the program will only buy just enough items that you don’t have to hit 1000 items in the SDB.
- The program won’t visit the SDB and get the avatar for you. Figured that some of you might want to take a screenshot or see it for yourself.
- If you want to stop the program, close it. I may or may not implement a pause/stop feature in the future. :p

While testing with a delay setting of 1000ms - 2500ms, it took about an average of 7-10 seconds for each item to be bought. That means the estimated time needed to buy 1000 items is 2hrs 20min+, assuming no shop wiz ban. I did not use any proxy, but I live in Asia so I don’t know how much that affects loading speed.

If security of accounts is an issue, I wouldn’t mind zipping up the source code and have someone check through it.

Lessons learned coding this (ignore unless you are interested in reading the thoughts of a newb programmer and her experiences. :p)
Spoiler

Special thanks to
Inkheart for showing me the way of the Regex, and
Adam and his unfinished packrat grabber script, it showed me a rough idea of how to go about implementing it. :)

#2 Strategist

Strategist
  • Sadmin


  • 9,504 posts


Users Awards

Posted 13 April 2012 - 08:39 PM

NICE! Good work Syao XD +rep. Ill try this out on a shell soon.

#3 Yung

Yung
  • Codexian

  • 3,358 posts


Users Awards

Posted 13 April 2012 - 08:40 PM

Looks good, +Rep, added to the Neocodex Guide Directory.

#4 trizzle

trizzle
  • Deceptive Minx

  • 973 posts


Users Awards

Posted 13 April 2012 - 08:46 PM

This looks awesome :D I only wish it had been around when I got packrat on my main :p

Just about to try it out on a shell, thanks syaopup (:

#5 Neoquest

Neoquest
  • 1,680 posts


Users Awards

Posted 13 April 2012 - 08:50 PM

Awesome job! It has every feature you could possibly want! The GUI is also very clean, I'm running it right now and it seems to be doing the job perfectly :)

#6 Elindoril

Elindoril
  • Weeaboo Trash

  • 9,011 posts


Users Awards

Posted 13 April 2012 - 08:55 PM

NEETs gonna NEET.

#7 cornymikey

cornymikey
  • 160 posts

Posted 13 April 2012 - 09:05 PM

program looks great once again.

#8 Boggart

Boggart
  • Professional Napper

  • 7,981 posts


Users Awards

Posted 13 April 2012 - 09:18 PM

Nice :D well done!

#9 Bone

Bone
  • no

  • 3,638 posts


Users Awards

Posted 13 April 2012 - 09:35 PM

NEETs gonna NEET.


How presumptuous.

#10 Steve

Steve
  • 238 posts

Posted 13 April 2012 - 10:34 PM

Anyone know how much NP this normally takes up?

#11 Inkheart

Inkheart
  • 268 posts

Posted 13 April 2012 - 10:39 PM

Anyone know how much NP this normally takes up?


An inconsequential amount.

Edit:

File.read('prices').split("\n")[0..999].map { |e| e.split('|')[1].to_i }.reduce(:+)
comes out to 12525.That's the NeoCodex price data from April 3rd, so it's fairly up-to-date. That's only the price for the cheapest thousand items, though, but you're not likely to spend more than 15 or 20k.

Edited by Inkheart, 13 April 2012 - 10:43 PM.


#12 syaopup

syaopup
  • 61 posts

Posted 13 April 2012 - 10:48 PM

Also, I'm not quite sure how you managed to buy 300 items in an hour (unless you got lucky and started the process mid-way through the hour).

I have no idea either.
This is what the log printed out from 12am to 12:40am+ when it finally finished buying my items. My timezone starts the hour at the same time neopets starts their hour, so all these 307 buys were in the same hour. (I then checked my SDB and did get my avatar, so it wasn't reporting false positives.)
Spoiler


Anyone know how much NP this normally takes up?

Neocodex's Packrat list estimates it at 12,00np+. It fluctuates, so have 30,000np out just in case.

#13 Spirited

Spirited
  • 677 posts


Users Awards

Posted 13 April 2012 - 10:58 PM

Congrats on completing it syao! ^_^

Is there a way to set a max NP for each item? (Like say 1np for those really cheap items)
Sometimes the shopwiz scams me (especially when trying to feed kads). :p

But great work anyway! :)

#14 Neoquest

Neoquest
  • 1,680 posts


Users Awards

Posted 13 April 2012 - 11:05 PM

I have no idea either.
This is what the log printed out from 12am to 12:40am+ when it finally finished buying my items. My timezone starts the hour at the same time neopets starts their hour, so all these 307 buys were in the same hour. (I then checked my SDB and did get my avatar, so it wasn't reporting false positives.)

Spoiler



Neocodex's Packrat list estimates it at 12,00np+. It fluctuates, so have 30,000np out just in case.


The maximum amount of searches you can make in an hour is 360, according to JN, so it's perfectly possible.

Also:
[2012-04-14 12:04:11] Bought 490items, spending a total of 3082np. Check your SDB to receive your avatar.

Very nice :)

#15 syaopup

syaopup
  • 61 posts

Posted 13 April 2012 - 11:36 PM

Would it be possible for you to completely automate it and have it grab the latest list from the Neocodex Packrat list?

Seems possible, I'll see how I can include that in.
(Inkheart on tc: "Looks like a RegEx waiting to happen. : )")

#16 sarah.

sarah.
  • 5,392 posts


Users Awards

Posted 13 April 2012 - 11:40 PM

I got an error about my .NET framework not being a high enough version, and it made me update to version 4. Now it works :p looks great so far, not run it yet though.

(Computer's crap!)

#17 Progoo3

Progoo3
  • 137 posts

Posted 14 April 2012 - 12:20 AM

Thanks! Definitely going to try this out! I'd never have gotten the avatar without this program. I'm way too lazy :S

#18 GumCuzzler

GumCuzzler
  • Creature of the Night

  • 921 posts


Users Awards

Posted 14 April 2012 - 01:34 AM

Congrats for providing an impression contribution :) +Rep

#19 mentalfox

mentalfox
  • 112 posts

Posted 14 April 2012 - 01:36 AM

I'm going to try that ^^
I'm not lazy to buy the items myself... But this could be nice.
=)

Edited by mentalfox, 14 April 2012 - 01:36 AM.


#20 sarah.

sarah.
  • 5,392 posts


Users Awards

Posted 14 April 2012 - 01:38 AM

Aww, I love this.

Something Has Happened!
You are now eligible to use 'SDB Pack Rat' as an avatar on the NeoBoards!

It got me the avatar and I also now have a baby nimmo! :p

#21 Kuragehime

Kuragehime
  • 95 posts


Users Awards

Posted 14 April 2012 - 02:05 AM

Woah what a nifty tool! :D

Unfortunately I'm a real packrat on my main and have enough 'junk' items to get this avatar a couple times over... I'll have to try it out with another account XD

#22 Nymh

Nymh
  • Keeper of Secrets

  • 4,626 posts


Users Awards

Posted 14 April 2012 - 04:44 AM

Would it be possible for you to completely automate it and have it grab the latest list from the Neocodex Packrat list?


Does the Codex Packrat List actually self-update, or is it just a static list? I noticed when doing my packrat that the prices on the List were sometimes very off from what they were on that item's page in the iDB, and several (dozens of) items were duplicated on the list. This has been a few months ago, though, in case there have been any updates to it since then.

#23 Inkheart

Inkheart
  • 268 posts

Posted 14 April 2012 - 05:08 AM

Does the Codex Packrat List actually self-update, or is it just a static list? I noticed when doing my packrat that the prices on the List were sometimes very off from what they were on that item's page in the iDB, and several (dozens of) items were duplicated on the list. This has been a few months ago, though, in case there have been any updates to it since then.


Just on a whim, it appears to be dynamic. The Ghostkerchief definitely wasn't third last time I checked.

#24 syaopup

syaopup
  • 61 posts

Posted 14 April 2012 - 05:53 AM

Does the Codex Packrat List actually self-update, or is it just a static list? I noticed when doing my packrat that the prices on the List were sometimes very off from what they were on that item's page in the iDB, and several (dozens of) items were duplicated on the list. This has been a few months ago, though, in case there have been any updates to it since then.

It updates pretty often. When I first used it to test my program, it had 'Cherries Jubalee' in it, but now it isn't even in the list. The estimated cost of all 1000 items seem to change at least once an hour, although it might be more often than that too. :)

#25 Nymh

Nymh
  • Keeper of Secrets

  • 4,626 posts


Users Awards

Posted 14 April 2012 - 06:02 AM

Hmm, ok

Then it must have looked to me like the items were being repeated later in the list, when really it was just a matter of time between queries and the list updating and shuffling items around.

Silly me :rolleyes:


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users