Guide menu ▾

Macros

Break blocks, place block, notify and leave the game

The macro steps Break blocks, Place block, Send notification (test button), Leave the game, Run macro, Turn macro on/off, Wait, Counter, Loop back and Turn off bot.

Last updated: November 26, 2026

This page covers the remaining steps of the macro editor: the world steps Break blocks and Place block, the Send notification step, the connection step Leave the game and the flow steps Run macro, Turn macro on/off, Wait, Counter, Loop back and Turn off bot. Other steps: Macro steps: overview.

  1. 1In the Add step window search for the step or pick it from its group.
  2. 2Fill in its fields; if something is missing, the step card shows a ⚠ warning.
  3. 3Save the macro; Break blocks, Place block, Send notification, Leave the game and Turn macro on/off only work on the 3.5 bot engine.

The Break blocks step

The Break blocks step breaks blocks and picks up the drops. The Which blocks list offers two ways:

  • Blocks at the given coordinates: up to 16 coordinates (X Y Z) are added with Add coordinate.
  • A block type around the bot: enter a Block name (e.g. spawner, *_ore), a Radius (blocks) of 1-8 and a Count (1-16); the bot breaks the nearest first. If that block is not nearby the step is skipped.

Collect what is broken picks up the drops and Walk there when far lets the bot walk to the block. The bot uses a suitable tool from its inventory; a spawner needs a Silk Touch pickaxe, otherwise the spawner does not break and the step fails.

The Place block step

The Place block step puts the item in Item name at the given coordinates; up to 16 coordinates can be entered. The item must be in the bot's inventory. If Walk there when far is on, the bot walks to the coordinate. Unlike the .place module in the console, this step works with a coordinate list; for the module see Block placing.

The Send notification step and the test notification

The Send notification step sends a panel notification and, if your Discord account is linked, a DM too. The Notification text is at most 200 characters; {player} is the name of the triggering player. Inventory triggers also provide {item}, {count}, {free} and {durability}. Example: Inventory full ({free} free).

  • If Macro notifications is off in the bot's Settings → Notifications section, nothing is sent. At most one notification per 5 seconds and 30 per hour arrive for the same bot.
  • If Also send a Discord DM is off, only the panel notification arrives. Notification settings: Bot notifications.

The Send test notification button

  • Send test notification: the button under the notification step sends your text, without saving the macro, to the bot's notification channels (panel bell and Discord DM). With several bots, pick one in the Bot to send the test notification from list. The result says "Sent: panel notification, Discord DM" or why it was not sent.
  • If the macro is saved, assigned to the chosen bot, switched on and the bot is in the game, the variables are filled with the bot's current values and the notification arrives within a few seconds; otherwise everything except {bot} is sent as written.
The Send notification step: Notification text, available variables and the Send test notification button
The Send notification step: Notification text, available variables and the Send test notification button

The Leave the game step

The Leave the game step makes the bot leave the server. If you tick Rejoin after a set time, enter a Duration in seconds or minutes (at most 86400 seconds); the bot rejoins after that time and the macro carries on with the following steps. With the box off the bot leaves and the macro ends, so a Leave the game step without rejoining must be at the end of the flow.

The Run macro step

The Run macro step runs another macro assigned to the same bot from its first step. Pick it in the Macro to run list. If Wait for it to finish, then carry on is on, this macro continues where it left off when the chosen macro ends; if the chosen macro fails, this step fails too. With the box off the chosen macro is started and this macro carries on without waiting; if it is already running the step is skipped.

The Turn macro on/off step

The Turn macro on/off step switches a macro (or this macro) off or on for a while. In the Macro list pick This macro or one of the bot's macros; with Action pick Off or On. A trigger does not start an off macro; a manual start and the Run macro step still run it. If the switched-off macro is running, it stops (a macro that switches itself off runs to its end). When the bot leaves the server and reconnects, all macros start on again. It only works on the 3.5 bot engine.

Example: in the join macro turn the "leave when a player comes near" macro off; turn it back on after you have left the lobby and reached the target server. The target macro must be assigned to the bot, switched on in the bot's Macros tab and contain steps; otherwise the step fails.

The Wait, Counter, Loop back and Turn off bot steps

  • Wait: waits Seconds (1-3600) before the next step. With Random time (between two values) on, a random time between Min (s) and Max (s) is used.
  • Counter: keeps a number. Choose a Counter name (at most 32 characters) and an Action (Increase, Set value, Reset); use it in messages as {$name}. A Condition step can read the counter. Counters are kept across reconnects.
  • Loop back: restarts the flow from the first step. How many repeats (0 = forever) is 0-1000. Each round waits at least 1 second; the flow needs at least one Wait, action or Run macro step. It must be the last step.
  • Turn off bot: turns the bot off once queued messages are sent. The optional Reason written to the console is written to the console. The bot does not reconnect; you must start it again from the panel.

Frequently asked questions

How do I send a test notification from a macro?

Type the text in the Send notification step and press **Send test notification**. The text goes to the bot's notification channels without saving; if you have several bots, pick which bot the test is sent from in the list.

Why does my notification not arrive?

First check that **Macro notifications** is on in the bot's **Settings → Notifications** section. For DMs, **Also send a Discord DM** must be on and your Discord account linked. The test result says why a notification was not sent.

Can the bot leave the game and rejoin after a while?

Yes. Tick **Rejoin after a set time** in the Leave the game step and enter the time. When the bot rejoins, the macro continues with the next step.

What is the difference between the Turn macro on/off step and the macro switch?

The switch in the bot's Macros tab is permanent and changed by hand. The Turn macro on/off step works from a flow, and after the bot leaves and reconnects all macros start on.

Break blocks, place block, notify and leave the game — AFKBot