Module commit

Module commit.
This commit is contained in:
Jaysyn904
2024-06-14 10:48:20 -04:00
parent 079830314c
commit f5ffe7d0b9
11110 changed files with 4747686 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
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);
}