23 lines
523 B
Plaintext
23 lines
523 B
Plaintext
void main()
|
|
{
|
|
object oMod=GetModule();
|
|
int nDisableNonEssential=GetLocalInt(oMod,"nDisableNonEssential");
|
|
if (nDisableNonEssential!=TRUE)
|
|
{ // not disabled
|
|
int nN=GetLocalInt(OBJECT_SELF,"nHB");
|
|
if (nN<3)
|
|
{ // heartbeat
|
|
nN++;
|
|
SetLocalInt(OBJECT_SELF,"nHB",nN);
|
|
} // heartbeat
|
|
else
|
|
{
|
|
nN=GetLocalInt(GetArea(OBJECT_SELF),"nPlume");
|
|
nN=nN-1;
|
|
SetLocalInt(GetArea(OBJECT_SELF),"nPlume",nN);
|
|
DestroyObject(OBJECT_SELF);
|
|
}
|
|
} // not disabled
|
|
else { DestroyObject(OBJECT_SELF); }
|
|
}
|