Creating a leaderboard for a custom command

Hey guys, I’m new to using Nightbot/coding in general, and I’ve spent a couple of hours getting a little text-based game working in my chat.
My commands are:

$(eval z=3600;d=Date.parse(Date());a=$(urlfetch json$(user)~\d+~/g);PRIVATE_KEY+(!a||d-parseInt(a[a.length-1].split(~)[2])>=z*1000?&data=~$(user)~${d}~:``))

$(eval a=$(urlfetch$(query));decodeURIComponent($(querystring)).includes(PRIVATE_KEY)?(a.includes(Successfully added entry)?$(user) draws back their bow, aims, and fires! Great shot $(eval a=$(urlfetch json;a[Math.floor(Math.random()*a.length)]):You've run out of arrows!): )

With my public and private keys, as well as pastebin URL correct, naturally.
The objective of the game is to fire an arrow once per hour, the person then receives a score or miss from the pastebin list. Ranging from “Great shot you miss the target completely!” to "Great shot you hit the BULLSEYE - 10POINTS!

My question is, is there a way to pull data from the shots taken and accumulate the scores into a leaderboard? Or if not accumulative scores, simply a ‘Highest score of the day’?

This far exceeds the general use case of the 3rd party quote system. You’d need to create your own API else where with the logic your looking for in order to reduce the complexity on the Nightbot command.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.