LoD_PRC8/_module/nss/bt_rstrohea.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

38 lines
1.3 KiB
Plaintext

void main()
{
int nHP = 0;
object oSelf = OBJECT_SELF;
effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP);
effect eAbsorbV = EffectVisualEffect(VFX_IMP_HEALING_X);
effect eDamgV = EffectVisualEffect(VFX_IMP_HARM);
effect eDamg = EffectDamage(50, DAMAGE_TYPE_MAGICAL);
int nRoll = d10();
if(nRoll == 5)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oSelf);
object oPc = GetFirstObjectInShape(SHAPE_SPHERE, 5.0f, GetLocation(oSelf), OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oPc))
{
if(oPc != OBJECT_SELF || !GetIsDM(oPc) || !GetIsDead(oPc) || !GetIsDMPossessed(oPc))
{
nHP = nHP + 50;
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamg, oPc);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamgV, oPc);
}
oPc = GetNextObjectInShape(SHAPE_SPHERE, 5.0f, GetLocation(oSelf), OBJECT_TYPE_CREATURE);
}
if(nHP != 0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eAbsorbV, oSelf);
effect eAbsorb = EffectTemporaryHitpoints(nHP);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAbsorb, oSelf, 120.0f);
SpeakString("Fear my might! I love absorbing life from others... Makes me feel young again!");
}
}
}