First of all, that wouldn't work because it isn't written properly. You're missing a number of { } which causes the ifs and else not work work as intended. Second, your script is dependent on being triggered by others at the right time, so if it isn't triggered at 0: (which is every 10 minutes, midnight, and 10 am) then you'll skip updating the day.

Code:
on *:start:{
  update_day
}

alias update_day {
  if ((!%begin) || (!%day)) {
    var -g %begin = $ctime
    var -g %day = 1
  }
  if ($ceil($calc(($ctime - %begin)/86400)) >= 30) {
    %begin = $ctime
    %day = 1
  }
  else %day = $v1
  .timerupdate.day -o 00:00 1 0 update_day
}


The timer is set to go off every day at midnight. The alias sets an initial time and then calculates how many days have passed since it started, and resets to 1 once it reaches 30. I'm not sure if it will work perfectly though. %begin may need to be the time at midnight.

edit: changed timer

Last edited by Loki12583; 21/08/08 03:49 AM.