Farming in Dofus 3 means repeating the same loop for hours: gather a map, move on to the next one, head back to the bank to empty your inventory, sell, start again. That is exactly what a Dofus 3 farming bot automates. This guide describes what MoonBot's Dofus 3 engine actually does for gathering and professions, how to configure it, with a commented Lua script, and what to know before you run it on your accounts.
MoonBot is a cloud bot: your characters run on our servers and you control them from a browser, including on your phone. Nothing is installed on your PC, which can stay switched off while the bot gathers.
What the Dofus 3 farming bot does
The Dofus 3 engine was written for the Unity client. For farming, four building blocks work together:
- Looped gathering. On each map of your route, the bot gathers the available resources until there are none left or the inventory is full, then moves on to the next map.
- Safeguards. The bot does not gather during a fight, stops when pods are full and sticks to your list of allowed resources.
- The bank. Past a pod threshold you choose, the bot heads to the bank, deposits according to your rules (keep, withdraw, delete) and resumes its route.
- Multi-map routes. Movement relies on the Dofus 3 world graph: the bot works out the path between two maps by itself, doors and zaaps included.
Selling at the Marketplace (HDV) and crafting complete the loop; both are covered further down. The full status of the engine (what is operational, what is not available yet) is kept up to date in our article Dofus 3 (Unity) bot: what MoonBot automates.
The gathering loop, step by step
A MoonBot farming script fits in two Lua functions. move() returns the list of steps of the route; bank() is called when the inventory goes over the pod threshold and returns the path to the bank. Each step names a map and what to do there.
- Arriving on the map. The bot gathers every resource from your list that is present on the map (
gather = true). - Inventory full? If the pod threshold is reached, the bot interrupts the route and runs
bank(). - Next map. Otherwise, it leaves in the direction given (
path) and starts again on the next map. - End of the route. Once it reaches the last step, the script starts over from the beginning: that is the loop.
Within a single step, the execution order is fixed: gathering, then combat, then the custom function, then bank, selling and crafting, and finally the map change. So on a single map, you can have the bot gather and then go to the bank.
Setting up gathering in the dashboard
Everything is set from the dashboard, without a line of code if you use an existing script, or directly in the script with the functions of the config namespace:
| Setting | Lua function | Effect |
|---|---|---|
| Resources to gather | config.setGatherList({...}) | List by name or by item ID, for example {"Bois de Frêne"} |
| List mode | config.setHarvestMode("whitelist") | whitelist: only the list; blacklist: everything except the list |
| Bank threshold | config.setBankThreshold(85) | Pod percentage that triggers the trip to the bank (-1 to disable) |
| Kamas to keep | config.setBankKamas(0) | Kamas kept on the character when depositing (-1 to keep them all) |
The full Lua documentation is built into the Dofus 3 dashboard. The few functions that are not available yet carry a "Coming soon" badge.
A commented farming script
Here is the structure of a gathering script for Dofus 3. Replace the map IDs of the route with those of your area: the dashboard's MapViewer tab shows the ID of the map your character is on. The bank() function is taken from our Astrub script.
-- Looped gathering, back to the bank at 85% pods
function onLoad()
config.setGatherList({ "Bois de Frêne", "Bois de Châtaignier" })
config.setHarvestMode("whitelist")
config.setBankThreshold(85)
end
function move()
-- Replace CARTE_1… with your map IDs (MapViewer)
return {
{ map = "CARTE_1", path = "right", gather = true },
{ map = "CARTE_2", path = "right", gather = true },
{ map = "CARTE_3", path = "bottom", gather = true },
{ map = "CARTE_4", path = "left", gather = true },
}
end
function bank()
map.moveTowardMap(192415750) -- Astrub bank: a single call, the route is computed
return { { npcBank = true, path = 409 } }
end
Two rules prevent most mistakes: on Dofus 3, use a map's numeric ID rather than its coordinates, because several interiors share the same coordinates; and call map.moveTowardMap() only once, never inside a loop, since it walks the whole route before handing control back.
Don't feel like writing a route? The script marketplace offers ready-to-use routes, rated by users.
Leveling professions and crafting
Gathering levels up your gathering professions exactly as it does in-game. A script can read a profession's level with job.level(id), or its progress with job.xpPercent(id), and switch areas when a milestone is reached: that is how you automate leveling a Lumberjack or a Farmer without watching the counter.
For crafting professions, the craft = true step handles everything on a workshop map: the bot locates the workshops, works out the maximum number of items it can make with what is in the inventory, puts in the ingredients and starts crafting. You pick the recipes to produce in the dashboard's Craft tab. For finer control, the craft namespace exposes craft.setRecipe(), craft.setQuantity() and craft.maxCraftable().
Selling your resources on the marketplace
What you gather is only worth something once it is sold. Add a sale = true step on a marketplace map: the bot opens the marketplace, first sells the items you have configured, then the rest according to your default rules, and updates its prices. Price settings, price floors and the dedicated Lua functions are covered in our Dofus 3 marketplace bot guide.
A full loop therefore looks like this: gather up to 85% pods, stop at the marketplace to sell the resources that sell well, deposit the rest in the bank for crafting, resume the route.
What each tier includes
MoonBot's prices are the same for Dofus 3, Dofus Retro and Dofus Touch, with a separate subscription for each version.
| Feature | Free | Beginner (€29) | Standard (€87) and up |
|---|---|---|---|
| Gathering, bank, routes | Yes | Yes | Yes |
| Full Lua scripting | Yes | Yes | Yes |
| Marketplace selling | — | — | Yes |
| Automatic crafting | — | — | Yes |
| Simultaneous bots | Up to 5, through Discord invites | 30 | 150, 250 or 500 |
In other words, you can try gathering and banking for free; automatic selling and crafting require the Standard tier. The details are on the Dofus 3 bot page, and exactly how the free tier works is explained in our free Dofus bot article.
Ready-to-run scripts. Don't feel like setting everything up yourself? The community publishes its gathering scripts for Dofus 3 on the MoonBot marketplace, free or paid: browse the Dofus 3 gathering scripts. Each page describes what the script does; you then get it from the Marketplace tab of the app.
Precautions before you launch
- Test on a secondary account. Run your script first on an account you can afford to lose, and follow the first loops in the MapViewer.
- One proxy per account. On Dofus 3, every account added to the dashboard needs its own proxy.
- Keep an eye on the bank. A pod threshold set too high wastes resources; one set too low multiplies the round trips. 80 to 90% is a good starting point.
- Check your routes after a game update. The engine keeps up with Dofus 3 versions, but a map changed by Ankama can break a hand-written route.
Botting breaks the terms of use of Dofus and exposes your accounts to sanctions. MoonBot is independent third-party software, not affiliated with Ankama: you use it at your own responsibility.
To go further: the Dofus 3 multi-account guide explains how to run several characters in parallel, and the MoonBot Dofus 3 (Unity) bot page presents the whole product.


