Personnage
getLifePointsP
Obtenir les Points de Vie actuels du personnage en pourcentage.
Obtenir les Points de Vie actuels du personnage en pourcentage.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Obtenir les Points de Vie actuels du personnage en pourcentage.
fightCharacter:getLifePointsP()
| Type | Description |
|---|---|
int | Pourcentage de PV (0–100). |
-- Soigner si les PV sont inférieurs à 50%
if fightCharacter:getLifePointsP() < 50 then
local myCell = fightCharacter:getCellId()
if fightAction:canCastSpellOnCell(myCell, 4947, myCell) == 0 then
fightAction:castSpellOnCell(4947, myCell) -- soin sur soi-même
end
end