30 lines
855 B
Plaintext
30 lines
855 B
Plaintext
|
|
||
|
/*/////////////////////////////////////
|
||
|
// Persistent Storage
|
||
|
// Non-Specific
|
||
|
// OnOpen Event
|
||
|
// Sharona Curves
|
||
|
// 06/17/2007
|
||
|
//
|
||
|
/////////////////////////////////////*/
|
||
|
void main()
|
||
|
{
|
||
|
if(GetLocalInt(OBJECT_SELF, "DoOnce") == 1)
|
||
|
return;
|
||
|
|
||
|
SetLocalInt(OBJECT_SELF, "DoOnce", 1);
|
||
|
string sTag = GetStringLeft(GetTag(OBJECT_SELF), 10);
|
||
|
int cItems=0;
|
||
|
int total = GetCampaignInt("EDChests", sTag+"_items");
|
||
|
if(total == 0)
|
||
|
return;
|
||
|
sTag = GetTag(OBJECT_SELF) + "_0";
|
||
|
object oItem = RetrieveCampaignObject("EDChests", sTag, GetLocation(OBJECT_SELF), OBJECT_SELF);
|
||
|
while(GetIsObjectValid(oItem) && (cItems < total))
|
||
|
{
|
||
|
cItems++;
|
||
|
sTag = GetTag(OBJECT_SELF) + "_" + IntToString(cItems);
|
||
|
oItem = RetrieveCampaignObject("EDChests", sTag, GetLocation(OBJECT_SELF), OBJECT_SELF);
|
||
|
}
|
||
|
}
|