Adjusting Zombie spawn rates based on time of day

Whats up... thanks for your help in the past...
Can anyone help me with a little script code... working on with Reality Dayz 1.8.4. Wanted to know if any of you know of a script that would allow me to change the spawn number and rate at a give server up time... Simple logic is this:

if UpTime=>3
Zombie spawn rate City 30
Zombie spawn rate Town 20
Zombie spawn rate Village 10
else if UpTime=<3
Zombie spawn rate City 60
Zombie spawn rate Town 40
Zombie spawn rate Village 20

Any thought how to accomplish this?


that would require a restart and reset the time of day... I know that it would need to be in the part of the running spawn code, but not sure of the code or the placement...
I dont know that you cant change the maxzombies on the fly. Have you tried it?
Have this code in your init.sqf

while {true} do {

if uptime > 60 then dayzmaxzombies = 20
f uptime > 120 then dayzmaxzombies = 30
f uptime > 180 then dayzmaxzombies = 40
f uptime > 240 then dayzmaxzombies = 60

sleep 5;
to test if you can change max zombies do this in your init.sqf
set the max zombies to 60 and go to town, see if they are all over the place, they should be.

put this code in the bottom of your init.sqf

_this = createTrigger ["EmptyDetector", [7024.4883, 7660.3794, 0]];
_this setTriggerActivation ["ALPHA", "PRESENT", true];
_this setTriggerStatements ["this", "dayz_maxzombiesglobal = 0;", Position player, [], 0, ""FORM""];", ""];
Now you press backspace to bring up the menu, click the bottom comms option, then radio and radio alpha.
Then go to a different city and there should be zero zombies spawned if we were able to change the value.

Check the variable name though. And as usual, this is off teh top of my head, not tested and might have an error but you get the gist of it all and can work it all out
I'll build this in and give it a try... the trigger code at the bottom is an in game code I have never used before... the "if" statements, do I put this close to the top of the init.
looking through the code, where is the uptime defined? I know it's in the Debug, but can I pull a variable from there... I think I need a "define" at the top to set the uptime as a thing... thoughts?