# Scheduler

Unleash your creativity with a versatile command scheduler. Execute a wide array of commands, each with a customizable probability, infusing your server with dynamic and immersive experiences.

Timing is everything: Determine when fake players execute commands with dynamic time intervals, enhancing the authenticity of your server. Elevating Realism with Smart Behaviors.

```yaml
scheduler:
  time: '{random[10,60]}'
  commands:
    - '{updateRandomItemInMainHand}:80:pa sell {random[100,1000,50]}'
    - '{updateRandomItemInMainHand}:60:pa sell {random[100,1000]}'
```

* Easily put items for sale on the auction house without the need of external plugins

* `time`: Random time for scheduler execution

* `commands`: Scheduler commands with chances and optional random values

| Placeholder                  | Description                                                                                                                                                               |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {updateRandomItemInMainHand} | Tells the spoofer that the command that's about to be dispatched needs the player to have an item in hand                                                                 |
| {random\[x,y,z]}             | This generates a random number ranging between **x** and **y**, that is divisible by **z**. If the number isn't divisible by z it will keep generating until it finds one |
| {equipRandomArmor}           | Equips random pieces of armor (between 1-3) from the player's inventory                                                                                                   |
| {equipWholeArmor}            | Overwrites the existing armor with the first pieces of armor found in the player's inventory                                                                              |
| {randomItemInMainHand}       | Re-equips a random item from his inventory in his main hand                                                                                                               |
| {initAIConv}                 | <p>NOTE! This must be used as following: </p><p>":(chance):{initAIConv}"<br>If you are using AI to AI feature, make sure to include this in your scheduler.</p>           |

<table><thead><tr><th>Text features</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>chat!</td><td>NOTE! This must be used as following:<br>"(whatever here):(chance):chat!sup everyone!"<br>Use this before any message inside the scheduler and you will to make the player send a custom message.</td><td></td></tr><tr><td>console-></td><td>NOTE! This must be used as following (only the format, you will be provided an example):<br>"(whatever here):(chance):console->eco give %player% 100%"<br>You can execute console commands using "console->"</td><td></td></tr><tr><td>ANTI-AFK</td><td>To use anti-afk use the following format:<br>":80:console->asteroid extra rotate %player%"<br>It will randomly rotate the player, clearing the afk mode.</td><td></td></tr></tbody></table>


---

# 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://docs.spoof.dev/asteroid/setup/features/scheduler.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.
