~1
_letters=["Oc","R","F"]
step=0
_wait=0

#Set
if (step<3) then {step=step+1} else {step=1}

_a1=(call ("Oct"+format["%1",step]))
_a2=(call ("Ocl"+format["%1",step]))
_b1=(call ("Rt"+format["%1",step]))
_b2=(call ("Rl"+format["%1",step]))
_c1=(call ("Ft"+format["%1",step]))
_c2=(call ("Fl"+format["%1",step]))



;player globalchat format ["Overcast time: %1 level: %2",_a1,_a2]

_a1 setOvercast _a2
~_a1

;player globalchat format ["Rain time: %1 level: %2",_b1,_b2]
;player globalchat format ["Fog time: %1 level: %2",_c1,_c2]

_b1 SetRain _b2
_c1 SetFog _c2

if (_b1 > _c1) then {_wait=_b1} else {_wait=_c1}
~_wait

goto "Set"