now:
if(%time == 1) {
serverCmdEnvGui_SetVar(%client, DayOffset, 0.68718);
}
if(%time == 2) {
serverCmdEnvGui_SetVar(%client, DayOffset, 0.68718);
}
if(%time == 3) {
serverCmdEnvGui_SetVar(%client, DayOffset, 0.68718);
}
...
then:
switch(%time) {
case 1:
serverCmdEnvGui_SetVar(%client, DayOffset, 0.68718);
case 2:
serverCmdEnvGui_SetVar(%client, DayOffset, 0.68718);
case 3:
serverCmdEnvGui_SetVar(%client, DayOffset, 0.68718);
...
Also, learn proper indentation:
function () {
block {
statement;
}
}
as it stands, you have none at all, which is better than inconsistent indentation by a long shot, but still rather difficult to read
I didn't consider it originally, but the client sided mod should be able to function completely independently from the server based version, and is inherently superior.
stuff, you don't even have to change much - just make a way to trigger it somehow (like a button on the environment gui maybe?) and change all the serverCmdThing(%client, args) calls to commandToServer('thing', args)