> 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-horse-racing/cas-horse-racing.md).

# CAS Horse Racing

CAS Horse Racing for RedM — a full race calendar with parimutuel betting, a walk-up race master and an in-world course builder. Works on VORP, RSG Core and standalone.

**CAS Horse Racing** is a complete horse-racing system for **RedM**: a live race calendar, an in-world course builder you fly with a sky camera, a walk-up race master, parimutuel betting, prize pools and season standings. A race is booked for an hour, stands in the world, opens for entries ten minutes before the off, runs once, pays out, and is gone.

It runs on **VORP**, **RSG Core** and **standalone** — it detects your framework on boot.

{% hint style="success" %}
No SQL to import — the tables build themselves on first start. English and Turkish are both included.
{% endhint %}

***

## Highlights

* **A living calendar** — races are booked for an hour, announced server-wide the moment entries open, run once and settle themselves.
* **Build a course in-world** — a sky camera lays the start line and gates, then places the race master players walk up to. No coordinates to hand-edit.
* **Parimutuel betting** — every stake goes into one pool shared among whoever backed the winner; the house takes a fixed cut and never carries a risk of its own.
* **Fair by design** — no-show refunds, a minimum-rider scratch-and-refund, and interrupted races voided and refunded on restart. Nobody loses a fee to a crash.
* **Money that waits** — winnings owed to an offline player are held and paid the next time they open the menu, and never paid twice.
* **VORP · RSG · standalone**, cash or gold, English + Turkish, one commented config file.

## At a glance

|                  |                                               |
| ---------------- | --------------------------------------------- |
| **Frameworks**   | VORP · RSG Core · standalone (auto-detected)  |
| **Dependencies** | oxmysql                                       |
| **Database**     | Self-building, no import                      |
| **Currency**     | Cash or gold                                  |
| **Languages**    | English + Turkish                             |
| **Betting**      | Parimutuel pool with a configurable house cut |

***

## Where to start

| I want to                       | Read                                                                         |
| ------------------------------- | ---------------------------------------------------------------------------- |
| Get it running                  | [Installation](/script-documentation/cas-horse-racing/installation.md)       |
| Let my admins create races      | [Permissions](/script-documentation/cas-horse-racing/permissions.md)         |
| Create my first race            | [Creating a race](/script-documentation/cas-horse-racing/creating-a-race.md) |
| Change fees, limits and timings | Configuration                                                                |
| See every command               | Commands                                                                     |
| Change how the menu looks       | Editing the interface                                                        |
| Fix a problem                   | Troubleshooting                                                              |

## Get the script

Advanced Horse Racing is sold on the CAS Scripts store: [codeaftersex.com/script/advanced-horse-racing](https://codeaftersex.com/script/advanced-horse-racing). Both the Escrow build and the full Open Source build are listed there, with lifetime updates and Discord support.
