28 lines
696 B
Plaintext
28 lines
696 B
Plaintext
|
/*/////////////////////////////////////
|
||
|
// 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");
|
||
|
}
|