All pastes #257911 Raw Edit

Repeat Script

public text v1 · immutable
#257911 ·published 2006-11-25 22:43 UTC
rendered paste body
The description of line above it is resembled with ; TEXT below the line.

on *:text:!repeat*:#:{ 
  if ($nick !isop $chan && $nick !ishop $chan) { msg $chan 12Only 4Operators12/4Half-Operators12 can use the 4Repeat Command12! | halt
    ; Checks for Op/H-Op status.  If there is no status, it notices not and halts.  Otherwise, continues.
  }
  ; End bracket from Op/H-Op check.
  else {
    ; Starting another IF statement.
    if ($4- == $null) { msg $chan 4Error REPEAT - Syntax: "!repeat AmountOfTimes HowOften Text to Repeat" HowOften is in minutes. | halt
      ; If there is no text filled in, it messages channel the syntax and halts.  Otherwise, continues.
    }
    ; End bracket from '$4- null' line.
    else {
      ; Starts the ending of the script.
      set %repeat.amm $2 | set %repeat.oft $3 | set %repeat.text $4-
      ; Sets the vars.
      timer1 %repeat.amm $calc( %repeat.oft * 60 ) msg #TAOM %repeat.text
      ; Sets the timer with the text.
      notice $nick 12You have started a timer in 4#TAOM12 to repeat4 %repeat.text 12every4 %repeat.oft 12minutes for4 %repeat.amm 12times.
      ; Notices the nick that the timer has started and shows information given.
      unset %repeat.amm | unset %repeat.oft | unset %repeat.text
      ; Unsets the vars.
} } }
; Ending brackets.