rendered paste bodyon $*:TEXT:/^[!@.]s(et)?c(astle)?w(ars?)?/Si:#dabomb:{
if ($nick isop $chan || $nick ishop $chan) {
if (%stopcw [ $+ [ $chan ] ]) { notice $nick CW commands are turned off | halt }
if ($team($3) && $rsworld($2)) {
set %cw [ $+ [ $chan ] ] $2
set %team [ $+ [ $chan ] ] $team($3)
unset %cwars [ $+ [ $chan ] ]
msg $chan The Castle Wars World has been Updated! Type !cw or !castlewars to see the new world! You may use @ also.
}
else { notice $nick You need to supply a world and a team name }
}
}
on $*:TEXT:/^[!@.]c(astle)?w(ars?)?/Si:#dabomb:{
if ($nick !isreg $chan && %cw [ $+ [ $chan ] ]) {
if (%stopcw [ $+ [ $chan ] ]) { notice $nick CW commands are turned off | halt }
inc %cwars [ $+ [ $chan ] ]
$iif($left($1,1) == @,msg $chan,notice $nick) The Current Castlewars World is: %cw [ $+ [ $chan ] ] $+ . Current Team is: %team [ $+ [ $chan ] ] $+ . The Castle Wars world has been viewed: %cwars [ $+ [ $chan ] ] Times.
}
}
on $*:TEXT:/^[!@.]suggestc(astle)?w(ars?)?/Si:#dabomb:{
if (%stopcw [ $+ [ $chan ] ]) { notice $nick CW commands are turned off | halt }
if ($rsworld($2) && $team($3)) {
set %cwscouter [ $+ [ $chan ] ] $nick
set %thecwsuggested [ $+ [ $chan ] ] $2
set %cwteam [ $+ [ $chan ] ] $team($3)
msg $chan $nick has suggested the world: $2 on team $team(3) $+ . Reason : $iif($3,$3-,No Reason Given) $+ . Would an op or half-op please check it.
}
}
alias team {
if ($regex($1,/^s(ara(domin)?)?/i)) { return Saradomin }
elseif ($regex($1,/^z(am(my|orak))?/i)) { return Zamorak }
elseif ($regex($1,/^g(uthix)?/i)) { return Guthix }
}
alias rsworld { return $istok(2 6 9 12 18 22 23 24 26 27 28 31 36 39 42 44 45 46 48 53 54 56 58 59 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 124 129 130 131 132 137 138 143 144,$1,32) }