> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-darts-system/cas-advanced-darts-system.md).

# CAS Advanced Darts System

Saloon darts for RedM. Hang a board anywhere and play 501, Cricket, Around the Clock and Killer with a skill throw, wagers and a house player.

**Saloon darts for RedM: hang a board on any wall or set one up on a stand, then play 301, 501 or 701, Cricket, Around the Clock, Killer or practice with a skill throw that the server decides.**

{% hint style="success" %}
[Get it on the store](https://codeaftersex.com/script/advanced-darts-system): Escrow and Open Source builds. VORP Core, RSG Core or standalone.
{% endhint %}

## Highlights

* **Boards you hang yourself.** The Dartboard item snaps flat onto a wall with the bull at regulation height (1.73 m) and lays the oche 2.37 m in front of it. The Dartboard on a Stand goes on flat ground for camps and the open air.
* **Five games.** 301, 501 or 701 (double in, double out or straight out, legs and sets to win), Cricket with or without points, Around the Clock with or without the bull finish, Killer with 3 or 5 lives and your own double costing a life or not, and solo practice.
* **8 seats per match by default**, up to 20 if you want. In free games the house player (Silas Crane) can take a seat at one of three levels.
* **A skill throw.** The hand sways, you hold your breath to steady it, draw back on a power meter and release inside the clean band. A sideways flick at the release pushes the dart.
* **The server decides every dart.** It rebuilds the sway from its own seed, checks the timing and the breath, adds a secret scatter and decides bounce outs off the wires.
* **Wagers.** Every player puts in the same stake, the server holds the pot and pays the winner minus an optional house cut. Money games need two seats or more. A match without a winner, or a restart, gives every stake back.
* **Hit-rate watch** on money games, with `/darts_unflag` for admins.
* **Three fixed cameras** (over the shoulder, eyes, side), darts that fly on an arc, stick in the board and get pulled, a glow on the slice that was hit and a points tag.
* **Chalk slate interface:** board card, lobby, scoreboard with the checkout route, result card, stats and a leaderboard.
* **Decor boards** in the config that are always on the map. `/darts_decor` writes the config line of a board for you.
* **For developers:** the `openNearest` client export, the `getBoards`, `getBoard` and `setDrunk` server exports and the `cas-darts:matchFinished` server event.
* **Every text in one locale file**, open in the Escrow build.

## At a glance

| What                     | Details                                                                                                                                            |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Resources                | `cas-darts` (the script) and `cas-darts-assets` (board, oche, mat, stand and dart models), both version 1.0.0                                      |
| Frameworks               | VORP Core, RSG Core or standalone. `Config.Framework = 'auto'` uses the one that is started                                                        |
| Requires                 | oxmysql, OneSync                                                                                                                                   |
| Database                 | 5 tables, created on the first start: `cas_darts_boards`, `cas_darts_matches`, `cas_darts_stats`, `cas_darts_payouts`, `cas_darts_escrow`          |
| Items                    | `darts_board_wall` (Dartboard) and `darts_board_stand` (Dartboard on a Stand), with 2 pictures in `cas-darts/install/img`. Standalone has no items |
| Players                  | 1 to 8 per match by default (`Config.MaxPlayers`, 2 to 20). Killer needs 2. The house player takes a seat                                          |
| Money                    | Cash, VORP and RSG only. Two seats or more. Stakes from $1 to $250 by default                                                                      |
| Admins                   | Ace `casdarts.admin`, or the framework groups `admin` and `superadmin`                                                                             |
| Open in the Escrow build | `config/config.lua`, `config/locale.lua` and `install/items_rsg.lua`                                                                               |
| Open Source build        | Everything, plus the source of the interface in `cas-darts/web/`                                                                                   |

## Where to start

| Page                                                                            | What is on it                                                                                                                                             |
| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Installation](/script-documentation/cas-advanced-darts-system/installation.md) | Step by step for VORP, RSG and standalone: server.cfg, ace, items and their pictures, OneSync, database, restart rules and a first check                  |
| [How to play](/script-documentation/cas-advanced-darts-system/how-to-play.md)   | For players: hanging a board, the board card, the rules of every game, the throw step by step, cameras, visits, the house player, walking away, stats     |
| Configuration                                                                   | Every option in `config/config.lua` with its default, and the locale file                                                                                 |
| Commands and exports                                                            | Chat commands, admins, the client and server exports, the `matchFinished` event, the anti cheat in plain words, log lines and the database tables         |
| FAQ                                                                             | The questions server owners ask: frameworks, items, OneSync, wagers and refunds, restarts, difficulty, map boards, unflagging, escrow files, translations |
