# DataType:mercenary

This is the type used for mercenaries.

## Members

This type inherits members from [*spawn*](/macroquest/data-types-and-top-level-objects/data-types/datatype-spawn.md).

| **Type**                                                                               | **Member**    | **Description**                                                                   |
| -------------------------------------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------- |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)       | **AAPoints**  | AA Points spent on mercenary abilities                                            |
| [*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md) | **Stance**    | Current stance of the mercenary                                                   |
| [*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md) | **State**     | Current state of the mercenary (returns "DEAD","SUSPENDED","ACTIVE", or "UNKNOWN" |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)       | **StateID**   | Current state ID of the mercenary as a number.                                    |
| [*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md) | **Index**     | Index                                                                             |
| [*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md) | **To String** | Same as **Name**                                                                  |

## Examples

Check on if you have an active mercenary, mercenary is a cleric, and if it's stance is NOT reactive.... then change it TO reactive.

```
/if (${Mercenary.State.Equal[ACTIVE]} && ${Mercenary.Class.Name.Equal[Cleric]} && ${Mercenary.Stance.NotEqual[REACTIVE]}) {
    /stance reactive
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/data-types-and-top-level-objects/data-types/datatype-mercenary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
