Rune_PRC8/_module/nss/bdpaowiferandom.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 bdpaostorerandom()
{
location lstore = GetLocation(GetWaypointByTag("bdpaostoreWP"));
switch ( d6(1) ) {
case 1:
DestroyObject(GetNearestObjectByTag("bdpaostore1", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore1", lstore, FALSE, "bdpaostore1");
SetLocalString(OBJECT_SELF, "store", "bdpaostore1");
break;
case 2:
DestroyObject(GetNearestObjectByTag("bdpaostore2", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore2", lstore, FALSE, "bdpaostore2");
SetLocalString(OBJECT_SELF, "store", "bdpaostore2");
break;
case 3:
DestroyObject(GetNearestObjectByTag("bdpaostore3", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore3", lstore, FALSE, "bdpaostore3");
SetLocalString(OBJECT_SELF, "store", "bdpaostore3");
break;
case 4:
DestroyObject(GetNearestObjectByTag("bdpaostore4", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore4", lstore, FALSE, "bdpaostore4");
SetLocalString(OBJECT_SELF, "store", "bdpaostore4");
break;
case 5:
DestroyObject(GetNearestObjectByTag("bdpaostore5", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore5", lstore, FALSE, "bdpaostore5");
SetLocalString(OBJECT_SELF, "store", "bdpaostore5");
break;
case 6:
DestroyObject(GetNearestObjectByTag("bdpaostore6", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore6", lstore, FALSE, "bdpaostore6");
SetLocalString(OBJECT_SELF, "store", "bdpaostore6");
break;
default:
DestroyObject(GetNearestObjectByTag("bdpaostore1", oSelf));
CreateObject(OBJECT_TYPE_STORE, "bdpaostore1", lstore, FALSE, "bdpaostore1");
SetLocalString(OBJECT_SELF, "store", "bdpaostore1");
break;
}
DelayCommand(3600.0, bdpaostorerandom());
}
void main ()
{
bdpaostorerandom();
}