Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///////////////////////////////////////////
- //// ////
- //// CAN-DoHourly.txt ////
- //// ////
- //// Called by CAN-CoreScript.txt ////
- //// ////
- //// Uses CanCount ////
- //// Creates CanHourly ////
- //// ////
- ///////////////////////////////////////////
- ///////////////////////////////////////////
- //// ////
- //// Run things once per hour. ////
- //// First run will be at the ////
- //// hour after starting. ////
- //// ////
- ///////////////////////////////////////////
- if debug > 0 echo ">>> Starting CAN-DoHourly.txt - Cycle {CanCount}. <<<"
- // At startup (if CanHourly does not exist)
- // set CanHourly to equal the server hour.
- if !city.script.variables["CanHourly"] CanHourly = m_context.serverHours
- // Return if hour has not changed.
- if CanHourly == m_context.serverHours return
- ///////////////////////////////////////////////////////////////////
- // The server hour has changed so lets do hourly stuff.
- if debug > 1 echo "++++ Doing CAN-DoHourly.txt stuff - ({CanHourly}). ++++"
- // Increment CanHourly so that we know it's done.
- CanHourly ++
- // Roll over CanHourly when needed.
- if CanHourly == 24 CanHourly = 0
- // Report stats every 4 hours.
- if !(m_context.serverHours MOD 4) call "CAN-Stats.txt"
- ## if m_context.serverHours = 23 execute "config wartown:1"
- /////////////////////////////////////
- //// Do hourly stuff here. ////
- /////////////////////////////////////
- /////////////////////////////////////
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement