Collection Ranks

fronobulax

Developer
Staff member
I'm not sure whether this is the right place for this. A case could be made that I should just PM Zarqon.

The Bat Page contains a rank that is derived from the Jicken Wings collections database and/or the RSS feed from that which is used on the KoL Wiki. I would like to be able to produce a report for all the items that I have more than one of in my display case. This report would tell me how I rank on the list of collectors. My application would be to then use that rank and determine which things I should continue to collect because a Top Ten slot appears to be within reach and which things I should just sell off.

Any suggestions as to the general approach? I could solve the entire problem by web scraping Jicken Wings but I always feel a little "dirty" when scraping. I could adopt a hybrid approach where ash generates the list of things to be queried and then some external scraping gets the rank. Any other suggestions? Zarqon has clearly solved the problem. Is anyone else besides me interested? Perhaps we could send him bats to encourage him to share his code?

Thanks.
 
A case could be made that we should send him bats anyway. But as I'm curious to hear his answer too, I'm glad you didn't just PM him. This seems of general enough interest that it belongs here!
 

halfvoid

Member
He also gets a daily dose of bricko bat(s) from me, but i sure wouldn't mind a publicly available script such as this, or perhaps even added as a part of the bumcheekcity pages.
 

zarqon

Well-known member
Right then.

Here's displayman.ash, which I call on logout (I removed the part that automatically updates the table on my website). It maintains palindromic numbers of display items, adding more whenever you will make the next palindromic number. Note that it will also try to create your collected items if createable_amount() > 0. Optionally, it gradually buys more of them. After running, it prints a table in the CLI like the one on my Bat King of the World page.

NOTE: You will need to edit this script before running it. Change the my_name() check and the part where it builds the list of items. Note that this will work with multiple characters if you build a different list depending on my_name(). The true/false value is whether or not you would like the script to occasionally buy one more of the item.

It caches everything and scrapes Jicken Wings when you have 1) new items, or 2) a different amount of items. This minimizes server hits (which are sluggish, by the way).

I don't intend to support this or release updates, so take it and do what you will with it. Have fun!
 

Attachments

  • displayman-publi&#99.ash
    8.2 KB · Views: 43
Top