Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function shockwaveTimer(primary, minutes_left)
- local key = primary and "primary" or "secondary"
- --Configurable alert intervals, key = current time, value = next alert
- local next_intervals = {}
- next_intervals[60] = 5
- next_intervals[5] = 3
- next_intervals[3] = 1
- send("shipt " .. key:title() .. " shockwave timer expires in " .. minutes_left .. " " .. (minutes_left == 1 and "MINUTE!" or "MINUTES."))
- if bwl.shockwaveTimers[key] then
- bwl.shockwaveTimers[key] = nil
- end
- if next_intervals[minutes_left] then
- bwl.shockwaveTimers[key] = tempTimer((minutes_left - next_intervals[minutes_left])*60, [[shockwaveTimer(]] .. (primary and "true" or "false") .. [[, ]] .. next_intervals[minutes_left].. [[)]])
- end
- end
Add Comment
Please, Sign In to add comment