Halo Reach Player Stats

By napa182 on Oct 07, 2010

just a quick Halo Reach Career Stats lookup Socket

copy/paste into a new remote of ur bot.
Trigger is @halor playername
Ex:

<~napa182> @halor Chief 0Reilly
<&Sick0> :[Halo Reach Stats For]: Chief 0Reilly
<&Sick0> :[Rank]: Warrant Officer Next: Warrant Officer Grade 1 (30643 of 33000) :[Games Played]: 84 :[Playtime]: 0d 12h 46m :[Kills]: 706 :[Deaths]: 816 :[Assists]: 122 :[Kill/Death]: 0.87 :[Kills/Game]: 8.40 :[Deaths/Game]: 9.71 :[Kills/Hour]: 55.30 :[Deaths/Hour]: 63.91 :[Medals]: 857 :[Medals/Game]: 10.20 :[Medals/Hour]: 67.12
<&Sick0> :[Player Stats Link]: www.bungie.net/stats/reach/careerstats/default.aspx?player=Chief%200Reilly&vc=3

<~napa182> @halor doop
<&Sick0> :[Halo Reach Stats For]: doop
<&Sick0> Sorry Player Not Found

<~napa182> @halor chiefMENDOZA666
<&Sick0> :[Halo Reach Stats For]: chiefMENDOZA666
<&Sick0> :[Rank]: Corporal Grade 1 Next: Sergeant (3193 of 5000) :[Games Played]: 20 :[Playtime]: 0d 3h 8m :[Kills]: 257 :[Deaths]: 259 :[Assists]: 32 :[Kill/Death]: 0.99 :[Kills/Game]: 12.85 :[Deaths/Game]: 12.95 :[Kills/Hour]: 81.96 :[Deaths/Hour]: 82.60 :[Medals]: 324 :[Medals/Game]: 16.20 :[Medals/Hour]: 103.33
<&Sick0> :[Player Stats Link]: www.bungie.net/stats/reach/careerstats/default.aspx?player=chiefMENDOZA666&vc=3

Like always rip strip butcher this snippet how ever you want idc

on $*:text:/^@halor\s(.+)/iS:#:{
  if (!$($+(%,halo,$wildsite),2)) { inc -u5 $+(%,halo,$wildsite)
    if ($sock($+(halor,#))) sockclose $+(halor,#)
    sockopen $+(halor,#) www.bungie.net 80
    sockmark $+(halor,#) $+(/stats/reach/careerstats/default.aspx?player=,$&
      $replace($regml(1),$chr(32),$+(%,20)),&vc=3) msg #
    msg # 09:[04Halo Reach Stats For09]: $regml(1)
  }
}
on *:load: {
  echo 04 -a You Have Just Loaded Napa182's Halo Reach Career Stats Lookup Socket 
  echo 07 -a An irc.EzzyChat.com Production 
}
on *:sockopen:halor*: {
  sockwrite -n $sockname GET $gettok($sock($sockname).mark,1,32) HTTP/1.1
  sockwrite -n $sockname Host: $+($sock($sockname).addr,$str($crlf,2))
}
on *:sockread:halor*: {
  var %halor | sockread %halor
  if ($regex(%halor,/<h1.+>(Not Found)<\/.+>/)) { 
    hinc -mu4 $sockname c 1
    $gettok($sock($sockname).mark,2-,32) Sorry Player $regml(1)
    sockclose $sockname
  }
  if ($regex(%halor,/<span.+>(.+)<\/span.+>(Next:.+)&nbsp;&nbsp;(.+)<\/span>/)) {
    hadd -mu4 $sockname 1 09:[04Rank09]: $regml(1) $regml(2) $regml(3)
  }
  if ($regex(%halor,/<li class=.+>(\d+)<\/li>/)) { hadd -mu4 $sockname 2 09:[04Games Played09]: $regml(1) }
  if ($regex(%halor,/<strong>(.+)<\/.+>(.+)<\/span><\/li>/)) {
    hinc -mu4 $sockname c 1
    if ($hget($sockname,c) isnum 1-12) { hadd -mu4 $sockname $calc($hget($sockname,c) +2) $+(09:[04,$regml(1),09]:) $regml(2) }
    if ($hget($sockname,c) = 12) {
      $gettok($sock($sockname).mark,2-,32) $regsubex($str(.,$hget($sockname,0).item),/(.)/g,$hget($sockname,\n) $chr(32))
      $gettok($sock($sockname).mark,2-,32) 09:[04Player Stats Link09]: $+(www.bungie.net,$gettok($sock($sockname).mark,1,32))
      sockclose $sockname
    }
  }
}

Comments

Sign in to comment.
d8e93jf9vwp   -  Oct 17, 2010

slub77. DIE lol jk

 Respond  
slub77   -  Oct 11, 2010

It's good n all, too bad it's for a bad game :P

 Respond  
napa182   -  Oct 09, 2010

Thank you Failed ReHab...

 Respond  
Failed ReHab   -  Oct 09, 2010

i likes :)

 Respond  
napa182   -  Oct 08, 2010

Ah I see what you are talking about Burrito.. Edited so it supports multi sockets.

 Respond  
Burrito   -  Oct 08, 2010

What I meant was that many people might want to use it making multisockets good and adding a flood protect against a nickname. But it works

 Respond  
napa182   -  Oct 08, 2010

Burrito if you read in the text event there is a flood pro in it so it can only be triggered once every 4 seconds.

the check

if (!$hget(halor,c)) {

if that hash is there the socket wont be triggered

if you have a problem with people flooding you or ur bot and 4 seconds is not long enough then you can make it longer by changing the unset timer on the hash.

 Respond  
Burrito   -  Oct 08, 2010

Napa182 if it is for a bot many people could trigger it at once. If it is for personal use I guess there is no need.

 Respond  
Aucun50   -  Oct 08, 2010

Maybe I'll get this if it comes out for pc.. I can only dream tho :(

Nice snippet napa btw.

 Respond  
napa182   -  Oct 08, 2010

@joelp53 Thank you im glad you like it.

Burrito Wrote>
good but could support multiple sockets

@Burrito why would I want to open multiple sockets for? I just don't see any reason too do so.

 Respond  
Burrito   -  Oct 08, 2010

good but could support multiple sockets

 Respond  
joelp53   -  Oct 08, 2010

Not bad mate, I made a simular script to this however it doesn't show as much info as yours, Il deffo be stealing some of your code lol :D

JK, But still rather nice and handy for when you just need to show of how awsome you are lol :P

Rated 7 as usefull :-)

 Respond  
napa182   -  Oct 08, 2010

fixed a few things ;x

 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.