All pastes #275161 Raw Edit

:D

public text v1 · immutable
·published 2006-12-11 08:30 UTC
rendered paste body
pcw kill switch


on *:TEXT:~world on:#: {
  if ($nick isop  $chan) || ($nick ishop $chan) {
    set %rank on
    amsg 12 $+ $nick has turned on !world and !pcw
  }
}
on *:TEXT:~world off:#: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    set %rank off
    amsg 12 $+ $nick has turned off !world and !pcw
  }
}

rehash


on *:TEXT:!rehash *:#static_pc: { 
  if ($nick isop $chan || $nick ishop $chan) || ($address($me,2) == $address($nick,2)) {
    msg #static_pc 4My commands will be unavailable for the next $$2 seconds.
    remote off 
    flood clear
    timer 1 $$2 remote on
    timer 1 $$2 lag.start
    timer 1 $$2 msg #static_pc 3My commands have been reloaded and will now work.
  }
}


!reg

on *:TEXT:!reg *:#:{
  if ($address($me,2) == $address($nick,2)) {
    msg $$2- Please register your nick or your auto voice will not work if you dont know how to do this click the "R" button and follow the prompts notify $nick when it is done
  }
}
 opthanks

on *:OP:#:{ if ($opnick == $me) msg $chan thanks for the op $nick }
on *:voice:#:{ if ($vnick == $me) msg $chan wow thanks for the voice!! }
on *:help:#:{ if ($hnick == $me) msg $chan wow thanks for the halfop $nick }


!rs!ck

on *:TEXT:!rs *:#:{
  if ($nick isop $chan || $nick ishop $chan) || ($address($me,2) == $address($nick,2)) {
    kick $chan $2- 
    msg $2- 4Please use your rsn Thank you
  }
}
on *:TEXT:!ck *:#:{
  if ($nick isop $chan || $nick ishop $chan) || ($address($me,2) == $address($nick,2)) {
    kick $chan $2- Dont complain about the worlds
    msg $2- 4Dont complain about the worlds!!!
  }
}


reset


on *:TEXT:!disconect:#:{
  if ($address($me,2) == $address($nick,2)) || ($nick isop  $chan)|| ($nick ishop $chna) {
    quit disconected by user $nick
  server $server }
}

invite

on *:INVITE:#:{ join $chan }


!pw 

on *:TEXT:!pw:#:{
  if ($nick isop $chan) || ($nick ishop $chan) { 
    msg $chan 7 If you have a better PestControl world /msg 4 $nick 7 Please, Thank you
  }
}

!tb

on *:TEXT:!tb *:#:{
  if (($nick isop $chan) || ($nick ishop $chan)) {
    if ($3) ban -ku $+ $calc($v1 * 60) $chan $2 2 $iif($4-,$v1,$me) ( $+ $3 minutes $+ )
    else notice $nick you need to specify how long u want the person to be banned for
  }
}

!global 

on *:TEXT:!global *:#: {
  if ($nick isop $chan || $nick ishop $chan) {
    amsg 4[Global by $nick $+ 4] 12 $+ $$2- 
  }
}


points till lev

alias -l getskill { 
  if ($regex($1,/^at(t|k|tack)?/Si)) return attack 
  elseif ($regex($1,/^def(en[cs]e)?/Si)) return defence 
  elseif ($regex($1,/^hp|hit(s|points?)?/Si)) return hitpoints 
  elseif ($regex($1,/^range(r|d|ing)?/Si)) return ranged 
  elseif ($regex($1,/^Pray(er)?/Si)) return prayer 
  elseif ($regex($1,/^mag(e|ic)?/Si)) return magic 
  elseif ($regex($1,/^str(ength)?/Si)) return strength 
}
on *:TEXT:!defname *:#:{
  writeini DefRSN.ini RSNs $nick $replace($2-,$chr(32),_)
  msg $chan your default rsn has been saved.
}
on *:text:!pest*:#:{
  if ($getskill($$2)) {
    set $+(%,pest.,$nick,.,send) $iif($left($1,1) == @,msg $chan,$iif($left($1,1) == !,.notice $nick,halt))
    set $+(%,pest.,$nick,.,skill) $getskill($$2)
    if (!$3) {
      if ($readini(DefRSN.ini,RSNs,$nick)) set $+(%,pest.,$nick,.,usname) $ifmatch
      elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) set $+(%,stats.rsn.,%ID) $ifmatch
    }
    else set $+(%,pest.,$nick,.,usname) $replace($lower($3-),$chr(32),+)
    sockopen $+(pest,.,$nick) www.o-ss.net 80
  }
}
on *:sockopen:pest.*:{
  sockwrite -nt $sockname GET /parsers/stats.php?user= $+ $($+(%,$sockname,.,usname),2)  HTTP/1.1
  sockwrite -nt $sockname Host: www.o-ss.net $+ $crlf $+ $crlf
}
on *:sockread:pest.*:{
  set $+(%,$sockname,.,read) | sockread -f $+(%,$sockname,.,read)
  if (*does not feature in the hiscores* iswm $($+(%,$sockname,.,read),2)) {
    $($+(%,$sockname,.,send),2) $($+(%,$sockname,.,usname),2) doesn't appear in highscores for any skill $+ .
    sockclose $sockname
  }
  tokenize 32 $($+(%,$sockname,.,read),2)
  if ($1 == $($+(%,$sockname,.,skill),2)) {
    if (Not Ranked == $2-3) {
      $($+(%,$sockname,.,send),2) $($+(%,$sockname,.,usname),2) doesn't appear in highscores for $($+(%,$sockname,.,skill),2) $+ .
      sockclose $sockname
    }
    set $+(%,$sockname,.,lvl) $3
    set $+(%,$sockname,.,exp) $4
  }
  if ($($+(%,$sockname,.,exp),2)) {
    if ($($+(%,$sockname,.,skill),2) == prayer) {
      set $+(%,$sockname,.,p2l) $calc(($exp($calc($($+(%,$sockname,.,lvl),2) +1)) - $remove($($+(%,$sockname,.,exp),2),$chr(44))) / ($($+(%,$sockname,.,lvl),2) * $($+(%,$sockname,.,lvl),2) / 12))     
      $($+(%,$sockname,.,send),2) You will need $iif(*.* iswm $($+(%,$sockname,.,p2l),2),$calc($gettok($($+(%,$sockname,.,p2l),2),1,$asc(.)) + 1),$($+(%,$sockname,.,p2l),2)) pest points for lvl up in Prayer.
      unset %pest.*
      sockclose $sockname
    }
    else {
      set $+(%,$sockname,.,p2l) $calc(($exp($calc($($+(%,$sockname,.,lvl),2) +1)) - $remove($($+(%,$sockname,.,exp),2),$chr(44))) / ($($+(%,$sockname,.,lvl),2) * $($+(%,$sockname,.,lvl),2) / 6))
      $($+(%,$sockname,.,send),2) You will need $iif(*.* iswm $($+(%,$sockname,.,p2l),2),$calc($gettok($($+(%,$sockname,.,p2l),2),1,$asc(.)) + 1),$($+(%,$sockname,.,p2l),2)) pest points for lvl up in $($+(%,$sockname,.,skill),2) $+ .
      unset %pest.*
      sockclose $sockname
    }
  }
}
alias exp { 
  var %a = 1 
  .set %exp123 0 
  var %a1 = $eval($1) 
  while (%a < %a1) { 
    var %expvalue = $calc((%a + 300 * 2^(%a / 7)) /4) 
    inc %exp123 %expvalue 
    inc %a 
  } 
  return $floor(%exp123) 
}