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

# Scripts

Automate your in-game communications! Set up scheduled broadcasts for vending, party coordination, or guild announcements.

***

## 🎯 Overview

The Scripts feature lets you:

* **Broadcast messages** at scheduled intervals
* **Execute commands** automatically
* **Coordinate** with party and guild members

***

## 📢 Broadcast Channels

Configure up to **4 independent broadcast channels**:

|  Channel | Suggested Use              |
| :------: | -------------------------- |
| **BC 1** | Main chat / Party messages |
| **BC 2** | Guild announcements        |
| **BC 3** | Whispers                   |
| **BC 4** | Custom / Other             |

### Channel Settings

| Setting      | Description              |
| ------------ | ------------------------ |
| **Commands** | List of messages to send |
| **Interval** | Time between messages    |
| **Enabled**  | Toggle channel on/off    |

***

## 💬 Setting Up Commands

### Adding Commands

1. Type your command in the input field
2. Click **Add** to add to the list
3. Commands will cycle in order

### Example Commands

```
/party Ready for buffs!
/guild WoE meeting in 10 minutes
```

***

## 🛒 Use Cases

### Vending / Trading

Broadcast your shop to potential customers:

| Message Type | Example                          |
| ------------ | -------------------------------- |
| **Selling**  | `S> +10 Weapon [4] - PM offers!` |
| **Buying**   | `B> Cards - paying well!`        |

### Party Coordination

Keep your party informed:

| Message Type    | Example                  |
| --------------- | ------------------------ |
| **Buffs**       | `Buffing in 10 seconds!` |
| **Movement**    | `Moving to next spot`    |
| **Ready Check** | `Ready? Type 1`          |

### Guild Communication

Automated guild announcements:

| Message Type  | Example                     |
| ------------- | --------------------------- |
| **Events**    | `WoE starts in 30 minutes!` |
| **Reminders** | `Don't forget to donate!`   |

{% hint style="success" %}
**Pro Tip:** Use different channels for different purposes to keep your broadcasts organized!
{% endhint %}

***

## ⏱️ Timing Settings

| Setting      |    Range   | Recommended |
| ------------ | :--------: | :---------: |
| **Interval** | 1-3600 sec | 30+ seconds |

{% hint style="warning" %}
**Important:** Avoid spamming! Use intervals of 30 seconds or more to respect other players and server rules.
{% endhint %}

***

## 💡 Best Practices

<details>

<summary><strong>Tips for Effective Broadcasting</strong></summary>

1. **Respect Chat Rules** — Don't spam public channels
2. **Use Appropriate Intervals** — 30+ seconds minimum
3. **Provide Value** — Make your messages useful to recipients
4. **Test First** — Verify commands work manually before automating

</details>

***

## ⚠️ Limitations

* Commands must be valid for your server
* Some servers have chat cooldowns
* Blocked players won't receive whispers


---

# 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, and the optional `goal` query parameter:

```
GET https://xgine.gitbook.io/xgine-docs/advanced-features/scripts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
