> 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/commands.md).

# Commands

Every CAS Horse Racing command and key binding — /races, /race\_build, /race\_delay, /race\_goto, the sky-camera controls and the F4 race sheet.

## Everyone

| Command  | Does                                                   |
| -------- | ------------------------------------------------------ |
| `/races` | Opens the menu. Calendar, standings, and recent races. |

Players can also walk up to a race master and press **E**, which opens the same menu with that race already showing.

## Needs permission

| Command                      | Does                                                                              |
| ---------------------------- | --------------------------------------------------------------------------------- |
| `/race_build`                | Lifts the sky camera to lay out a new race.                                       |
| `/race_delay [minutes] [id]` | Moves a race's start time. Defaults to the next race, 2 minutes out.              |
| `/race_goto [id]`            | Teleports you to a start line. Only works if `Config.Editor.allowTeleport` is on. |

See [Permissions](/script-documentation/cas-horse-racing/permissions.md) for how to grant access.

## Key bindings

| Key    | Does                                          |
| ------ | --------------------------------------------- |
| **F4** | Opens the race sheet directly.                |
| **E**  | Talks to a race master when you are near one. |

**F4** can be rebound by each player in **Settings** then **Key Bindings**. To change the default, edit `Config.Editor.panelKey`.

## Sky camera keys

These only apply while `/race_build` is active.

| Key                      | Does                                              |
| ------------------------ | ------------------------------------------------- |
| **W A S D**              | Fly.                                              |
| **Shift**                | Fly faster.                                       |
| **Space** / **Ctrl**     | Rise and drop.                                    |
| **G**                    | Place the start line, a gate, or the race master. |
| **F**                    | Remove the last one.                              |
| **Left / Right arrow**   | Gate width, or turn the race master.              |
| **E**                    | Next step.                                        |
| **R**                    | Previous step.                                    |
| **Q**                    | Put the camera down.                              |
| **ESC** or **Backspace** | Put the camera down.                              |

### Changing the keys

The arrow keys were chosen because nothing else commonly uses them. Admin menus often use Page Up and Page Down, which is why those are avoided here.

If a key clashes with another resource, change its hash in `config.lua`:

```lua
Config.Editor.flyPrompts = {
    place    = { control = 0xA1ABB953 },   -- G
    undo     = { control = 0x3B24C470 },   -- F
    wider    = { control = 0xC97792B7 },   -- Right arrow
    narrower = { control = 0x20190AB4 },   -- Left arrow
    mode     = { control = 0xE3BF959B },   -- R
    next     = { control = 0xD51B784F },   -- E
    leave    = { control = 0xDE794E3E },   -- Q
}
```

Two controls known to be free are `0x430593AA` for the `[` key and `0xA5BDCD3C` for the `]` key.

## Debug commands

Setting `Config.Debug = true` adds about twenty-five commands for adjusting how gates, flags, arrows, and effects look. They change what you see only and never reach the server.

They are not registered at all while `Config.Debug` is off, so they will not clutter your players' command list.
