a chip trader for BN Nostalgia
This Chip Trader is based on an earlier work of mine, SFRP's Card Trader, which borrowed a function and structure from Omega's Noise Form Card Gen code. Substantially rewritten to implement new techniques.
I tried, but modern anti-XSS protections prevent code on one domain from accessing arrays stored in a script from another domains.
The javascript inserts a drop-down select box on the /post/ pages that acts as player input.
The rest of the code is triggered when the submit button is pressed.
First, it checks to see if somebody is trying to fake their chip prize. Then, depending on selection, it will roll a d20 dice to determine if a Mega Chip should drop or not. Then it chooses a chip from an array, dependant on which tier the player chose. Lastly, it appends a quote containing the chip name. Then it finishes submitting the post to the server.