Macro steps: inventory, menus and dialogs
Click slots with the right numbers, wait for menus, move items in bulk, enchant at an enchanting table, and answer server dialogs and Bedrock forms.
How slots are numbered
Every slot step uses the numbering of the window that is open at that moment.
| Window | Numbers |
|---|---|
| Nothing open (player inventory) | 0 to 8 are the crafting grid and armour (armour is 5 to 8), 9 to 35 the main inventory, 36 to 44 the hotbar, and 45 the off hand on Java. |
| A menu or container is open | The menu’s own slots come first, 0 up to its size minus one, then your main inventory, then your hotbar. A single chest has 27 menu slots, a large chest 54. |
Every slot field in the builder has a Live example panel under it. Pick one of your connected accounts and the panel draws the menu that account has open, or its player inventory when nothing is open, with the exact numbers. Click a cell to write that number into the field. Nothing is sent to the account; the panel only reads. Set Hotbar shows a hotbar bar the same way, numbered 0 to 8.
Open a menu and click through it
Open it
Add Type Command with the command that opens the menu, such as
/shop.Wait for it
Add Wait for Window. It continues as soon as a container opens, or gives up after the timeout (500 to 120,000 ms). This beats a fixed wait on a laggy server.
Click a slot
Add Click GUI Slot with the slot number, the mouse button, and Shift Click when the menu expects it. Click N times (1 to 200) with a Delay between clicks repeats the same click, for example to buy a stack several times.
Wait for the result
Where a menu fills a slot after a moment, add Wait for Slot: the slot number, an optional item name, a minimum count, a timeout (100 to 300,000 ms), and what to do on timeout. It polls the open menu until the slot holds what you asked for.
Close it
Add Close Window, which presses Escape.
Read Slot stores what a slot holds into a variable so a later If step can check the price or the name; see variables, conditions and loops.
Move and drop items in bulk
| Step | Settings |
|---|---|
| Shift-Click All Matching | Shift-clicks every slot in a range whose item matches the name, with a delay between clicks (20 to 2000 ms). With a shop or deliver menu open, this dumps everything matching into it. The default range 9 to 44 skips armour. |
| Swap Slots | Swaps the contents of two slots. |
| Drop Item | Drops one item, or the whole stack, from a slot. |
| Drop Held Item | Drops what the selected hotbar slot holds: the whole stack, like Ctrl+Q, or a single item like Q. |
| Drop All Items | Empties the inventory with a delay between drops, optionally including armour, or limited to one item id. |
| Find Slot | Searches for an item by name inside a slot range, preferring the hotbar, and stores the slot number, whether it was found, the name, and the count in a variable. Tick the container option to search the open menu instead of the player inventory. |
Enchanting table
Enchant Item does everything a player does at an enchanting table: it opens the table, puts the item into the item slot and lapis lazuli into the lapis slot from anywhere in the inventory, waits for the three offers, takes the one you chose, puts the enchanted item back into the inventory and closes the table. It works on Java accounts. Stand within reach of the table first (about four blocks); add a Goto Coords step before it if the account has to walk there. The table under the crosshair is used first, otherwise the nearest one.
| Setting | What it does |
|---|---|
| What to enchant | Books, An item by name (one or more names separated by commas, * matches anything, for example diamond_sword, *_pickaxe), The item in an inventory slot (9 to 35 main inventory, 36 to 44 hotbar), or Any enchantable item (swords, axes, tools, armour, bows, crossbows, tridents, maces, fishing rods and books). Items that already have enchantments are never used. |
| Offer to take | Highest level the account can afford (the default), Cheapest offer, or exactly the top, middle or bottom offer. Like in the game the top, middle and bottom offers cost 1, 2 and 3 lapis lazuli and as many levels, and the account needs at least the level shown on the offer. |
| How many items | How many items to enchant in this step, up to 1000. 0 keeps going until the items, the lapis or the levels run out. |
| Delay between clicks | The pause between clicks in the table, 50 to 5000 ms, with a little random variation (default 250 ms). |
| Save the result to a variable | Optional. The variable holds count, reason (done, no-items, no-lapis, no-levels), item, enchantments, levels and offer, so a Discord Alert can say %var:ench.count% books enchanted. |
Server dialogs and Bedrock forms
Newer servers, DonutSMP included, open dialogs instead of chest menus: a titled screen with text, inputs such as a text box, an on/off toggle, an option cycler or a slider, and buttons. Buttons are numbered 1, 2, 3 in reading order, top left first, with the Back, OK, Yes and No buttons at the bottom counted last. Inputs are numbered 1, 2, 3 from the top. The Live example under these steps shows the numbers on the dialog the account has open.
Java servers send dialogs from 1.21.6 on. Bedrock forms work with the same steps, on Geyser servers such as DonutSMP and on Bedrock servers. A button menu numbers its buttons 1, 2, 3 from the top. A yes or no question has button 1 for the first answer and 2 for the second. A form with inputs numbers them from the top and has one Submit button, number 1: fill the inputs with Dialog Input, then press button 1.
| Step | Settings |
|---|---|
| Wait for Dialog | Waits until a dialog opens, optionally one whose title contains your text, up to the timeout (500 to 120,000 ms). |
| Dialog Input | Fills an input found by number, by its label text, or by the key the plugin gave it. Text box: any text, tokens allowed. Toggle: on or off. Option cycler or dropdown: the option id or the text it shows. Slider: a number. |
| Dialog Button | Presses a button found by number or by label text, and runs what the button does: a command, a custom action with the current input values, or the next dialog. |
| Close Dialog | Presses Escape on the open dialog. |
The If, Wait Until Condition, and Switch steps can test whether a dialog is open and read its title or body text. Java accounts on versions older than 1.21.6 skip dialog steps with a console line.
Example: sell through a shop menu
A typical sell loop, with slot numbers you replace with your server’s:
Open the shop
Type Command
/shop, then Wait for Window 5000.Navigate
Click GUI Slot for the category, then for the item, then for the quantity.
Sell
Shift-Click All Matching with the item name, slots 9 to 44, so every stack moves into the menu.
Close and repeat
Close Window, then set Forever on with a few seconds Between loops.
Check the troubleshooting guide or return to all guides.