> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/data/quest/questreward.md).

# QuestReward.txt

Rewards granted while a quest is being advanced. Each row describes one reward action, gated by quest state and per-class availability. Rewards are tied to class progression milestones, not generic item or currency grants.

## File Location

```
Data/Quest/QuestReward.txt
```

Loaded once at GameServer startup. Changes require a restart.

## Format

```
//Number Type Index Quantity Level Option1 Option2 Option3 NewOption RequireIndex RequireState DW DK FE MG DL SU RF
0 1 200 10 0 0 0 0 0 0 1 1 1 1 0 0 1 0
end
```

Terminated by `end`.

## Columns

| Column                                          | Type              | Effect                                                                                                                                                                                    |
| ----------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Number`                                        | int               | Reward slot within the quest. Informational - the server does not key behaviour on it                                                                                                     |
| `Type`                                          | 0, 1, 2, 4, 8, 16 | Reward kind. See [Type values](#type-values)                                                                                                                                              |
| `Index`                                         | int               | Identifier echoed back to the client in the reward packet. For Type 1 it is the stat-point reward ID, for Type 2 and 16 the class-change target, for Type 4 and 8 the visual reward index |
| `Quantity`                                      | int               | Amount. Used directly by Type 1 (stat points). Other types rely on fixed server logic and ignore this column                                                                              |
| `Level`                                         | int               | Present for consistency with QuestObjective; unused by current reward handlers                                                                                                            |
| `Option1` / `Option2` / `Option3` / `NewOption` | int               | Present for consistency; unused by current reward handlers                                                                                                                                |
| `RequireIndex`                                  | int               | Quest this reward belongs to                                                                                                                                                              |
| `RequireState`                                  | 0-3               | Required quest state for the reward to fire. `0` fires on accept (before transitioning to accepted), `1` fires on turn-in (before transitioning to finished)                              |
| `DW` ... `RF`                                   | 0-2               | Per-class gate. `0` = reward skipped for that class, `1` = base class, `2` = first class change or higher                                                                                 |

### Type Values

Each row picks exactly one reward type - the server branches on the `Type` integer and runs the matching action. These are **not** bitmask bits; do not OR them together.

| Value | Meaning                                                                                                                                                                                                |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `0`   | Empty slot. Skipped                                                                                                                                                                                    |
| `1`   | Grant stat points. `Quantity` is added directly to `LevelUpPoint`. Not affected by `PlusStatPoint` in Common.dat                                                                                       |
| `2`   | First class change. Sets the character to class change 1 if they are still at change 0, rebuilds the preview charset, and sends the reward packet. Does not grant stats on its own                     |
| `4`   | Hero bonus. For Fairy Elf the server grants the Infinity Arrow skill. For any class the server awards `(Level - 220) * PlusStatPoint` stat points when `Level > 220`, otherwise zero                   |
| `8`   | Combo reward. Sends the reward packet to the client so it can show the combo-skill cut-scene. No server-side skill is added; the combo capability is enabled through the normal class-progression path |
| `16`  | Second class change. Sets the character to class change 2 if they are still at change 0 or 1, rebuilds the preview charset, and sends the reward packet. Does not grant stats on its own               |

To grant multiple reward actions for the same quest, add multiple rows with the same `RequireIndex` - one per reward type.

Quest rewards are restricted to these progression actions. For item or currency grants use the [QuestWorld](/docs/data/questworld.md) system or trigger an [EventItemBag](/docs/data/eventitembag.md).

## Reward Firing

The server runs the reward list when the quest's `CurrentState` transitions:

* From `0` (not accepted) to `1` (accepted) - rows with `RequireState == 0` fire
* From `1` (accepted) to `2` (finished) - rows with `RequireState == 1` fire
* From `3` (cancelled) to `1` (re-accepted) - rows with `RequireState == 3` fire

The reward packet carries the character index, the row's `Index` field, and a type-specific amount (stat points granted, class-change target, or the row's `Quantity`).

## Cross-File Dependencies

| Attribute                            | Related in                                                                                       |
| ------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `RequireIndex`                       | [Quest.txt](/docs/data/quest.md)                                                                 |
| First / second class change targets  | [DefaultClassInfo.txt](/docs/data/defaultclassinfo.md)                                           |
| Hero bonus stat-point formula        | [Common.dat](/docs/gameserver/common-dat.md) `PlusStatPoint`                                     |
| Quest XP multiplier                  | [Common.dat](/docs/gameserver/common-dat.md#experience-settings) `AddQuestExperienceRate_AL0-3`  |
| NPC that drives reward flow          | [Monster.xml](/docs/data/monster/monster.md) via [Quest.txt](/docs/data/quest.md) `MonsterClass` |
| Infinity Arrow skill (Type 4 for FE) | [Skill.txt](/docs/data/skill.md)                                                                 |

## Common Issues

* **Player completes quest but gets nothing** - no row matches the player's class, or `RequireState` does not match the quest transition
* **Class change does not fire** - Type `2` is ignored when the character is already past change 1; Type `16` is ignored past change 2. Verify `ChangeUp` before the quest runs
* **Hero bonus grants zero points** - the character is at or below level 220; the formula is `(Level - 220) * PlusStatPoint` and clamps to zero below 221
* **Combo skill not unlocked** - Type `8` only sends the reward visual; the combo skill itself is granted through the class-progression pipeline, not this row
* **Stat points not the expected amount** - Type `1` uses `Quantity` directly and ignores `PlusStatPoint`; adjust `Quantity` to match the intended reward
