All pastes #157531 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-09-01 16:54 UTC
rendered paste body
on *:SOCKREAD:pckick*:{
  if ($sockerr) {
    echo -a Socket error
    } else {
    var %read
    while (1) {
      sockread -f %read
      if (!$sockbr) { break }
      if (Attack:* iswm %read) {
        var %attack = $remove($gettok(%read,2,58),<br />)
      }
      if (Strength:* iswm %read) {
        var %strength = $remove($gettok(%read,2,58),<br />)
      }
      if (Combat:* iswm %read) {
        var %combat = $remove($gettok(%read,2,58),<br />)
      }   
    }
    if (($floor(%combat) < 70) || ($calc(%attack + %strength) < 120) || (*-* iswm %strength)) {
      ban -ku30 $gettok(%pcstuff [ $+ [ $right($sockname,-6) ] ] ,2,58) $gettok(%pcstuff [ $+ [ $right($sockname,-6) ] ],1,58) 2 You do not meet requirements for this channel. (70 combat or a Attack+Strength of 120 or more) [30 second ban]
    }
    else {
      msg $gettok(%pcstuff [ $+ [ $right($sockname,-6) ] ],2,58) $gettok(%pcstuff [ $+ [ $right($sockname,-6) ] ],1,58) is lvl $floor(%combat) and has %attack attack and %strength strength.
    }
  }
}