NATION

PASSWORD

SherpDaWerp's Puppet Checker - Easily Manage Card Farms!

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
SherpDaWerp
Diplomat
 
Posts: 626
Founded: Mar 02, 2016
Civil Rights Lovefest

SherpDaWerp's Puppet Checker - Easily Manage Card Farms!

Postby SherpDaWerp » Sat Feb 29, 2020 8:03 pm

Useful code time!

I made this a while back for my personal use, because using Auralia's wrapper makes using the NationStates API so much easier. However, recent discussion on the NS Cards discord server prompted me to release this code to the wider world! What it does is it uses Node.js to find out how many issues, how many card packs, how much bank and how much deck value your puppet nations have.

Linky here: https://github.com/abrow425/ns-puppet-checker.

DISCLAIMER: THIS SCRIPT REQUIRES YOU TO PUT YOUR PUPPET PASSWORDS IN!
I have no way to access these passwords if you follow the setup instructions of the README file. All you are doing is putting these passwords into a local file on your computer. The API needs these passwords to check the number of issues and the number of card packs that your puppet has, because these details are something you cannot see without logging in.

Because you have to put passwords in, I am operating under the assumption that you own these nations and are keeping them alive. So, please don't put in CTE nations.

To run the code, follow the instructions found in the README file. Basically, go here and scroll down. It's decidedly less easy to use than Valentine's script, but it can read a couple more things (packs, issues) because it uses authentication.

If you have any suggestions, issues, tips, or bugs then don't hesitate to: TG me, post a reply on this page, or ping me in Discord if you're in the Cards server.

Go forth, and farm your hearts out!
IRL: High school student who actually doesn't have any assignments left to do...
NS: Owner of Imperial Stronghold | Citizen of The North Pacific | Writer of Issues | One-time Delegate of Glass Gallows | My color is epic

User avatar
9003
Chargé d'Affaires
 
Posts: 384
Founded: Oct 25, 2012
Father Knows Best State

Postby 9003 » Sat Feb 29, 2020 8:06 pm

Thanks!

What happens if I do put a CTE nation in or a fake nation in becuse I miss spell a name
proud member of PETZ people for the Ethical Treatment of Zombies

Active member of The cards market place discord

User avatar
SherpDaWerp
Diplomat
 
Posts: 626
Founded: Mar 02, 2016
Civil Rights Lovefest

Postby SherpDaWerp » Sat Feb 29, 2020 8:09 pm

For now, it throws an UnhandledPromiseRejectionWarning. That's the first thing I'll try to fix.

In the meantime, if it does this, do a KeyboardInterrupt and check your list of puppets to make sure they're all spelled correctly.

EDIT: Ok, done. Due to the fact that the program has to make 2 API calls per nation, you might get errors twice if the program keeps running. But they are now handled a lot smoother than before.
Last edited by SherpDaWerp on Sat Feb 29, 2020 8:45 pm, edited 1 time in total.
IRL: High school student who actually doesn't have any assignments left to do...
NS: Owner of Imperial Stronghold | Citizen of The North Pacific | Writer of Issues | One-time Delegate of Glass Gallows | My color is epic

User avatar
Valentine Z
Powerbroker
 
Posts: 7804
Founded: Nov 08, 2015
Scandinavian Liberal Paradise

Postby Valentine Z » Sun Mar 01, 2020 3:54 am

As I have said in the card server, thank you all for your acknowledgements and credit to me! I have to admit that my code was not as user-friendly and requiring logging into Gmail because it was at first, a quick and dirty solution for myself to keep track of how much bank my puppets have. Eventually, the idea grew and grew thanks to you all with the suggestions. ^^

As always, feel free to work on and improve on whatever that you guys have! With you being able to log in, being able to display how many issues you have, along with the number of packs you have, is nothing short of amazing and it will make the job of card farmers easier! ♥

Thank you, once again! ^^



Valentine Z GIF Flag (Improved!)
The Valentine Z CV.
NationStates 1st Flag Bracket - 1st place!
Issues Thread 4th in Gen Sec

The Sixty! Opinions Deposit! Valentian Stories! Gwen's Adventures! Cat Anthem! Valentian News.
If you are reading my sig, I want you to have the best day ever ! You are worth it, do not let anyone get you down !
Glory to De Geweldige Sierlijke Katachtige Utopia en Zijne Autonome Machten ov Valentine Z !
Q & A Here! | Heights of NS! Add yours now!

Clarissa mistaken for Smurf/Avatar: 10
Valentijn called She: 38
Disappointing F7 Responses: 197

• Eat my freaking tranquility. - Zenyatta
• Never trouble trouble until trouble troubles you.
• World Map is a cat playing with Australia.

• Am I a pretty girl?

User avatar
SherpDaWerp
Diplomat
 
Posts: 626
Founded: Mar 02, 2016
Civil Rights Lovefest

Postby SherpDaWerp » Sun Mar 01, 2020 8:17 pm

Valentine Z wrote:As I have said in the card server, thank you all for your acknowledgements and credit to me! I have to admit that my code was not as user-friendly and requiring logging into Gmail because it was at first, a quick and dirty solution for myself to keep track of how much bank my puppets have. Eventually, the idea grew and grew thanks to you all with the suggestions. ^^

As always, feel free to work on and improve on whatever that you guys have! With you being able to log in, being able to display how many issues you have, along with the number of packs you have, is nothing short of amazing and it will make the job of card farmers easier! ♥

Thank you, once again! ^^

Your original public version was amazing, and it's still probably easier to use than my version purely because it can be run online. Though, now that Racoda's version is out there, there's a third alternative too.

It's kinda cool that the existence of cards has driven so many more API-based tools to be created.
IRL: High school student who actually doesn't have any assignments left to do...
NS: Owner of Imperial Stronghold | Citizen of The North Pacific | Writer of Issues | One-time Delegate of Glass Gallows | My color is epic


Return to Technical

Who is online

Users browsing this forum: Ballotonia, Devionsa, Dytarma, Grishahakkaverchynot

Advertisement

Remove ads