API Lua Personnage

60 entradas — Referencia del bot WGRetro para Dofus Retro

Documentación completa
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

Propiedad / MétodoTipoDescripción
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

Propiedad / MétodoTipoDescripción
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

Propiedad / MétodoTipoDescripción
bot.xp()numberXP actuelle
bot.xpPercent()numberXP en pourcentage du niveau (0-100)

Personnage — Stats de combat

Propiedad / MétodoTipoDescripción
bot.pa()numberPoints d'action
bot.pm()numberPoints de mouvement
bot.initiative()numberInitiative
bot.prospecting()numberProspection
bot.range()numberPortee

Personnage — Statistiques

Propiedad / MétodoTipoDescripción
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

Propiedad / MétodoTipoDescripción
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

Propiedad / MétodoTipoDescripción
bot.inFight()booleanEn combat
bot.isMyTurn()booleanMon tour (combat)

Stats & Sorts — Upgrade

Propiedad / MétodoTipoDescripción
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

Propiedad / MétodoTipoDescripción
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

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.