Aschbourne_PRC8/_module/nss/vg_coffinondeath.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

28 lines
945 B
Plaintext

void main()
{
object oVamp = GetNearestObjectByTag(GetLocalString(OBJECT_SELF, "NW_L_MYCREATOR"),OBJECT_SELF);
int iVampHealth = GetMaxHitPoints(oVamp);
effect eDamage = EffectDamage((iVampHealth/2),DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_PLUS_TWENTY);
//Remove effects from the "sleeping vamp" and wake him up with 1/2 hit points
effect eLoop=GetFirstEffect(oVamp);
while (GetIsEffectValid(eLoop))
{
if (GetEffectType(eLoop)==EFFECT_TYPE_CUTSCENE_PARALYZE)
RemoveEffect(oVamp, eLoop);
if (GetEffectType(eLoop)==EFFECT_TYPE_DAMAGE_REDUCTION)
RemoveEffect(oVamp, eLoop);
if (GetEffectType(eLoop)==EFFECT_TYPE_IMMUNITY)
RemoveEffect(oVamp, eLoop);
if (GetEffectType(eLoop)==EFFECT_TYPE_VISUALEFFECT)
RemoveEffect(oVamp, eLoop);
if (GetEffectType(eLoop)==EFFECT_TYPE_ETHEREAL)
RemoveEffect(oVamp, eLoop);
eLoop=GetNextEffect(oVamp);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oVamp);
}