API Lua Carte & Deplacement
44 entrées — Référence du bot WGRetro pour Dofus Retro
Position & Map
log("Position: " .. bot.x() .. "," .. bot.y() .. " cellule " .. bot.cellId())
if bot.onMap("4,-17") then
log("On est a Astrub !")
endDeplacement
-- Se deplacer vers une cellule
bot.move(256)
-- Changer de map vers la droite
bot.changeMap("right")
-- Teleportation zaap
bot.useZaap(7411)Zaap / Zaapi avance
-- Sauvegarder zaap
bot.saveZaap()
-- Ouvrir zaap et voir destinations
bot.openZaap()
local dests = bot.getZaapDestinations()
for _, d in ipairs(dests) do
log(d.name .. " (" .. d.cost .. " kamas)")
endZaap / Zaapi / Navigation
bot.zaap("1234") -- teleport zaap
bot.navigateTo("5,-12") -- coordonnees "x,y"
bot.navigateTo("7411") -- mapId direct
bot.door(cellId) -- entrer par porte
bot.useInteractiveAt(cellId, skillId) -- interactivePosition & Map
| Propriété / Méthode | Type | Description |
|---|---|---|
| Propriete / Methode | Type | Description |
| bot.mapId() | string | ID de la map |
| bot.cellId() | number | Cellule actuelle |
| bot.mapCoords | table | { x, y } ou nil |
| bot.x() | number | Coordonnee X |
| bot.y() | number | Coordonnee Y |
| bot.mapName() | string | "[x,y]" |
| bot.currentArea() | string | Zone actuelle |
| bot.currentSubArea() | string | Sous-zone actuelle |
| bot.dimensions | table | { width, height } |
| bot.width() | number | Largeur de la map |
| bot.height() | number | Hauteur de la map |
| bot.onMap(coordsOrId) | boolean | Verifie si sur une map ("x,y" ou mapId) |
| bot.getWalkableCells() | table | Cellules walkable |
| bot.isWalkable(cellId) | boolean | Cellule marchable ? |
| bot.getInteractives() | table | {{ cellId, skills }} |
Deplacement
| Propriété / Méthode | Type | Description |
|---|---|---|
| bot.move(cellId) | boolean | Deplacement vers une cellule |
| bot.changeMap(direction) | boolean | Changer de map ('top', 'bottom', 'left', 'right') |
| bot.useZaap(destMapId) | void | Teleportation Zaap |
| bot.zaap(destMapId) | void | Alias de useZaap |
| bot.navigateTo(targetMapId) | boolean | Navigation monde |
| bot.useInteractive(cellId, skillId?) | void | Utiliser un interactif |
| bot.useInteractiveAt(cellId, skillId?) | void | Alias de useInteractive |
| bot.door(cellId) | void | Utiliser une porte/portail |
| bot.sendEmote(emoteId) | void | Envoyer une emote |
| bot.sit() | void | S'asseoir (emote 1) |
Zaap / Zaapi avance
| Propriété / Méthode | Type | Description |
|---|---|---|
| bot.saveZaap() | void | Sauvegarder le zaap actuel comme point de respawn |
| bot.openZaap() | boolean | Ouvrir la liste zaap (marche vers zaap + interaction) |
| bot.openZaapi() | boolean | Ouvrir la liste zaapi |
| bot.getZaapDestinations() | table | Destinations zaap {{ mapId, cost, name, x, y }} |
Navigation avancee
| Propriété / Méthode | Type | Description |
|---|---|---|
| bot.getMapId(coordsOrId) | string\ | nil | Resoudre "x,y" ou mapId en mapId |
| bot.getX(mapId) | number\ | nil | Coordonnee X d'une map |
| bot.getY(mapId) | number\ | nil | Coordonnee Y d'une map |
| bot.worldDistance(x, y) | number | Distance Manhattan en coords monde |
| bot.worldDistanceToMap(mapId) | number | Distance Manhattan vers une map |
| bot.moveTowardMap(mapId) | boolean | Avancer d'une map vers la cible |
| bot.hasChanged() | boolean | Map a change depuis le dernier appel (auto-reset) |
Deplacement — Alias
| Propriété / Méthode | Type | Description |
|---|---|---|
| bot.moveToCell(cellId) | boolean | Alias de move |
| bot.moveTowardCell(cellId) | boolean | Se rapprocher d'une cellule |
| bot.currentCell() | number | Alias de cellId |
| bot.currentMap() | string | Alias de mapId |
| bot.currentMapId() | string | Alias de mapId |
| bot.position() | table | { x, y, cellId, mapId } |
| bot.distanceBetween(cell1, cell2) | number | Distance entre deux cellules |
Ces fonctions s'utilisent dans les scripts Lua du bot WGRetro — testables avec le plan gratuit (1 bot, sans limite de durée). Scripts prêts à l'emploi sur la marketplace.