Rune_PRC8/_module/nss/akpaowiferandom.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

50 lines
2.0 KiB
Plaintext

object oSelf = OBJECT_SELF;
void akpaostorerandom()
{
location lstore = GetLocation(GetWaypointByTag("akpaostoreWP"));
switch ( d6(1) ) {
case 1:
DestroyObject(GetNearestObjectByTag("akpaostore1", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore1", lstore, FALSE, "akpaostore1");
SetLocalString(OBJECT_SELF, "store", "akpaostore1");
break;
case 2:
DestroyObject(GetNearestObjectByTag("akpaostore2", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore2", lstore, FALSE, "akpaostore2");
SetLocalString(OBJECT_SELF, "store", "akpaostore2");
break;
case 3:
DestroyObject(GetNearestObjectByTag("akpaostore3", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore3", lstore, FALSE, "akpaostore3");
SetLocalString(OBJECT_SELF, "store", "akpaostore3");
break;
case 4:
DestroyObject(GetNearestObjectByTag("akpaostore4", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore4", lstore, FALSE, "akpaostore4");
SetLocalString(OBJECT_SELF, "store", "akpaostore4");
break;
case 5:
DestroyObject(GetNearestObjectByTag("akpaostore5", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore5", lstore, FALSE, "akpaostore5");
SetLocalString(OBJECT_SELF, "store", "akpaostore5");
break;
case 6:
DestroyObject(GetNearestObjectByTag("akpaostore6", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore6", lstore, FALSE, "akpaostore6");
SetLocalString(OBJECT_SELF, "store", "akpaostore6");
break;
default:
DestroyObject(GetNearestObjectByTag("akpaostore1", oSelf));
CreateObject(OBJECT_TYPE_STORE, "akpaostore1", lstore, FALSE, "akpaostore1");
SetLocalString(OBJECT_SELF, "store", "akpaostore1");
break;
}
DelayCommand(3600.0, akpaostorerandom());
}
void main ()
{
akpaostorerandom();
}