API Lua Personnage
60 entradas — Referencia del bot WGRetro para Dofus Retro
Personnage — Identite
-- Exemple
log("Personnage: " .. bot.name() .. " niveau " .. bot.level())
log("Classe: " .. bot.breedName())Personnage — Points de vie / Energie
log("PV: " .. bot.hp() .. "/" .. bot.hpMax() .. " (" .. bot.hpPercent() .. "%)")Personnage — Kamas / Pods
if bot.isPodsFull(0.8) then
log("Pods presque pleins !")
endStats & Sorts — Upgrade
-- Monter la force a 300 base
bot.statUpgrade("strength", 300)
-- Monter le sort 161 au niveau 5
bot.spellUpgrade(161, 5)Personnage — Identite
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.name() | string | Nom du personnage |
| bot.level() | number | Niveau |
| bot.classId() | number | ID de classe (1=Feca..12=Pandawa) |
| bot.breed() | number | Alias de classId |
| bot.breedName() | string | Nom de la classe ('Iop', 'Cra'...) |
| bot.sex() | boolean | false=male, true=female |
| bot.characterId() | string | ID du personnage |
| bot.nickname() | string | Surnom |
| bot.server() | string | Serveur |
| bot.serverId() | string | ID du serveur |
Personnage — Points de vie / Energie
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.hp() | number | PV actuels |
| bot.hpMax() | number | PV max |
| bot.hpPercent() | number | PV en pourcentage (0-100) |
| bot.energy() | number | Energie actuelle |
| bot.energyMax() | number | Energie max |
Personnage — XP
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.xp() | number | XP actuelle |
| bot.xpPercent() | number | XP en pourcentage du niveau (0-100) |
Personnage — Stats de combat
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.pa() | number | Points d'action |
| bot.pm() | number | Points de mouvement |
| bot.initiative() | number | Initiative |
| bot.prospecting() | number | Prospection |
| bot.range() | number | Portee |
Personnage — Statistiques
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.vitality() | number | Vitalite (total) |
| bot.wisdom() | number | Sagesse (total) |
| bot.strength() | number | Force (total) |
| bot.intelligence() | number | Intelligence (total) |
| bot.chance() | number | Chance (total) |
| bot.agility() | number | Agilite (total) |
| bot.vitalityBase() | number | Vitalite (base sans equip) |
| bot.wisdomBase() | number | Sagesse (base) |
| bot.strengthBase() | number | Force (base) |
| bot.intelligenceBase() | number | Intelligence (base) |
| bot.chanceBase() | number | Chance (base) |
| bot.agilityBase() | number | Agilite (base) |
| bot.statsPoints() | number | Points de stats disponibles |
| bot.spellPoints() | number | Points de sorts disponibles |
Personnage — Kamas / Pods
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.kamas() | number | Kamas |
| bot.pods() | number | Pods actuels |
| bot.podsMax() | number | Pods max |
| bot.podRatio() | number | Ratio pods (0.0-1.0) |
| bot.podsPercent() | number | Pods en pourcentage (0-100) |
| bot.isPodsFull(threshold?) | boolean | Pods > seuil (default 0.9) |
Personnage — Etat
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.inFight() | boolean | En combat |
| bot.isMyTurn() | boolean | Mon tour (combat) |
Stats & Sorts — Upgrade
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.boostStat(statId) | void | Boost stat +1 (10=force, 11=vita, 12=sagesse, 13=chance, 14=agi, 15=intel) |
| bot.statUpgrade(name, targetBase) | boolean | Monte une stat de base jusqu'a la cible ('strength', 'vitality'...) |
| bot.boostSpell(spellId) | void | Boost sort +1 niveau |
| bot.spellLevel(spellId) | number | Niveau actuel d'un sort (0 si pas appris) |
| bot.spellUpgrade(spellId, targetLevel) | boolean | Monte un sort au niveau cible |
| bot.getStats() | table | Table stats complet |
| bot.getSpells() | table | {{ id, name, level }} |
Personnage — Alias
| Propiedad / Método | Tipo | Descripción |
|---|---|---|
| bot.id() | string | Alias characterId |
| bot.username() | string | Nom du compte |
| bot.myBreed() | number | Alias classId |
| bot.alignment() | table | Info alignement |
| bot.alliance() | table | Info alliance |
| bot.getKamas() | number | Alias kamas |
| bot.podsP() | number | Alias podsPercent |
| bot.subscriptionEnd() | string | Date fin abonnement |
| bot.subscriptionDaysLeft() | number | Jours restants abo |
Estas funciones se usan en los scripts Lua del bot WGRetro — probables con el plan gratis (1 bot, sin límite de tiempo). Scripts listos para usar en el marketplace.