> For the complete documentation index, see [llms.txt](https://m3ii0.gitbook.io/magicalwands/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://m3ii0.gitbook.io/magicalwands/custom-charm-creation/wand-functions.md).

# Wand Functions

## Send message/messages to sender

```yaml
# Send message to player after dispatch! (Fully supports HEX, Gradient & PAPI)
PlayerMessage:
 - "&aYou've used CharmExample!"
```

## Broadcast message/messages to entire server

```yaml
# Broadcast message (Fully supports HEX, Gradient & PAPI)
Broadcast:
 - "&a%player_name% used CharmExample!"
```

## Message/messages to looking Player (Primary damaged)

```yaml
# Send message to looking target if it is player! (Fully supports HEX, Gradient & PAPI)
# NOTE: Placeholders will be applied for DAMAGED entity
MessageLookingEntity:
 - "&cYou've been attacked!"
```

## Message/messages to all damaged players

```yaml
# Send message to all damaged entities! (Fully supports HEX, Gradient & PAPI)
# NOTE: Placeholders will be applied for each DAMAGED entity
MessageToAllDamaged:
 - "&cYou've been attacked!"
```

## Dispatching command/commands as Player

```yaml
# Dispatch command as player
# NOTE: Without '/'
PlayerCommand:
 - "say hello"
```

## Dispatching command/commands from Console

```yaml
# Dispatch command as Console
# NOTE: Without '/'
ConsoleCommand:
 - "say hello"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://m3ii0.gitbook.io/magicalwands/custom-charm-creation/wand-functions.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.
