napa182 commented on a Page, Movie setnow and setnext  -  May 16, 2012

um a small/fast edit to include a timer an i took out that you can't do that message as it is annoying, an i made it say if nothing is set for !now or !next it will now say Nothing set.
As for the timer you will have to put in the amount of seconds for it to change example !swap 30 for 30 seconds an !swap 3600 for an hour

on $*:TEXT:/^!(setn(ow|ext)|swap)\s(.+)$|^!(now|next)$/iS:#:{ 
  if ($nick = $remove(#,$chr(35))) { 
    if ($regml(1) = swap && $regml(2) isnum) { 
      .timermovie1 1 $regml(2) set $+(%,now.,#) $($+(%,next.,#),2) 
      .timermovie2 1 $calc($regml(2) + 1) unset $+(%,next.,#)
      msg # movie in next will swap to now in $regml(2) seconds
    }
    if ($regml(3)) {
      set $+(%,$iif($regml(1) = setnow,now,next),.,#) $regml(3) 
      msg # $iif($regml(1) = setnow,now,next) playing set to: $regml(3) 
    }
  }
  if ($istok(now|next,$regml(1),124) && !%f) { inc -u5 %f
    msg # $iif($($+(%,$regml(1),.,#),2),$v1,Nothing set)
  } 
}
 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.