Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Arodab authored Oct 31, 2024
2 parents ea98ba7 + 96933cd commit 5c16f09
Show file tree
Hide file tree
Showing 125 changed files with 7,852 additions and 6,861 deletions.
52 changes: 38 additions & 14 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,50 @@ This assumes you are using VSCode as your IDE. If you have errors or issues, you

### Discord Bot Account

1. Create a discord bot account, and have the application ID and bot token saved.
1. Create a discord bot account in the [Discord Developer Portal](https://discord.com/developers/applications).
- Remember the **Application ID** & **Token**. Both are used later in **Configuration**.
- If you don't save your Token you will have to reset it for a new one.
2. Ensure your bot has `Privileged Gateway Intents > Server Members Intent` enabled.

### Environment

1. Install [NvM](https://github.com/coreybutler/nvm-windows/), then use it to install NodeJS v20.15.0 OR install the nodejs version directly.
2. Install [Postgres 16](https://www.postgresql.org/download/) and PGAdmin4 for interacting with postgres (optional, but helpful)
3. Install Yarn using: `npm i -g yarn`
4. Clone the repo: `git clone https://github.com/oldschoolgg/oldschoolbot.git`
5. Run the following commands in the root of the repo: `corepack enable`, `yarn`, `npx prisma db push` and `npx prisma db push --schema ./prisma/robochimp.prisma`
2. Install [Python](https://www.python.org/downloads/) used for multiple dependencies.
3. Install [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/).
- Install the `Community` version.
- Once downloaded select and install `Workloads > Desktop development with C++`.
4. Install [Postgres 16](https://www.postgresql.org/download/) and **pgAdmin 4** for interacting with postgres (optional, but helpful).
- Remember the **Port Number** and **Password**. Both are used later in **Configuration**.
5. Install Yarn using: `npm i -g yarn`
6. Clone the repo: `git clone https://github.com/oldschoolgg/oldschoolbot.git`

### Configuration

1. Copy the ".env.example" file and rename the copy to ".env", put your bot token and bot id (client id) in it.
2. Create 2 databases called "osb_test" and "robochimp_test"
3. Change `DATABASE_URL` and `ROBOCHIMP_DATABASE_URL` in your .env with the format `postgresql://USER:PASSWORD@HOST:PORT/DATABASE_NAME`.
4. Make a config file from the example: `cp src/config.example.ts src/config.ts`
5. Edit this new `config.ts` file:
1. Make a .env file from the example: `cp .env.example .env`
2. Edit this new `.env` file:
- Put your test bot's **Application ID** into the `CLIENT_ID` field.
- Put your test bot's **Token** into the `BOT_TOKEN` field.
- Uncomment and enter the Server ID where you want to Administer your bot from into the`TESTING_SERVER_ID` field. (Skip if using official test server).
3. Create 2 databases called "osb_test" and "robochimp_test".
- Using **pgAdmin 4** select `Servers > PostgreSQL > Databases > Create > Database...`.
- Enter the database name into `Database` and hit `Save`.
4. Change `DATABASE_URL` and `ROBOCHIMP_DATABASE_URL` in your .env file with the format `postgresql://USER:PASSWORD@HOST:PORT/DATABASE_NAME`.
5. Make a config file from the example: `cp src/config.example.ts src/config.ts`.
6. Edit this new `config.ts` file:
- Copy your Discord ID into both `OWNER_IDS` and `ADMIN_IDS`.
- Enter the Server ID where you want to Administer your bot from in `SupportServer`
- Enter the Server ID into `DEV_SERVER_ID`
- Enter the Server ID where you want to Administer your bot from in `SupportServer`.

### Finalizing Setup

1. Run the following commands in the root of the repo:
- `corepack enable`
- `yarn`
- `npx prisma db push`
- `npx prisma db push --schema ./prisma/robochimp.prisma`

### Running the bot

1. Run `yarn start`
1. Run `yarn start` or `yarn watch`.

#### VSCode settings (Optional)

Expand All @@ -54,4 +73,9 @@ This assumes you are using VSCode as your IDE. If you have errors or issues, you

- Check your NodeJS/NPM/Yarn/Postgres versions.
- Uninstall prettier/eslint vscode plugins.
- Delete these folders: node_modules, dist
- Delete these folders: node_modules, dist.
- Your IDE may need to be ran with admin privileges.
- "yarn.psl cannot be loaded because running scripts is disabled on this sytem"
- run this command in a terminal: `Set-ExecutionPolicy Unrestricted`
- If either of the `npx prisma` commands fail in **Finalizing Setup** you may need to manually create 2 databases called "osb_test" and "robochimp_test".
- Restarting your PC after **Environment** steps may be needed.
32 changes: 32 additions & 0 deletions data/bso_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,39 @@
"73222": "Offhand dice plushie",
"73223": "Tidal collector (i)",
"73224": "Pernix components",
"73250": "Sinister crate (s7)",
"73251": "Sinister crate key (s7)",
"73252": "Mumpkin",
"73253": "Mumpkin (demonic)",
"73254": "Mumpkin (pumpkin)",
"73255": "Mumpkin (dead)",
"73256": "Puzzle box (kuro)",
"73257": "Pumpkinhead boxhat",
"73258": "White hween mask",
"73259": "Deathless victims",
"73260": "Pumpkin cloak",
"73261": "Venomous cloak",
"73262": "Bloody cloak",
"73263": "Purple cloak",
"73264": "Dark cloak",
"73265": "White cloak",
"73266": "Pumpkin sweater",
"73267": "Sinister sweater",
"73268": "Pumpkin carving knife",
"73270": "Deathtouched tart",
"73271": "Jack-o-lantern",
"73272": "Zombie cow plushie",
"73273": "Pumpkin parasol",
"73274": "Halloween cracker",
"73275": "Monster in a backpack",
"73276": "Vampyric hween mask",
"73277": "Demonic hween mask",
"73278": "Zombie hween mask",
"73279": "Heirloom pumpkin",
"73301": "Spookling token",
"73302": "Miniature pumpkin head",
"88888": "Bucket of dung",
"88889": "Polterpup",
"121234": "Burnt celebratory cake",
"121521": "Celebratory cake with candle",
"122001": "Lit celebratory cake",
Expand Down
Binary file added docs/public/images/sinistercrate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 29 additions & 1 deletion docs/src/content/docs/bso/Miscelleanous/Events.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
---
title: "Events"
title: "Holiday Events"
---

## Halloween 2024

### Main Event

To do the main event, use [[/halloween check]] to start, and receive a [[Pumpkin carving knife]] and pumpkin seeds, then plant/harvest the seeds to grow pumpkins. You have a chance at getting special Heirloom pumpkins, then use your knife on them to create jack-o-lanterns. Use [[/halloween hand_in]] to hand in your jack-o-lanterns, and have a chance at receiving a [[Halloween cracker]].

If you run out of seeds, you can buy more.

#### Rewards

[[Halloween cracker]]: Received at a 1/10 chance when handing in a jack-o-lantern.

The [[Mumpkin]] pet is received at a rare chance when harvesting pumpkins, it can be metamorphed into: [[Mumpkin (demonic)]] [[Mumpkin (dead)]] [[Mumpkin (pumpkin)]]

### Side Event

To start, any trip, regardless of duration, has a 1/3 chance to trigger the event. Once you get the event start messeage (Pumpkinhead chatbox), you are given a Spookling token.

When completing trips, for every minute, there is a 1 in 12 chance to get a 'trick or treat' point. If you get at least one point, there is a 55% chance of getting a trick, otherwise it's a 'treat.' Trick vs treat doesn't affect pet chance, but only treats can also give you Halloween candy. Themed > messsages differ between tricks and treats, and there are a few different messages for being lucky enough to get the pet also.

Pet drop rate is 1 per 80 trick or treat points (~20 hours) Each pet on CL makes the next one 5x rarer. You also get 1 Spookling token for each trick or treat point. (1 in 12 per minute, or ~5 per hour on average).

You can "cash in" the Spookling tokens by going to /k Pumpkinhead to claim his head, in the form of a Miniature pumpkin head. The cost is 100 Spookling tokens, with a max of 3 heads purchasable. ~25 > hours per head

### Halloween cracker

Received from handing in jack-o-lanterns, and opened with [[/open]] - it gives a random unique item when opened.

## Halloween 2021

### Prerequisites
Expand Down
53 changes: 53 additions & 0 deletions docs/src/content/docs/bso/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,59 @@ sidebar:

Generally only changes that are specific to BSO are included here, for a full list of OSB changes see the [OSB Changelog](/changelog).

## 29/10/2024

### [[gc]]

- The halloween pet crate boost was incorrectly coded as 5x instead of 10x, this is now fixed so its 10x. You can roughly expect a crate every hour if using one (or more if you're an iron).
- If you get the 10x hween pet boost, you now get a message saying that.

### [[nwjgit]]

- Made changes to skillcapes, so that higher-level capes always receive the perks of lower-level ones. E.g. Comp cape gives all master/skill-cape perks, expert capes gives all the master/skill-cape perks, etc.
- OSB Changes: Finished Wyrm agility and cox trip repeating.

## 28/10/2024

### [[gc]]

- You now have 10x higher crate droprates if you have any halloween pet equipped, they are: Kuro, Gregoyle, Mumpkin, Mumpkin (demonic), Mumpkin (pumpkin), Mumpkin (dead), Polterpup, Mini pumpkinhead, Mini mortimer, Casper, Cob.
- Ironmen previously had a 3x bonus crate droprate, this has been increased to 6x.
- The 2 new halloween pets have been added to the DC pets CL.
- The new items have been desecretted, so they no longer are hidden from places, and the collection logs show.
- You can now buy pumpkin seeds.

[Added wiki page for the halloween event, click here to see](/bso/miscelleanous/events/#halloween-2024)

### Turbo

- Korulsi herbs can now be cleaned on harvest, like other herbs

## 26/10/2024

### [[gc]]

- A new crate, the **Sinister crate (s7)** has been added! It drops **12** unique items, 1 of which is a mega-rare. You can get the crates passively from doing any trip, or buying them on the G.E. You can buy keys for 20m GP to open them. The previous crate is now discontinued.

[[sinistercrate.png]]

### [[themrrobert]]

> 🎃 **Halloween Side-Event**
>
> Cyr has coded an event for halloween! Note that this is not the main halloween event, which is coming.
>
> To start, any trip, regardless of duration, has a 1/3 chance to trigger the event. Once you get the event start messeage (Pumpkinhead chatbox), you are given a Spookling token.
>
> When completing trips, for every minute, there is a 1 in 12 chance to get a 'trick or treat' point. If you get at least one point, there is a 55% chance of getting a trick, otherwise it's a 'treat.' Trick vs treat doesn't affect pet chance, but only treats can also give you Halloween candy. Themed > messsages differ between tricks and treats, and there are a few different messages for being lucky enough to get the pet also.
>
> Pet drop rate is 1 per 80 trick or treat points (~20 hours) Each pet on CL makes the next one 5x rarer. You also get 1 Spookling token for each trick or treat point. (1 in 12 per minute, or ~5 per hour on average).
>
> You can "cash in" the Spookling tokens by going to /k Pumpkinhead to claim his head, in the form of a Miniature pumpkin head. The cost is 100 Spookling tokens, with a max of 3 heads purchasable. ~25 > hours per head
- Ironmen can now donate item contracts
- Fix box spawn replies

# 2/10/2024

We now have a new wiki at https://wiki.oldschool.gg/, and the BSO Wiki is now combined together with the OSB wiki. Many pages are out of date, I'm trying to update pages when I have time. Currently, the only way to contribute to the new wiki is by editing files in [this folder on github](https://github.com/oldschoolgg/oldschoolbot/tree/master/docs/src/content/docs).
Expand Down
32 changes: 32 additions & 0 deletions docs/src/content/docs/getting-started/developing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "Developing Guide"
sidebar:
order: 9999
lastUpdated: 2024-10-01T03:41:00.552Z
---

### Important Tips

- I use [this link](https://github.com/oldschoolgg/oldschoolbot/pulls?q=is%3Aopen+is%3Apr+-label%3A%22Status%3A+Waiting+For+Changes%22+-label%3A%22Status%3A+Needs+Information%22++-label%3A%22Status%3A+WIP%22+) when reviewing PRs, if your PR has certain labels (like 'Waiting for changes', or 'Status:WP'), it will be excluded from my reviewing list, so update the labels of your PR as appropriate.
- Run `yarn dev` before pushing commits to a PR, it will do everything you need (linting, building, testing, etc).
- You need a test bot, and have it added to our testing server, and it's highly encouraged you do your testing there.
- If you have any question or need help, ask in `#developers`, and you're welcome to ping @magnaboy.

### Commands

`yarn dev`: Run this before pushing/PRing, or just at any time if you want, it does almost everything you need: Update deps, generate prisma clients, build, update files, lint and test.

`yarn watch`: Starts/runs your bot, and restarts it when you make changes.

`yarn lint`: Run this if you only want to lint your code, and nothing else. (yarn dev runs this)

`yarn test`: Run this if you only want to test your code, and nothing else (yarn dev runs this)

### Spritesheet

The spritesheet is a big image file containing most icons the bot uses for items, not all items are in it, if the bot need any that aren't in it, it will download them on demand.

- To update the spritesheet, use `yarn spritesheet`. This will only have an effect if something has actually changed.
- If new osrs items are being added, you first need to download [the new cache](https://github.com/runelite/static.runelite.net/archive/refs/heads/gh-pages.zip) and extract it so `/cache/item/icon` is in `tmp/icons` in the repo.
- Must only be run on the master (osb) branch.
- If new BSO items are added, the images should be put in the master branch in `src/lib/resources/images/bso_icons`, and the item names/ids in the `bso_items.json` file.
14 changes: 7 additions & 7 deletions docs/src/content/docs/getting-started/wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ This is an automatically generated list of pages with possible issues to be look

[/getting-started/changelog.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/getting-started/changelog.md): Doesnt use the new command formatting

[/getting-started/developing.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/getting-started/developing.md): Doesnt use the new command formatting

[/getting-started/FAQ.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/getting-started/FAQ.md): Doesnt use the new command formatting

[/getting-started/hackertoberfest.mdx](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/getting-started/hackertoberfest.mdx): Doesnt use the new command formatting
Expand All @@ -289,8 +291,12 @@ This is an automatically generated list of pages with possible issues to be look

[/index.mdx](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/index.mdx): Doesnt use the new command formatting

[/osb/Activities/aerial-fishing.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Activities/aerial-fishing.md): Doesnt use the new command formatting

[/osb/Activities/fountain-of-rune.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Activities/fountain-of-rune.md): Doesnt use the new command formatting

[/osb/Activities/guardians-of-the-rift.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Activities/guardians-of-the-rift.md): Doesnt use the new command formatting

[/osb/Activities/hallowed-sepulchre.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Activities/hallowed-sepulchre.md): Doesnt use the new command formatting

[/osb/Activities/mage-training-arena.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Activities/mage-training-arena.md): Doesnt use the new command formatting
Expand Down Expand Up @@ -419,8 +425,6 @@ This is an automatically generated list of pages with possible issues to be look

[/osb/Skills/firemaking.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/firemaking.md): Doesnt use the new command formatting

[/osb/Skills/fishing/aerial-fishing.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/fishing/aerial-fishing.md): Doesnt use the new command formatting

[/osb/Skills/fishing/drift-net-fishing.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/fishing/drift-net-fishing.md): Doesnt use the new command formatting

[/osb/Skills/fishing/fishing-training.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/fishing/fishing-training.md): Doesnt use the new command formatting
Expand Down Expand Up @@ -451,11 +455,7 @@ This is an automatically generated list of pages with possible issues to be look

[/osb/Skills/prayer.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/prayer.md): Doesnt use the new command formatting

[/osb/Skills/runecrafting/guardians-of-the-rift.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/runecrafting/guardians-of-the-rift.md): Doesnt use the new command formatting

[/osb/Skills/runecrafting/README.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/runecrafting/README.md): Doesnt use the new command formatting

[/osb/Skills/runecrafting/runecrafting-training.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/runecrafting/runecrafting-training.md): Doesnt use the new command formatting
[/osb/Skills/runecrafting.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/runecrafting.md): Doesnt use the new command formatting

[/osb/Skills/slayer/README.md](https://github.com/oldschoolgg/oldschoolbot/blob/master/docs/src/content/docs/osb/Skills/slayer/README.md): Doesnt use the new command formatting

Expand Down
25 changes: 6 additions & 19 deletions docs/src/content/docs/osb/Bosses/inferno.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: "Inferno"
---

## Summary

The Inferno is a very high level PVM activity. It has high gear requirements, consumes large amounts of expensive supplies, and attempts can take upwards of 2 hours.

Similar to the Fight Caves, you are not guaranteed to complete The Inferno. Your success chance scales on your gear, number of attempts, and number of Zuk fights.
Expand All @@ -18,17 +16,15 @@ Tokkul can be spent at the [Tokkul shop](https://wiki.oldschool.gg/bosses/fight-

To begin a trip into the inferno, use:

- `/activities infernoaction: ``Start Inferno Trip`
- `/activities inferno action:Start Inferno Trip`

To view information on your previous attempts/KCs, use:

- `/activities infernoaction: ``Check Inferno Stats`
- `/activities inferno action:Check Inferno Stats`

To gamble a cape for a chance at the Jal-nib-rek pet, use:

- `/gamble capetype: ``infernal`

---
- `/gamble cape type:infernal`

## Requirements

Expand All @@ -52,8 +48,6 @@ Twisted bow or Armadyl crossbow with ammo based on the weapon you're using (arro

Runes for Ice barrage + Blood barrage (200 casts of blood barrage/hour and 100 casts of ice barrage/hour. Rune costs are reduced by having a Kodai wand equipped in your mage setup.)

---

## Boosts

Boosts for the Inferno are split into two categories: speed and death chance. Speed boosts decrease the time required to complete the Inferno, and death chance boosts decrease your odds of dying before or during the Zuk fight.
Expand Down Expand Up @@ -82,15 +76,8 @@ Equipping an Elysian spirit shield in either range or mage (-5%)

Equipping a Ring of suffering (i) in either range or mage (-4%)

Equipping a Justiciar faceguard in range (-5%) \
Equipping a Twisted bow in your range setup (instead of an ACB) (1.5% from Tbow VS 7.5% with ACB)
Equipping a Justiciar faceguard in range (-5%)

The number of attempts you've done, and the number of times you've fought Zuk greatly affect speed and death chance.
Equipping a Twisted bow in your range setup (instead of an ACB) (1.5% from Tbow VS 7.5% with ACB)

---

## Gear

<figure><figcaption></figcaption></figure>

Using this gear, along with dragon darts in your blowpipe, will give the maximum bonus for Inferno.
The number of attempts you've done, and the number of times you've fought Zuk greatly affect speed and death chance.
2 changes: 1 addition & 1 deletion docs/src/content/docs/osb/Raids/toa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Solo Tombs of Amascut requires 1 KC for every 10 levels of invocation. E.g. a 50

## Boosts

At 250 kc you will have the minimum death chance possible. At 350 kc you will have the maximum speed boost possible.
At 250 kc you will have the minimum death chance possible. At 350 attempts you will have the maximum speed boost possible.

Specific items will give a hidden speed boost to your raids, these are:

Expand Down
Loading

0 comments on commit 5c16f09

Please sign in to comment.