All pastes #282877 Raw Edit

Anonymous

public text v1 · immutable
#282877 ·published 2006-12-17 22:43 UTC
rendered paste body
on *:TEXT:!setpcw*:#:{
  if (%pcwonoff. [ $+ [ $chan ] ] == on) {
    if ($chan != #rscw) && ($nick !isreg $chan) {
      if ($($+(%,pcw.set.ignore.,$nick),2)) {
        .notice $nick $c1(You can only use this command once every) $c2(30) $c1(seconds. Please wait) $c3($ifmatch) $c1(more $iif($ifmatch == 1,second.,seconds.))
        halt
      }
      if (!$2) {
        .notice $nick $c1(*** Syntax error:) $c2(!setcw world )
        halt
      }
      if (!$istok(2|6|9|12|18|22|23|24|26|27|28|31|36|41|42|44|46|48|53|54|56|58|59|60|64|65|66|69|70|71|76|77|78|79|82|83|84|88|89|91|92|97|98|99|100|103|104|110|111|112|114|115|116|120|121|123|124|126|129|130|131|132|137|138|124,$2,124)) {
        .notice $nick $c1(The world you have specified is not a P2P world.)
        halt
      }

      else {
        writeini pcw.ini $chan World $2
        writeini pcw.ini $chan Setter $nick
        msg $chan $c1(PestControl World updated by) $br1($nick) $+  $+ $c2(!) $c2(Type !pcw to view the new world.)
        set -z $+(%,pcw.set.ignore.,$nick) 30
      }
    }
  }
}
on $*:TEXT:/^[!@>~]pcw|world? */Si:#:{
  if (%pcwonoff. [ $+ [ $chan ] ] == on) {
    if ($chan != #rscw) {
      if (!* !iswm $1) && ($nick isreg $chan) halt
      if ($($+(%,pcw.get.ignore.,$nick),2)) {
        .notice $nick $c1(You can only use this command once every) $c2(30) $c1(seconds. Please wait) $c3($ifmatch) $c1(more $iif($ifmatch == 1,second.,seconds.))
        halt
      }
      if (!$readini(pcw.ini, $chan, World)) {
        $iif(!* iswm $1,.notice $nick,msg $chan) $c1(There is not currently a PestControl World set for) $br1($chan) $+ $c1(.)
        halt
      }
      else {
        $iif(!* iswm $1,.notice $nick,msg $chan) $c1(The PestControl World for) $br1($chan) $c2(is currently:) $br2($readini(pcw.ini, $chan, World))  $+ $c3(.) $c1(Set by:) $br2($readini(pcw.ini, $chan, Setter)) $+ $c1(.)
        set -z $+(%,pcw.get.ignore.,$nick) 30
      }
    }
  }
}
alias -l godname {
  if ($regex($1,/^S(ara(domin)?)?$/Si)) return Saradomin
  elseif ($regex($1,/^G(uth(ix)?)?$/Si)) return Guthix
  elseif ($regex($1,/^Z(am(my|orak)?)?$/Si)) return Zamorak
}

alias -l br1 { return 02[13 $1- 02] }
alias -l br2 { return 02[07 $1- 02] }
alias -l c1 { return $+(06,$1-,) }
alias -l c2 { return $+(10,$1-,) }
alias -l c3 { return $+(05,$1-,) }