Battledale_PRC8/_module/nss/sc_train_dummy.nss

21 lines
567 B
Plaintext
Raw Permalink Normal View History

#include "rpo_inc"
void main()
{
object oDamager = GetLastDamager();
int iCurrentHP = GetCurrentHitPoints();
int iMaxHP = GetMaxHitPoints();
//DebugString(GetName(OBJECT_SELF) + " current health: " + IntToString(iCurrentHP));
effect eHeal = EffectHeal(iMaxHP - iCurrentHP);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF);
if (GetXP(oDamager) < 100 && GetIsPC(oDamager))
GiveXPToCreature(oDamager, 1);
else
SendMessageToPC(oDamager, "The training dummy won't increase your skills any further.");
}