RuneScape Players Script

By Trev on Jul 04, 2009

A simple script that returns the amount of people playing on RuneScape.

(11:22:40 PM) (@Trev) !rsplayers
(11:22:41 PM) —› (Notice:) -W|R|I|S|T- (RuneScape Players™) There are: 99,114 people playing RuneScape. That's an average of: 580 per world.

Alias c1 return $+($chr(3),01,$1-)
Alias c2 return $+($chr(3),02,$1-)
Alias logo return $+($c1($chr(40)),$c2($1-),$c1($chr(153)),$c1($chr(41)))
On $*:Text:/^[!.@]RSPlayers/Si:*: {
  set %players.style $iif($mid($1,1,1) == $chr(64),msg #,.notice $nick)
  sockopen Players. www.runescape.com 80
}
On *:SockOpen:Players.: {
  sockwrite -n $sockname GET /title.ws HTTP/1.1
  sockwrite -n $sockname Host: www.runescape.com
  sockwrite -n $sockname $crlf
}
On *:SockRead:Players.: {
  if ($sockerr) { halt }
  Else {
    var %players
    sockread %players
    if (*<div id="player_no">There are currently * people playing!</div>* iswm %players) {
      tokenize 32 %players
      set %players.numb $cc2(There are:) $cc1($bytes($5,bd)) $cc2(people playing RuneScape. That's an average of:) $cc1($round($calc($+($5,/,171)),0)) $cc2(per world.)
      %players.style $lg(RuneScape Players) %players.numb
      unset %players.*
      sockclose $sockname
    }
  }
}

Comments

Sign in to comment.
Aucun50   -  Jul 05, 2009

Looks good although you could have added this with your other runescape script, other then that good job.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.