Automate chat replies and payments
Use the Automation step to answer chat and handle DonutSMP payments while a macro runs, with patterns, branches, and Pay Player.
What the Automation step adds
A normal macro runs one step after another. The Automation step instead starts up to eight tasks that run together until you stop the macro. It has to be a top-level step, not nested inside another, and it is meant for a Manual start macro with Loops at 1.
| Task trigger | When its steps run |
|---|---|
| Every interval | After each interval in milliseconds, from one second up to a day. The first run waits one interval. If the previous run is still busy, that tick is skipped. |
| Matching chat message | Every incoming message that matches the task’s pattern. Matches queue up, up to 100, and are handled one after another; nothing is dropped because the task is busy. |
| Incoming payment (DonutSMP pattern) | Every server receipt for a payment to the account. One payment task per account. |
Every task run gets its own fresh copy of the variables that were set before the Automation step, plus what its pattern captured. Tasks do not share variables with one another. Stop, a disconnect, a world change, or an error inside a task stops the whole automation, and it does not resume on reconnect.
Write a match pattern
A pattern is the message with the parts you want to keep replaced by fields:
| Field | Matches |
|---|---|
{player:username} | A Java or Bedrock player name. |
{amount:money} | An amount such as 1,250, 2.5K or 1.3M, stored as a plain number. |
{count:number} | A whole number. |
{message:text} | Free text up to the next literal part of the pattern. |
The whole message must match, ignoring capitals, colour codes, and repeated spaces. Use up to eight fields with different names, separated by literal text, in up to 512 characters. Regular expressions are not accepted here. Message source chooses between server messages only and all chat; a payment task always uses server messages. The captured fields land in the variable you name, so {player:username} paid you $ {amount:money} saved as payment gives %var:payment.player% and %var:payment.amount%. The message itself is available as %var:payment.message%.
Capture live chat
Open capture
Click Capture example message under any pattern field, or Capture live chat in the assistant toolbar.
Start listening
Choose a connected Live account and click Start capture. The list fills with new messages as they arrive, newest at the bottom, with their source.
Produce the message
Trigger it in game, for example pay the account a small amount from another account.
Pick and confirm
Click the message. Use selected message as pattern copies it into the pattern field, where you replace the changing parts with fields. The preview shows the extracted fields as you edit. Confirm this message and pattern writes the pattern into the step, or attaches the example for the assistant.
Capture reads only that account’s chat and stops when you close the dialog or leave the Macros tab. Confirmed examples for the assistant stay in this browser tab, up to eight; Clear drops them. They are never saved to your account.
Branches and calculations
| Step | Settings |
|---|---|
| Chance | Runs the First branch with the percentage you set and the Other branch otherwise, using a secure random pick. Exactly one branch runs. |
| If / Else | Compares a variable path with a value using equals, not equals, the four size comparisons, contains, or starts with, then runs the true or the false branch. Both branches hold real steps, so no step counting is needed. |
| Calculate | Stores the result of left and right values with add, subtract, multiply, divide, min, or max in a variable. Values accept tokens. Division by zero or a result beyond a trillion fails the task. |
| Extract Chat Fields | Applies a pattern to text you already have, such as %var:event.message%, and stores the fields. No match fails the step. |
| Command & Capture Reply | Starts listening, then sends a command and stores the fields of the first new matching reply, within the timeout (1 to 60 seconds). Use it for /bal and similar commands whose answer arrives at once. |
Branches nest up to five levels, with up to 100 steps per block and 300 steps in the whole macro. The steps inside a branch are the ordinary steps from the other guides.
Payments on DonutSMP
A payment task starts with DonutSMP’s receipt patterns filled in: {player:username} paid you $ {amount:money} for incoming money and You paid {player:username} $ {amount:money} for the confirmation of your own payments. Capture and confirm them on your server before relying on them.
| Verification | How the amount is known |
|---|---|
| Server receipt (default) | Each receipt is handled at once with the amount the chat shows. DonutSMP shortens large amounts, so a receipt showing 1.2M gives 1,200,000 even if a little more was sent. payment.exact is false for shortened amounts. |
| Balance checks | Also runs the Balance command and matches the Balance reply pattern to recover exact amounts from balance changes. Payments it cannot separate are held and logged instead of guessed, and any other change to the balance, such as a sale, makes this mode unusable. |
Pay Player sends /pay once to the player and amount you give, both accept variables, and waits for the server’s confirmation. It never retries: a missing or failed confirmation stops the automation, so a payment can never be sent twice. While a payment task is active, a raw /pay in a command step is rejected; use Pay Player.
Example: a 45/55 payment game
Advertise
An Every interval task: Set Variable
targetto%random_username%, If / Else target is not empty, then Type Command/msg %var:target% Pay me to play, $500,000 min.Handle payments
An Incoming payment task saved as
payment.Refund outside your limits
Inside it, If / Else
payment.amountless than 500000 and another for above your maximum, each with Pay Player%var:payment.player%for%var:payment.amount%and a message.Play
Otherwise a Chance of 45: the first branch runs Calculate
payout=%var:payment.amount%× 2 and Pay Player for%var:payout%; the other branch sends a “you lost” message.
The limits, the odds, the refund rules, and the messages are ordinary steps you edit. Nothing about them is built in.
Before you leave it running
Read your server’s rules on automated trading first. Test with small amounts and one account, and watch Chat → Console: interrupted, queued, and unconfirmed payments are logged there for you to review. There is no payment journal that replays after a restart; when the process restarts or the account disconnects, the automation ends and whatever was queued is gone. A message classified as a server message is not proof of a real payment on every server, so keep the whole-message patterns strict.
Check the troubleshooting guide or return to all guides.