Rune_PRC8/_module/nss/gdpaowiferandom.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 gdpaostorerandom()
{
location lstore = GetLocation(GetWaypointByTag("gdpaostoreWP"));
switch ( d6(1) ) {
case 1:
DestroyObject(GetNearestObjectByTag("gdpaostore1", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore1", lstore, FALSE, "gdpaostore1");
SetLocalString(OBJECT_SELF, "store", "gdpaostore1");
break;
case 2:
DestroyObject(GetNearestObjectByTag("gdpaostore2", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore2", lstore, FALSE, "gdpaostore2");
SetLocalString(OBJECT_SELF, "store", "gdpaostore2");
break;
case 3:
DestroyObject(GetNearestObjectByTag("gdpaostore3", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore3", lstore, FALSE, "gdpaostore3");
SetLocalString(OBJECT_SELF, "store", "gdpaostore3");
break;
case 4:
DestroyObject(GetNearestObjectByTag("gdpaostore4", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore4", lstore, FALSE, "gdpaostore4");
SetLocalString(OBJECT_SELF, "store", "gdpaostore4");
break;
case 5:
DestroyObject(GetNearestObjectByTag("gdpaostore5", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore5", lstore, FALSE, "gdpaostore5");
SetLocalString(OBJECT_SELF, "store", "gdpaostore5");
break;
case 6:
DestroyObject(GetNearestObjectByTag("gdpaostore6", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore6", lstore, FALSE, "gdpaostore6");
SetLocalString(OBJECT_SELF, "store", "gdpaostore6");
break;
default:
DestroyObject(GetNearestObjectByTag("gdpaostore1", oSelf));
CreateObject(OBJECT_TYPE_STORE, "gdpaostore1", lstore, FALSE, "gdpaostore1");
SetLocalString(OBJECT_SELF, "store", "gdpaostore1");
break;
}
DelayCommand(3600.0, gdpaostorerandom());
}
void main ()
{
gdpaostorerandom();
}