mIRC Need to determine if 25 hours have passed since last script execution

203 Views Asked by At

Basically I have this script so far:

on 1:TEXT:*some text*:#:{
 if(($time(hh)-25) > $lasttime ) {
   This code gets executed only once per 25 hours
   $lasttime = $time(hh)
 }
}

I'm not sure if I'm doing this correctly but if I am I need to know how to set $lasttime if its not already set, and if there is anyway to keep $lasttime set when mirc is closed and re opened?

1

There are 1 best solutions below

2
On BEST ANSWER

Sure, save the last time it was said in a permanent variable (set %last_time ...) and check against that the next time. global mIRC %variables are kept even after close/reopen.