Initial upload
Initial upload
This commit is contained in:
29
_module/nss/persist_oo.nss
Normal file
29
_module/nss/persist_oo.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
/*/////////////////////////////////////
|
||||
// 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user