adding droppy plugin#10409
Conversation
|
This plugin requires a review from a Plugin Hub maintainer. The reviewer will request any additional changes if needed. Internal use only: Reviewer details Maintainer details |
fixed icon issues and adjusted the UI
|
Hi , any updated or required changes I should make? This is my first plugin release so I would like to make sure to make it as easy as possible for future pr's |
|
I believe it would be better if you scraped the wiki and hosted whatever rates you needed on a GitHub pages and had the client download them instead of the client fetching from the wiki everytime. |
|
Also does the !dry command only work for yourself? I don't see where it shares your drop info. |
Great Idea, I will implement this. Thank you for the suggestion |
Drop rates are now scraped from the wiki at build time using ./gradlew updateDrops and bundled into the JAR as a JSON file. The client never hits the wiki at runtime, it's all just a local hashmap lookup. So no GitHub Pages needed, the data ships with the plugin itself |
Good catch, Now when you type !dry Vorkath( for example), the plugin uses registerCommandAsync to hook into the chat system with an input handler and an output handler. The input handler fires before your message is sent, it builds your dry stats response and POSTs it to a Cloudflare Worker backend (KV store with a 5-minute TTL, nothing permanent). Then the message goes through game chat as normal. On the receiving end, when any player with Droppy installed sees a !dry message in chat, the output handler fires. If it's from another player, it GETs that player's stats from the API and displays them using setRuneLiteFormatMessage. If it's your own message, it just builds the response locally since you already have your own data. So both players need Droppy installed for it to work, I couldn't come up with another way to get it working without posting the command results directly to chat but that felt spammy. |
I have fixed this wiki fetched for drop chances, it is now a local json I have also tweaked the !dry command, it now fires a post to cloudwatch and players in the area with droppy will fire a Get to fetch the statistics
|
Thank you for your recommendations and reviews, please let me know if there's anything else I can do to optimize this or learn! |
* add droppy plugin * Update commit reference in droppy plugin * Update commit hash for droppy plugin * Update commit reference in droppy plugin fixed icon issues and adjusted the UI * Update commit reference in droppy plugin I have fixed this wiki fetched for drop chances, it is now a local json I have also tweaked the !dry command, it now fires a post to cloudwatch and players in the area with droppy will fire a Get to fetch the statistics * Apply suggestion from @riktenx --------- Co-authored-by: riktenx <riktenx@gmail.com>
Shows you how dry (or lucky) you are on collection log drops. Pulls rates from the OSRS Wiki, tracks your KC, reads your clog, does the math for you.