> 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-taxi-job/driving.md).

# Driving a cab

How a taxi shift works in CAS Advanced Taxi Job, from renting a cab to returning it, with every key the driver uses.

## Keys

| Key    | Action                                                  | Setting                |
| ------ | ------------------------------------------------------- | ---------------------- |
| **E**  | Open the cab office at its counter                      | `Config.Keys.Interact` |
| **Y**  | Take the call on the wire                               | `Config.Keys.Accept`   |
| **N**  | Pass on the call                                        | `Config.Keys.Decline`  |
| **K**  | Put the passenger out and end the fare                  | `Config.Keys.EndFare`  |
| **F6** | Dispatch board, stopped in your cab with no fare aboard | `Config.Keys.Board`    |
| **J**  | Flag up or down (cabs that are not CAS RedM Cars cars)  | `Config.Keys.Flag`     |

Y, N, K, F6 and J are registered as key mappings. A new default in `config.lua` reaches players who have not used the script yet; players who have keep their saved key and change it in the game's key binding settings.

## Starting a shift

Walk up to the counter at the cab office and talk to the clerk. The office shows your rank, the perks it brings, the cab at the stand and your last shift's ledger.

* **Rent a company cab.** The deposit (`Config.Rent.Deposit`, $5.00) is taken and the cab appears at the first free spot of the stand. The company keeps 30% of every fare.
* **Drive your own cab.** From the second rank. Bring your Tremont to the office first (within 60 m, `Config.Own.Radius`). The company keeps 15%.

The shift is yours until you end it. Leaving the server, losing the cab or having it destroyed ends the shift and the deposit is lost (`Config.Rent.RefundOnLoss`).

## Taking calls

With the flag up you are **for hire**. Calls come in as telegrams at the top of the screen: who is waiting, where, where they want to go, the estimated fare and how far away they are. You have 15 seconds (`Config.Dispatch.AcceptSeconds`).

* **Y** takes it. Another driver who was offered the same call sees it go.
* **N** passes. You will not see that call again.

A **VIP** stamp means a passenger only drivers of the first class get; **Long haul** means a trip out of town for senior cabbies. A **Player** stamp is a real player who wired for a cab, and a note they wrote is printed at the end of the telegram.

Stopped, **F6** opens the [dispatch board](/script-documentation/cas-advanced-taxi-job/dispatch-board.md) with every open call on a map of the town.

## The pickup

A route is drawn to the pickup and a diamond marks the spot. The NPC passenger appears when you are near. Stop within 14 m (`Config.Dispatch.BoardRadius`) and the passenger gets into the back. A player passenger gets in themselves.

Their patience starts to drop if you take longer than two minutes to arrive (`Config.Dispatch.PickupGraceSec`). If it runs out before you get there, the passenger gives up: the fare is lost and it counts as a poor rating.

## The ride

The meter starts when the passenger is in. The small HUD shows the fare as it runs, the distance and the passenger's patience around their portrait.

* **Comfort** drops on bumps, crashes and hard braking. Passengers say so.
* **Patience** drops when the ride is slower than they expect.

Both decide the tip and the stars at the end. See [Ranks and pay](/script-documentation/cas-advanced-taxi-job/ranks-and-pay.md).

## Ending a fare

* **NPC passengers** pay when you stop within 18 m of their destination (`Config.Dispatch.DropRadius`). Their red diamond marks the spot.
* **Player passengers** end the ride by getting out, or you press **K**. They settle the fare on their slip.
* **K** always puts a passenger out. An NPC who is put out early pays nothing and leaves a poor rating.

A fare ticket prints for every paid fare: what the meter counted, the tip, the company's cut and your take.

## Ending the shift

Bring a rented cab back to the stand (within 25 m of `Return`) and end the shift at the office. The deposit comes back by the cab's condition:

* Engine at 80% or more pays the whole deposit back, at 30% or less nothing (`Config.Rent.Refund`).
* Every missing litre of fuel costs $0.05.

Away from the stand, press **End shift** twice within 10 seconds to leave the cab where it is. The deposit is lost.
