Initial upload
Initial upload
This commit is contained in:
27
_module/nss/persist_oc.nss
Normal file
27
_module/nss/persist_oc.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
/*/////////////////////////////////////
|
||||
// Persistent Storage
|
||||
// Non-Specific
|
||||
// OnClose Event
|
||||
// Sharona Curves
|
||||
// 06/17/2007
|
||||
//
|
||||
/////////////////////////////////////*/
|
||||
void main()
|
||||
{
|
||||
string sTag = GetStringLeft(GetTag(OBJECT_SELF), 10);
|
||||
int cItems=0;
|
||||
object oItem = GetFirstItemInInventory();
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
if(GetHasInventory(oItem) == FALSE)
|
||||
{
|
||||
StoreCampaignObject("EDChests",sTag+"_"+IntToString(cItems),oItem);
|
||||
cItems++;
|
||||
}
|
||||
oItem = GetNextItemInInventory();
|
||||
}
|
||||
SetCampaignInt("EDChests",sTag+"_items",cItems);
|
||||
|
||||
if(cItems == 0)
|
||||
DeleteCampaignVariable("EDChests",sTag+"_0");
|
||||
}
|
||||
Reference in New Issue
Block a user