All pastes #369653 Raw Edit

Untitled

public text v1 · immutable
#369653 ·published 2007-02-23 23:36 UTC
rendered paste body
on *:TEXT:!setcw*:#:{
  if ($nick($chan,$nick,ho)) {
    if (!$3) .notice $nick 05Syntax Error: 06You didn't specify a $iif(!$2,4world 06or) 04team06.
    elseif (!$is.mem($2)) .notice $nick 06The world you have specified is not a members world, please try again.
    elseif (!$god($3)) .notice $nick 06The team you have specified is not a real team.
    else {
      set %cw.world $2
      set %cw.team $god($3)
      set %cw.nick $nick
      msg $chan 06The 04Castle Wars06 has been updated by04 $nick $+ 04. 05Type !cw to view it.
    }
  }
}
on $*:TEXT:/^[!@]cw$/Si:#:{
  if (@* iswm $1) && (!$nick($chan,$nick,ho)) .notice $nick 06You must be an 04@Op 06or a 07%Halfop 06to use the "04@06" commands.
  else $iif(@* iswm $1,msg $chan,.notice $nick) 06The 04Castle Wars 06team is 05¤04 %cwteam 05¤06 $+ , set by04 %cwnick $+ 06.
}
alias -l is.mem { return $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,$1,124) }
alias -l god {
  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
}