Well it isn't too hard. I'll try to explain it the best I can.
It's basically a while do loop, with a variable that ranges from 0 to 3600. I use 3600 because that's how many seconds are in a hour (And most games base their days on an hourly basis). 3600 can also be divided evenly into quarters for how it should look during the day, and into hours (3600/24 = 150 ) evenly. Every 150 interval would mean an hour has gone by in the game world. That may not make much sense...But here's the script.
Now, this script is made to run on a single map. The condition may change, depending on how you want to use it.
global variable (number, time)
while (current map == 0) do (
wait (18 )
increment (time)
if (time >> 3600) then (
set variable (time, 0)
)
)
You may want to add other things in there as well, like:
if (time >= 900, and, time <= 0) then (
do whatever you want for the morning
)
That'd do commands for the morning. Actually, if you're wondering what the numbers are for each section of day:
0-900 = Morning
901-1800 = Afternoon
1801-2700 = Sunset
2700-3600 = Night
Also, in the wait command up in the while do loop is 18. On my computer that's about a second. Feel free to alter it if you don't want each day to be an hour long (Dimensions I is like a 6 or so making each day 15-20 mins long).
I dunno...I quickly put this together off the top of my head. Please, if you have any questions about it just post. I'd be happy to help further.