API Lua Personnage

60 entries — WGRetro bot reference for Dofus Retro

Full documentation
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 !")
end
Stats & 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

Property / MethodTypeDescription
bot.name()stringNom du personnage
bot.level()numberNiveau
bot.classId()numberID de classe (1=Feca..12=Pandawa)
bot.breed()numberAlias de classId
bot.breedName()stringNom de la classe ('Iop', 'Cra'...)
bot.sex()booleanfalse=male, true=female
bot.characterId()stringID du personnage
bot.nickname()stringSurnom
bot.server()stringServeur
bot.serverId()stringID du serveur

Personnage — Points de vie / Energie

Property / MethodTypeDescription
bot.hp()numberPV actuels
bot.hpMax()numberPV max
bot.hpPercent()numberPV en pourcentage (0-100)
bot.energy()numberEnergie actuelle
bot.energyMax()numberEnergie max

Personnage — XP

Property / MethodTypeDescription
bot.xp()numberXP actuelle
bot.xpPercent()numberXP en pourcentage du niveau (0-100)

Personnage — Stats de combat

Property / MethodTypeDescription
bot.pa()numberPoints d'action
bot.pm()numberPoints de mouvement
bot.initiative()numberInitiative
bot.prospecting()numberProspection
bot.range()numberPortee

Personnage — Statistiques

Property / MethodTypeDescription
bot.vitality()numberVitalite (total)
bot.wisdom()numberSagesse (total)
bot.strength()numberForce (total)
bot.intelligence()numberIntelligence (total)
bot.chance()numberChance (total)
bot.agility()numberAgilite (total)
bot.vitalityBase()numberVitalite (base sans equip)
bot.wisdomBase()numberSagesse (base)
bot.strengthBase()numberForce (base)
bot.intelligenceBase()numberIntelligence (base)
bot.chanceBase()numberChance (base)
bot.agilityBase()numberAgilite (base)
bot.statsPoints()numberPoints de stats disponibles
bot.spellPoints()numberPoints de sorts disponibles

Personnage — Kamas / Pods

Property / MethodTypeDescription
bot.kamas()numberKamas
bot.pods()numberPods actuels
bot.podsMax()numberPods max
bot.podRatio()numberRatio pods (0.0-1.0)
bot.podsPercent()numberPods en pourcentage (0-100)
bot.isPodsFull(threshold?)booleanPods > seuil (default 0.9)

Personnage — Etat

Property / MethodTypeDescription
bot.inFight()booleanEn combat
bot.isMyTurn()booleanMon tour (combat)

Stats & Sorts — Upgrade

Property / MethodTypeDescription
bot.boostStat(statId)voidBoost stat +1 (10=force, 11=vita, 12=sagesse, 13=chance, 14=agi, 15=intel)
bot.statUpgrade(name, targetBase)booleanMonte une stat de base jusqu'a la cible ('strength', 'vitality'...)
bot.boostSpell(spellId)voidBoost sort +1 niveau
bot.spellLevel(spellId)numberNiveau actuel d'un sort (0 si pas appris)
bot.spellUpgrade(spellId, targetLevel)booleanMonte un sort au niveau cible
bot.getStats()tableTable stats complet
bot.getSpells()table{{ id, name, level }}

Personnage — Alias

Property / MethodTypeDescription
bot.id()stringAlias characterId
bot.username()stringNom du compte
bot.myBreed()numberAlias classId
bot.alignment()tableInfo alignement
bot.alliance()tableInfo alliance
bot.getKamas()numberAlias kamas
bot.podsP()numberAlias podsPercent
bot.subscriptionEnd()stringDate fin abonnement
bot.subscriptionDaysLeft()numberJours restants abo

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.