All pastes #635425 Raw Edit

Anonymous

public text v1 · immutable
#635425 ·published 2007-07-27 01:46 UTC
rendered paste body
on *:TEXT:!8Ball*:#: {
  if ($2 == del) {
    if ($nick !isop $chan) { notice $nick Sorry you must be an op to use this command. | return }
    remini 8ball.ini $chan responce. $+ $3 
  }
  if ($2 == last) {
    if (!$readini(8ball.ini,$chan,lastquestion)) { notice $nick The !8ball command has not been used yet. | return }
    msg $chan The last question said was $readini(8ball.ini,$chan,lastquestion)
    msg $chan The last responce was responce number $readini(8ball.ini,$chan,lresponce)
    return  
  }
  if ($2 == on) && ($nick isop $chan) { set %8ball on | msg $chan 8Ball is now on. | return }
  if ($2 == off) && ($nick isop $chan) { set %8ball off | msg $chan 8Ball is now off. | return }  
  if (%8ball == off) { notice $nick 8ball is currently turned off. | return }
  if ($2 == add) {
    if ($nick !isop $chan) { notice $nick Sorry, you must be an op to use this command. | return }
    writeini 8ball.ini $chan $iif(!$readini(8ball.ini,$chan,responcenum),1,$calc($readini(8ball.ini,$chan,responenum) + 1))    
    writeini 8ball.ini $chan Responce. $+ $readini(8ball.ini,$chan,responcenum) $3-    
    notice $nick Responce added.  
    return 
  }    
  else {
    if (!$readini(8ball.ini,$chan,responcenum)) { msg $chan No responses at this time. | return }
    writeini 8ball.ini $chan Lastquestion $2-   
    msg $chan $nick $+ 's shakin up the 8ball..
    var %8ballr $iif($readini(8ball.ini,$chan,responcenum) == 1,1,$r(1,$readini(8ball.ini,$chan,responcenum)))
    .timer 1 1 msg $chan 8Ball: $readini(8ball.ini,$chan,responce. $+ %8ballr)
    writeini 8ball.ini $chan lresponce %8ballr
  }
}