rs-drop-simulator

command module
v0.0.0-...-e3285d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

README

Runescape 3 Drop simulator

A discord bot that simulates drops. The goal is that the user can input a variety of variables that have an influence on the droprate

Currently implemented bosses

All GWD1 bosses:

All GWD2 bosses (except telos):

Project structure

Entry point is in main.go. It loads all the application commands and starts the bot.

Every simulation (like a boss) has its own file in simulations (eg Vindicta), but sometimes common drop mechanisms are grouped (eg Gwd1). The basic workflow of adding a new simulation is as follows:

  1. Create the different droptables and other variables like the URL
  2. Create the command template of type *discordgo.ApplicationCommand
  3. Create a function which takes as argument the amount (if applicable), the droptables and the discordgo.InteractionCreate variable. This will return the dropped items (write main drop logic here)
  4. Create a function with the name of the boss or other with the first letter capitalized. In this function use simulatedrop.go to handle all of the discord stuff. Pass as argument the function you created in step 3.
  5. Add the command in main.go

Interacting with the RS Api and cache (to get the GE Prices) is specified in rsapi.go. Because the RS API is very unstable and not really trustworthy, it's important that when any change happens, it is first tested using rsapi_test.

In every package there's a logger available called log which is configured to work with the google cloud platform. Please use only that log. When creating a new package make sure to create one using logger.CreateLogger(<package name>).

Commands that have nothing to do with simulations are just put in the root

TODO

General
  • Make discord icon
  • Make website?
Code
  • More tests
  • Rare drop table
  • Add option for uniques only
  • Hard mode
  • Add clues?

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL