Korvin commented on a Page, Count (Seconds)   -  Feb 17, 2009

i really hate your style =/ soooooo i decided to edit your code in my style. look over it.

on *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  var %w = !countdown,!viewcount,!countstarted,!countstop,!countpause,!countrestart
  if ( %flood $+ $nick == $null ) {
    set -u2 %flood $+ $nick 1
    if ($1 == $gettok(%w,1,44)) {
      if (%count) { msg $chan There is a game going already | halt }
      if ($2 >= 100001) { msg $chan Sorry number is to big | halt }
      if (!$2) { msg $chan Usage: !countdown (second) | halt }
      set -z %count $2 | msg $chan It will now count down from $2, to view it type !viewcount | set %count2 $2 | set %count3 $nick 
    }
    if (!%count) {
      if ($1 == $gettok(%w,1,44)) {
        if ($v1 = 1) { msg $chan Countdown is now over from %count2 | unset %count2 | unset %count3 | halt }
        msg $chan %count | var %t $calc(%count2 - %count) | var %t2 $duration(%t) | msg $chan I have been running for %t2 
      }
      if ($1 == $gettok(%w,1,44)) {
        msg $chan The count was set to %count2 and $calc(%count2 - %count) seconds has gone by so far, the count was started by %count3 | var %t $calc(%count2 - %count) | var %t2 $duration(%t) | msg $chan Count can be stopped by %count3 with !stopcount, i have been running for %t2 
      }
      if ($1 == $gettok(%w,1,44)) {
        if ($nick !== %count3) { msg $chan You didn't start the count  | halt }
        msg $chan Count stopped by $nick it was set to %count2 and $calc(%count2 - %count) seconds had passed | unset %count %count2 %count3 %countpause
      }
      if ($1 == $gettok(%w,1,44)) {
        if ($nick !== %count3) { msg $chan You didn't start the count | halt }
        set %countpause %count | msg $chan Count is now paused, to start is again tpye !countrestart | unset %count
      }
      if ($1 == $gettok(%w,1,44)) {
        if (%countpause) {
          if ($nick !== %count3) { msg $chan You didn't pause or start the count | halt }
          msg $chan Count started after stop | set -z %count %countpause
          halt
        }
        msg $chan The count was never paused
      }
    }
    msg $chan No countdown started 
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.