All pastes #448969 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-19 23:35 UTC
rendered paste body
on 1:load: {
  set %sl.qc1 $?="Please enter a color to use for the foreground"
  set %sl.qc2 $?="Please enter a color to use for the background"
  echo -a $sl.qc1 $+  %sl.qc2  $+ You're bot's text will be this colour
  echo -a $sl.qc1 $+  %sl.qc2  $+ The following options is available
  echo -a $sl.qc1 $+  %sl.qc2  $+ -addquote and the quote (This will add a quote to the bot)
  echo -a $sl.qc1 $+  %sl.qc2  $+ -delquote and the quote number (This will delete quote number that u enter)
  echo -a $sl.qc1 $+  %sl.qc2  $+ -quote (This will Random between allquotes and tell u what quote nr. it is)
  echo -a $sl.qc1 $+  %sl.qc2  $+ -quote and the number (This will look up the quote of which number u have chosen)
  echo -a $sl.qc1 $+  %sl.qc2 $+ -qlines (This will give u the amount of quotes which have been added)
  echo -a $sl.qc1 $+  %sl.qc2  $+ -qhelp (This will bring you to this menu)
}
on 1:unload: {
  unset %sl.qc1 %sl.qc2
}
on 1:text:*:#: {
  if ($1 == -addquote) {
    if ($2 == $null) { 13Notice $nick Sorry you need to set a quote and u left it empty }
    if ($2 != $null) {
      write quote.txt $2- Added by - $nick At this time $time(dd/mm/yyyy - hh:nn:ss)
      set %sl.ql $lines(quote.txt)
      msg $chan 13Added quote at position $chr(35) $+ %sl.ql
      unset %sl.ql
    }
  }
  if ($1 == -delquote) {
    if ($2 == $null) { msg $chan 13Sorry $nick u need to add a number between 1 and $lines(quote.txt) }
    if ($2 != $null) {
      set %sl.qd $read(quote.txt, $2)
      if (%sl.qd == $null) { msg $chan 13Sorry $nick but quote $chr(35) $+ $2 does not exist }
      if (%sl.qd != $null) {
        write -dl $+ $2 quote.txt
        msg $chan $sl.qc1 $+  $+ $sl.qc2 $+ Quote $chr(35) $+ $2 Have been removed
      }
      unset %sl.qd
    }
  }
  if ($1 == -quote) {
    if ($2 == $null) { 
      set %sl.qr $rand(1,$lines(quote.txt))
      set %sl.qra 13$read(quote.txt, %sl.qr)
      if (%sl.qra != $null) { msg $chan  13Random quote 3$chr(35) $+ %sl.qr 10 $+ %sl.qra }
      if (%sl.qra == $null) { msg $chan  13Sorry there does not appear to be anny quotes available }
      unset %sl.qr
      unset %sl.qra
    }
    if ($2 != $null) { 
      set %sl.qo $read(quote.txt, $2)
      set %sl.qol $lines(quote.txt)
      if (%sl.qo == $null) { msg $chan   Quote $chr(35) $+ $2 13 Does not exist U can select 1 to %sl.qol }
      if (%sl.qo != $null) { msg $chan   Quote $chr(35) $+ $2 - %sl.qo }
      unset %sl.qo
      unset %sl.qol
    }
  }
  if ($1 == -qlines) {
    set %sl.qt $lines(quote.txt)
    if (%sl.qt != $null) { msg $chan 13There is this amount of quotes << $+ %sl.qt $+ >> }
    if (%sl.qt == $null) { msg $chan 13There does not appear to be anny quotes added yet $nick }
    unset %sl.qt
  }
  if ($1 == -qhelp) {
    msg $chan  The following options is available
    msg $chan 13!addquote and the quote (This will add a quote to the bot)
    msg $chan 13!delquote and the quote number (This will delete quote number that u enter)
    msg $chan 13!quote (This will Random between allquotes and tell u what quote nr. it is)
    msg $chan 13 !quote and the number (This will look up the quote of which number u have chosen)
    msg $chan 13!qlines (This will give u the amount of quotes which have been added)
    msg $chan 13!qhelp (This will bring you to this menu)
  }
  else { halt }
}