16 lines
408 B
Plaintext
16 lines
408 B
Plaintext
void main()
|
|
{
|
|
object oPlayer = GetEnteringObject();
|
|
int nMaxHP = GetMaxHitPoints(oPlayer);
|
|
string sVarName = "s"+GetTag(oPlayer);
|
|
object oModule = GetModule();
|
|
int nHPOnExit = GetLocalInt (oModule, sVarName);
|
|
//Check to see if we have a new char or a reload
|
|
if(nHPOnExit == 0)
|
|
{
|
|
return;
|
|
}
|
|
effect dmg = EffectDamage(nMaxHP - nHPOnExit);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, dmg, oPlayer);
|
|
}
|