PWE_PRC8/_module/nss/henchheall.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

33 lines
901 B
Plaintext

#include "nw_i0_generic"
#include "prc_inc_racial"
void main()
{
ResetHenchmenState();
SetCommandable(TRUE, OBJECT_SELF);
object oTarget = GetFactionMostDamagedMember(OBJECT_SELF);
if(GetIsObjectValid(oTarget))
{
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
}
int nCurrent = GetCurrentHitPoints(oTarget);
int nBase = GetMaxHitPoints(oTarget);
if(nCurrent < nBase && !GetIsDead(oTarget))
{
talent tUse = GetCreatureTalentBest(TALENT_CATEGORY_BENEFICIAL_HEALING_TOUCH, 20);
if(GetIsTalentValid(tUse))
{
ClearAllActions();
ActionUseTalentOnObject(tUse, oTarget);
}
else
{
AssignCommand(OBJECT_SELF, ActionSpeakString("I'm out of healing spells.", TALKVOLUME_TALK));
}
}
}
}