Areas and Fixes
Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
This commit is contained in:
65
_module/nss/_chest_respawn.nss
Normal file
65
_module/nss/_chest_respawn.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
void main()
|
||||
{
|
||||
string sSelf = GetResRef(OBJECT_SELF);
|
||||
location lSelf = GetLocation(OBJECT_SELF);
|
||||
string sLootBag;
|
||||
int iSearchForBag = 0;
|
||||
object oSearchForBag;
|
||||
object oBagItem;
|
||||
|
||||
if (sSelf == "temporaryplaceho")
|
||||
{
|
||||
sSelf = GetLocalString(OBJECT_SELF,"sType");
|
||||
//SendMessageToPC(GetFirstPC(),"Destroying Dropped Lootbag");
|
||||
|
||||
|
||||
while (sLootBag != "Body Bag")
|
||||
{
|
||||
|
||||
oSearchForBag = GetNearestObject(OBJECT_TYPE_ALL,OBJECT_SELF,iSearchForBag);
|
||||
if (oSearchForBag== OBJECT_INVALID)
|
||||
{
|
||||
//SendMessageToPC(GetFirstPC(),"Bag Not Found");
|
||||
break;
|
||||
}
|
||||
|
||||
sLootBag = GetTag(oSearchForBag);
|
||||
|
||||
iSearchForBag++;
|
||||
}
|
||||
|
||||
if (sLootBag == "Body Bag")
|
||||
{
|
||||
//SendMessageToPC(GetFirstPC(),"Distance: "+FloatToString(GetDistanceToObject(oSearchForBag)));
|
||||
if (GetDistanceToObject(oSearchForBag)<= 0.5)
|
||||
{
|
||||
oBagItem = GetFirstItemInInventory(oSearchForBag);
|
||||
while (oBagItem != OBJECT_INVALID)
|
||||
{
|
||||
DestroyObject(oBagItem,1.0);
|
||||
oBagItem = GetNextItemInInventory(oSearchForBag);
|
||||
}
|
||||
DestroyObject(oSearchForBag,1.0);
|
||||
}
|
||||
}
|
||||
|
||||
//SendMessageToPC(GetFirstPC(),"lootbag = " +sLootBag);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
oBagItem = GetFirstItemInInventory(OBJECT_SELF);
|
||||
|
||||
while (oBagItem != OBJECT_INVALID)
|
||||
{
|
||||
DestroyObject(oBagItem,1.0);
|
||||
oBagItem = GetNextItemInInventory(OBJECT_SELF);
|
||||
}
|
||||
|
||||
//SendMessageToPC(GetFirstPC(),"Destroying Chest");
|
||||
}
|
||||
DestroyObject(OBJECT_SELF,5.0);
|
||||
//SendMessageToPC(GetFirstPC(),"Replacing Chest");
|
||||
CreateObject(OBJECT_TYPE_PLACEABLE,sSelf,lSelf,FALSE);
|
||||
|
||||
}
|
Reference in New Issue
Block a user