API Lua PNJ & Acteurs

15 entries — WGRetro bot reference for Dofus Retro

Full documentation
PNJ / Dialogue
-- Parler a un PNJ et repondre
bot.talkTo(42)
bot.waitForDialog()
bot.npcReply(1)
bot.closeDialog()

Acteurs

Property / MethodTypeDescription
bot.getMonsters()tableMonstres sur la map
bot.getNpcs()tablePNJs
bot.getPlayers()tableJoueurs
bot.getActorAt(cellId)table\nil | Acteur sur une cellule
bot.npcOnMap()tableAlias getNpcs

PNJ / Dialogue

Property / MethodTypeDescription
bot.talkTo(npcId)voidParler au PNJ
bot.talkToNpc(npcId)voidAlias talkTo
bot.reply(responseId)voidRepondre par ID
bot.npcReply(index)voidRepondre par index (1-based)
bot.closeDialog()voidFermer le dialogue
bot.leaveDialog()voidAlias closeDialog
bot.isInDialog()booleanDialogue ouvert ?
bot.getQuestionId()string\nil | ID question actuelle
bot.getResponses()tableIDs des reponses
bot.waitForDialog(timeout?)anyAttendre question PNJ

These functions are used in the WGRetro bot Lua scripts — testable with the free plan (1 bot, no time limit). Ready-to-use scripts on the marketplace.