20% offevery plan

Black Friday Sale. New purchases, extensions and upgrades all qualify.

Ends in
00days
00hrs
00min
00sec
See plans
Everyday Tools

Automate chat replies and payments

Use the Automation step to answer chat and handle DonutSMP payments while a macro runs.

What the Automation step adds

A normal macro runs one step after another. The Automation step starts up to eight tasks that run side by side until you stop the macro. Put it at the top level of a Manual Start macro with Loops at 1.

A task runsWhen
Every intervalAfter each interval, from one second to a day.
Matching chat messageFor every incoming message that matches its pattern. Matches queue up, so none is lost.
Incoming payment (DonutSMP pattern)For every payment the account receives. One payment task per account.

Each task run starts with the variables set before the Automation step, plus what its pattern captured. A stop, a disconnect or an error in a task ends the whole automation, and it does not start again by itself.

Write a match pattern

A pattern is the message with the changing parts replaced by fields:

FieldMatches
{player:username}A Java or Bedrock player name.
{amount:money}An amount like 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 fixed part.

The whole message has to match. Capitals, colours and double spaces are ignored. The fields land in the variable you name: {player:username} paid you $ {amount:money} saved as payment gives %var:payment.player% and %var:payment.amount%.

Capture a real message

Wording differs between servers, so take the pattern from the real message.

  1. Open capture

    Click Capture example message under a pattern field, or Capture Live Chat under the assistant.

  2. Listen

    Pick a connected account and click Start capture. Then make the message appear in game, for example with a small payment.

  3. Use it

    Click the message, then Use Selected Message, and replace the changing parts with fields.

Branches and calculations

StepWhat it does
ChanceRuns one of two branches by the percentage you set.
If / ElseTests a variable, a slot, health, position, nearby players and more, then runs the matching branch.
WhileRepeats a block while a condition holds.
CalculateAdds, subtracts, multiplies or divides values and stores the result. Min and max work too.
Extract Chat FieldsApplies a pattern to text you already have, like %var:event.message%.
Command & Capture ReplySends a command and stores the fields of its reply, for commands like /bal.

Branches hold ordinary steps, up to 100 per block and 300 in the whole macro.

Payments on DonutSMP

A payment task comes with DonutSMP’s patterns filled in: {player:username} paid you $ {amount:money} for incoming money and You paid {player:username} $ {amount:money} for your own payments.

VerificationHow the amount is known
Server receipt (default)From the chat message. DonutSMP shortens large amounts, so 1.2M counts as 1,200,000 even if a little more was sent.
Balance checksAlso runs the Balance command to get exact amounts. Any other change to the balance, like a sale, breaks this mode.

Pay Player sends /pay once and waits for the server’s confirmation. It never retries, so a payment is never sent twice. While a payment task runs, use Pay Player, not /pay in a command step.

Example: a 45/55 payment game

  1. Advertise

    An Every interval task: Set Variable target to %random_username%, then Type Command /msg %var:target% Pay me to play.

  2. Take payments

    An Incoming payment task saved as payment.

  3. Refund what is outside your limits

    If / Else on payment.amount, with Pay Player for the same amount back.

  4. Play

    A Chance of 45: one branch runs Calculate for double the amount and Pay Player, the other sends a “you lost” message.

Before you leave it running

Check your server’s rules on automated trading. Test with small amounts on one account and watch Chat → Console, where interrupted and unconfirmed payments are logged. Nothing is replayed after a restart: when the account disconnects, the automation ends and what was queued is gone.

Need a hand?

Check the troubleshooting guide or return to all guides.