generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload
This commit is contained in:
23
_mod/_module/nss/pl_hb_secretd.nss
Normal file
23
_mod/_module/nss/pl_hb_secretd.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// pl_hb_secretd - See if despawn
|
||||
// By Deva B. Winblood. December 11th, 2008
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oMe=OBJECT_SELF;
|
||||
object oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oMe,1);
|
||||
int bDestroy=FALSE;
|
||||
int bDestroy2=FALSE;
|
||||
object oDest=GetLocalObject(oMe,"oDest");
|
||||
if (!GetIsObjectValid(oPC)) bDestroy=TRUE;
|
||||
else if (GetDistanceBetween(oPC,oMe)>10.0) bDestroy=TRUE;
|
||||
oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oDest,1);
|
||||
if (!GetIsObjectValid(oPC)) bDestroy2=TRUE;
|
||||
else if (GetDistanceBetween(oPC,oDest)>10.0) bDestroy2=TRUE;
|
||||
if (bDestroy&&bDestroy2)
|
||||
{ // destroy
|
||||
DestroyObject(oMe);
|
||||
DestroyObject(oDest);
|
||||
} // destroy
|
||||
}
|
||||
Reference in New Issue
Block a user