From 101382d27201def135810ce8e2cbd80f62748f51 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Sun, 5 Dec 2021 12:16:41 -0500 Subject: [PATCH] Create multipleMapRotation.cs --- .../scripts/autoexec/multipleMapRotation.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Classic/scripts/autoexec/multipleMapRotation.cs diff --git a/Classic/scripts/autoexec/multipleMapRotation.cs b/Classic/scripts/autoexec/multipleMapRotation.cs new file mode 100644 index 0000000..43f0825 --- /dev/null +++ b/Classic/scripts/autoexec/multipleMapRotation.cs @@ -0,0 +1,28 @@ +//Enable/Disable +$EnableMultipleMapRotation = 0; + +//How any mapRotation Files +//Naming scheme mapRotation1.cs, mapRotation2.cs, mapRotation3.cs, etc +$mapRotationFilesCount = 3; + +function multipleMapRotation() +{ + if($EnableMultipleMapRotation) + { + %random = getrandom(1, $mapRotationFilesCount); + %mapRot = "prefs/mapRotation" @ %random @ ".cs"; + $Host::ClassicRotationFile = %mapRot; + + //Echo at start + schedule(10000,0,"multipleMapRotationEcho",0); + } +} + +//Echo at start +function multipleMapRotationEcho() +{ + echo("Current MapRotation: " @ $Host::ClassicRotationFile); +} + +//Run +multipleMapRotation(); \ No newline at end of file