Aschbourne_PRC8/_module/nss/_open_smelt.nss

33 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-06-14 10:48:20 -04:00
void main()
{
CreateItemOnObject("flagswitch005",OBJECT_SELF,1);
CreateItemOnObject("flagswitch006",OBJECT_SELF,1);
CreateItemOnObject("flagswitch007",OBJECT_SELF,1);
CreateItemOnObject("flagswitch008",OBJECT_SELF,1);
CreateItemOnObject("flagswitch009",OBJECT_SELF,1);
object oPC = GetLastOpenedBy();
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
{
CreateItemOnObject("skilllogbook",oPC,1);
}
// Search for and destroy any hidden 'body bags' from prior incarnations of this placeable
object oSearchForBag = GetNearestObjectByTag("Body Bag",OBJECT_SELF,1);
if (oSearchForBag == OBJECT_INVALID)return;
object oBagItem = OBJECT_INVALID;
if (GetDistanceToObject(oSearchForBag)<= 0.2)
{
//SendMessageToPC(GetFirstPC(),"Body bag found.. destroying contents..");
oBagItem = GetFirstItemInInventory(oSearchForBag);
while (oBagItem != OBJECT_INVALID)
{
//SendMessageToPC(GetFirstPC(),"Destroying : "+GetName(oBagItem));
DestroyObject(oBagItem);
oBagItem = GetNextItemInInventory(oSearchForBag);
}
DestroyObject(oSearchForBag,1.0);
}
}