Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aminomancer committed Jul 8, 2022
1 parent e974d62 commit 0c5f0ec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GoatBots-Card-Watcher
Refresh a [GoatBots](https://www.goatbots.com/) page on a set timer, check if any of the cards specified by name in the settings are in stock, and alert the user if so. This can be pretty useful if you're trying to buy new cards that are extremely rare and in high demand. Other players may beat you to the punch if you just manually check every few minutes. That's what motivated me to write this script. I was trying to buy the full-art promos from Double Masters 2022 and other people kept beating me to the draw. So, I made a script to watch the stock for me and give me a head start when a rare card comes into stock.
<h1 align="center"><img src="./resources/goat.svg" height="72em"/><br>GoatBots Card Watcher<br><sub><a href="https://github.com/aminomancer/GoatBots-Card-Watcher/raw/main/goatbotsCardWatcher.user.js" title="Install with script manager" aria-label="Install with script manager"><img src="./resources/download.png" alt="Download" height="32"></a></sub>
</h1>

Automatically refresh a [GoatBots](https://www.goatbots.com/) page on a set timer, check if any of the cards specified by name in the settings are in stock, and if so, add them to the cart, go to the delivery page, and alert the user. This is mainly useful if you're trying to buy new cards that are extremely rare and in high demand. Other players may beat you to the punch if you just manually check every few minutes. That's what motivated me to write this script. I was trying to buy the full-art promos from Double Masters 2022 and other people kept beating me to the draw. So, I made a script to watch the stock for me and give me a head start when a rare card comes into stock.

Configure the script by adding a pathname for a GoatBots page you want to scan, such as `https://www.goatbots.com/set/kaldheim`. When you navigate to that page, the script will automatically reload it on a timer to check if any cards on your list is in stock. When a card on your list is detected, an audio alert will play. You can scan as many pages as you want, and you can scan for as many cards per-page as you want. Each page has its own cards list in the config settings, so they won't get mixed up.

Expand All @@ -11,4 +13,4 @@ Then, replace the card names in the script's config section with the card names

If you're using Firefox and you want the text-to-speech alerts, make sure the pref `media.webspeech.synth.enabled` is enabled in about:config. If you don't want or can't use text-to-speech, and the default sound file is not to your liking, you can replace it with your own base64-encoded audio file. You can convert any mp3 file to base64 by uploading it to [this encoder](https://codepen.io/xewl/pen/NjyRJx). Then just copy the resulting string and replace the `Voice audio file` value in the config settings with your new string. The script will decode and play it at runtime.

Before the synthesized speech or voice audio plays, the script will also trigger a little alert sound. This is done so that the alert will be more noticeable in the event that you're listening to dialogue when the alert goes off. The synthesized speech may not be as noticeable if there are other voices playing in the background, so I added a little "ding" noise to play at the same time. It's the same sound that plays when you get a notification in MTGO. This sound can also be changed. Again, it's a base64-encoded audio file, so use the same encoder as above.
Before the synthesized speech or voice audio plays, the script will also trigger a little alert sound. This is done so that the alert will be more noticeable in the event that you're listening to dialogue when the alert goes off. The synthesized speech may not be as noticeable if there are other voices playing in the background, so I added a little "ding" noise to play at the same time. It's the same sound that plays when you get a notification in MTGO. This sound can also be changed. Again, it's a base64-encoded audio file, so use the same encoder as above.
Binary file added resources/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions resources/goat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0c5f0ec

Please sign in to comment.