All pastes #155272 Raw Edit

Alarm Script

public text v1 · immutable
#155272 ·published 2006-08-30 22:57 UTC
rendered paste body
on *:text:!alarmmenu:#:{ msg $nick 12To use the alarm commands follow this guide:
  msg $nick 4 "!alarmset Reason Time" - Set your alarm, time is in minutes.
  msg $nick 4 "!alarmoff" - Turn your alarm off early
  msg $nick 4 "!alarminfo" - You're current reason and time left until your alarm rings
  msg $nick 1 -- End -- 
}
on *:text:!alarmset*:#:{ if (%alarm !== on) {
    set %alarm on
    set %alarmtime $3
    set %alarmreason $2
    set %alarminfotime $ctime
    notice $nick 12You're alarm has been set to ring in4 $3 12minutes for4 $2 $+ 12.
    /timer 1 $calc( $3 * 60 ) msg $nick 12RING RING RING! This is your alarm ringing for4 %alarmreason $+ 12!
    unset %alarm
  }
  else {
    notice $nick 12You're alarm is already set to ring in4 %alarmtime 12minutes for4 %alarmreason $+ 12!
} }
on *:text:!alarmoff:#:{ if (%alarm != on) {
    notice $nick 12You're alarm is not even set yet! Type 4!alarmset Reason Time12 to set. Time is in minutes.
  }
  else {
    set %alarm off
    /timer1 off
    notice $nick 12Your alarm is now set 4OFF12.
} }
on *:text:!alarminfo:#:{ if (%alarm !== on) {
    notice $nick 12Your alarm isn't even set yet! Type 4!alarmset Reason Time12 to set. Time is in minutes.
  }
  else {
    notice $nick 12You're alarm status is: Reason:4 %alarmreason 12Time Left:4 $calc( %alarminfotime - %alarmtime )
} }