20 lines
564 B
Plaintext
20 lines
564 B
Plaintext
void main()
|
|
{
|
|
int nHP = GetCurrentHitPoints(OBJECT_SELF);
|
|
int nAcid = GetDamageDealtByType(DAMAGE_TYPE_ACID);
|
|
int nFire = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
|
|
effect eKD = EffectKnockdown();
|
|
effect eHealing = EffectTemporaryHitpoints(1000);
|
|
|
|
if(nHP < 10)
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKD, OBJECT_SELF, 10.0f);
|
|
DelayCommand(10.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHealing, OBJECT_SELF, 360.0f));
|
|
|
|
if(nAcid >= 1 || nFire >= 1)
|
|
{
|
|
SetImmortal(OBJECT_SELF, FALSE);
|
|
}
|
|
}
|
|
}
|