Xbox Live Gamer-Tag Look-Up Socket

By napa182 on Apr 18, 2012

This looks-up gamer-tags/gamerscores for Xbox Live. Seeing what the persons online status an gamer score.
Copy/paste into a new remote of your bot trigger is @xbox

[b]Have fun with it, and like always go ahead an rip, trash, or set fire to this snippet any way you see fit.
I don't care.[/b]

Example:

<~napa182> @xbox ur a moron
<~Sick0> Ooops! I don't know who "ur a moron" is. Looks like you may have misspelled the Gamer-tag you are looking for.

<~napa182> @xbox Rustyshack760sr
<~Sick0> Rustyshack760sr, Last seen 5 hours ago playing Call of Duty Black Ops - Gamerscore 60

<~napa182> @xbox rising son 13
<~Sick0> rising son 13, Last seen 8 hours ago playing Call of Duty Black Ops - Gamerscore 5775

<~napa182> @xbox rising son 13
<~Sick0> rising son 13, Online playing Modern Warfare® 2 - Playing Team Deathmatch in Terminal - Gamerscore 5775

<~napa182> @xbox StealthyPeer
<~Sick0> StealthyPeer, Last seen 13 hours ago playing Xbox Dashboard - Gamerscore 61515

on $*:text:/^@xbox\s(.+)/iS:# {
  if (!%f) { inc -u3 %f
    if ($sock(xbox)) sockclose xbox
    sockopen xbox live.xbox.com 80
    sockmark xbox $+(/en-US/Profile?gamertag=,$replace($regml(1),$chr(32),$+($chr(37),20))) $&
      msg # $+(04,$regml(1),)
  }
}
on *:sockopen:xbox: {
  sockwrite -nt xbox GET $gettok($sock(xbox).mark,1,32) HTTP/1.1
  sockwrite -nt xbox Host: $+($sock(xbox).addr,$str($crlf,2))
}
on *:load: {
  echo 12 -a You Have Just Loaded Napa182's Xbox Live Look-up Socket
  echo 07 -a A irc.EzzyChat.com Production
}
on *:sockread:xbox: {
  var %xbox | sockread %xbox
  if ($regex(%xbox,/<h1.+CustomErrorTitle.+>(Ooops!).+<\/h1>/)) {
    $gettok($sock(xbox).mark,2-3,32) $regml(1) I don't know who $+(",$gettok($sock(xbox).mark,4-,32),") is. $&
      Looks like you may have misspelled the Gamer-tag you are looking for.
    sockclose xbox
  }
  if ($regex(%xbox,/<div.+presence.+>(.+)<\/div>/)) { 
    hadd -m xbox 1 $regsubex($regml(1),/&#(\d+);/g,$chr(\1))
  }
  if ($regex(%xbox,/<div.+gamerscore.+>(\d+)<\/div>/)) {
    $+($gettok($sock(xbox).mark,2-,32),$chr(44)) $hget(xbox,1) - 04Gamerscore $regml(1)
    sockclose xbox
  }
}

Comments

Sign in to comment.
napa182   -  Nov 06, 2012

The last xbox live update had screwed a lot of things up besides the dashboard. seems it screwed the site to look-up as well so here is a fast fix using a different site.

copy/paste into a new remote of your bot. trigger is @xbox
Example:

@xbox markmywords ns <&Sick0> Last seen 4 hours ago playing Trials Evolution <&Sick0> Online Status: Offline || Xbox Membership: Gold || Zone: Recreation || Country: United States
@xbox rising son 13 <&Sick0> Last seen 10/31/2012 playing Modern Warfare® 3 <&Sick0> Online Status: Offline || Xbox Membership: Gold || Zone: Underground || Country: United States @xbox llxNYXxll <&Sick0> Last seen 15 hours ago playing Modern Warfare® 3 <&Sick0> Online Status: Offline || Xbox Membership: Gold || Zone: Recreation || Country: Australia @xbox StealthyPeer <&Sick0> Online Status: Offline || Xbox Membership: Silver/Free || Zone: Underground || Country: United Kingdom ``` on $*:text:/^@xbox\s(.+)/iS:#: { if (!%f) { inc -u3 %f if ($sock(xbox)) sockclose xbox sockopen xbox www.xboxgamertag.com 80 sockmark xbox $+(/search/,$replace($regml(1),$chr(32),$+($chr(45)))/) $& msg # } } on *:sockopen:xbox: { sockwrite -nt xbox GET $gettok($sock(xbox).mark,1,32) HTTP/1.1 sockwrite -nt xbox Host: $+($sock(xbox).addr,$str($crlf,2)) } on *:load: { echo 12 -a You Have Just Loaded Napa182's Xbox Live Look-up Socket echo 07 -a A irc.EzzyChat.com Production } on *:sockread:xbox: { var %xbox | sockread %xbox if ($regex(%xbox,/

(.+)<\/p>/)) { $gettok($sock(xbox).mark,2-,32) $regml(1) } if ($regex(%xbox,/

(Online Status:.+)<\/p>/)) { $gettok($sock(xbox).mark,2-,32) $regsubex($regml(1),/<[^>]*>/g,$chr(32)) } } ```

ovelayer  -  Feb 17, 2013

any chance on an update to include the gamerscore of the gamertag?

Sign in to comment

napa182   -  May 12, 2012

no problem hope it works well for ya...

 Respond  
RobNuts   -  Apr 28, 2012

Actually no, I didn't. That was my problem. Didn't pay attention to detail as it says paste into a remote of your "bot". I was trying to call the trigger from the same mirc instance. Works fine. My apologies.

 Respond  
napa182   -  Apr 28, 2012

RobNuts, you did load this onto u bot right? if not it wont work unless you change it to an on input event. an no one meant any sarcasm at all. just trying to figure out why it is not working for you.

Also xbox live's site sometimes seems like it is on crack, but the info it pulls is what the site has.

 Respond  
DjWiz4rd   -  Apr 28, 2012

Thank you i made a few changes and now im happy... all working well!! many thanks to the creater i have left 100% credit.... do NOT believe in rippin peoples hard work :)

 Respond  
KilllerX   -  Apr 28, 2012

are you doing it on your mIRC or from another person, connected to the IRC? cause if that is a yes, there might be your problem.

 Respond  
RobNuts   -  Apr 28, 2012

Lovely sarcasm. I haven't replied because all the emails went to spam. I'm using mirc version 7.22. I load the script and it says "You Have Just Loaded Napa182's Xbox Live Look-up Socket" but when I type @xbox namehere does nothing. No output at all. I tried some other things like a tvrage script and they worked so idk what's wrong. Is there anyway to see some kind of debug?

 Respond  
KilllerX   -  Apr 28, 2012

if they haven't been on it for a while, it returns with unavailable. I seen this problem myself. Then I was using mine and got on Xbox.com, logged in, and tried with mine, and it said that I was on the site. So it does work. If it is returning that, that is what it says on the live.xbox.com site.

 Respond  
DjWiz4rd   -  Apr 27, 2012

hi napa182... im using mIRC 6.35 on irc.buzzen.net... now i copied and pasted as stated...

im having a minor problem tho... @xbox [gamer] delivers... 04[gamer], Online Status Unavailable - 04Gamerscore 8735

so its picking up the gamertag, and the gamerscore but keeps displayin online status unavailable... any ideas...

just for the record i have tried it with multiple gamertags, (plus my own) just to be sure..

hope you can help, as i think this is awesome... many thanks... Ash :)

 Respond  
napa182   -  Apr 27, 2012

yeah I was thinking maybe he is using an older version of mirc, but who knows. I can't help them if they don't tell me whats wrong.

 Respond  
Sorasyn   -  Apr 27, 2012

Could be a conflict of versions.. That or he doesn't have the script installed correctly.

 Respond  
napa182   -  Apr 27, 2012

Hey napalm` long time no talk to. How have you been?

Also RobNuts can you give a reason it is not outputting anything for you?
As it works fine

<~napa182> @xbox rising son 13
<~Sick0> rising son 13, Last seen 4 minutes ago playing Xbox Dashboard - Gamerscore 6020

<~napa182> @xbox llxNYXxll
<~Sick0> llxNYXxll, Last seen 20 hours ago playing Call of Duty Black Ops - Gamerscore 140

<~napa182> @xbox Th3GrimRipp3r
<~Sick0> Th3GrimRipp3r, Last seen 2 hours ago playing Xbox Dashboard - Gamerscore 925

<~napa182> @xbox Rustyshack760sr
<~Sick0> Rustyshack760sr, Last seen 22 hours ago playing Call of Duty Black Ops - Gamerscore 155

<~napa182> @xbox mendojuggler 17
<~Sick0> mendojuggler 17, Online playing GTA IV - In a Party - Gamerscore 725

<~napa182> @xbox you are calling a moron
<~Sick0> Ooops! I don't know who "you are calling a moron" is. Looks like you may have misspelled the Gamer-tag you are looking for.

 Respond  
napalm`   -  Apr 26, 2012

Hi napa.

 Respond  
napa182   -  Apr 26, 2012

it works fine for me an the other 100+ other people I gave it to before i posted it. Can I ask what version of mirc you are running?

 Respond  
RobNuts   -  Apr 25, 2012

Doesn't work for me. Doesn't output anything.

 Respond  
Sorasyn   -  Apr 22, 2012

Come to think of it, PSN name check could be accomplished using a "viewport" to load the web page into a scroll-able window. A relatively simple addition from a coding perspective if I remember correctly.

 Respond  
blackvenomm666   -  Apr 21, 2012
on $*:text:/^@xbox\s(.+)/iS:# {
  if (!$2) && (!%f) {
    inc -u3 %f.xbox
    if ($sock(xbox)) sockclose xbox 
    sockopen xbox live.xbox.com 80
    .sockmark xbox $+(/en-US/Profile?gamertag=,$replace($readini(xboxgamer.ini, Tag ,$nick),$chr(32),$+($chr(37),20))) $&
      msg # $+(04,$regml(1),)
  }
  elseif ($2 == @erase) { remini xboxgamer.ini Tag $nick
    msg # $nick $+ , your gamer tag has been reset.  Please re-add your Gamertag if you wish with !xbox register [xboxtag]
  }

  elseif ($2 == register) {
    if (!$3) { msg # please put in your xbox username, if you change it. Please remember to reset it.
    }
    else {
      writeini xboxgamer.ini Tag $nick $3
      msg # $nick $+ , Your gamer tag of $$3- has been memorized.
    }
  }
  else { if (!%f) { inc -u3 %f
      if ($sock(xbox)) sockclose xbox
      sockopen xbox live.xbox.com 80
      sockmark xbox $+(/en-US/Profile?gamertag=,$replace($regml(1),$chr(32),$+($chr(37),20))) $&
        msg # $+(04,$regml(1),)
    }
  }
}

on *:sockopen:xbox: {
  sockwrite -nt xbox GET $gettok($sock(xbox).mark,1,32) HTTP/1.1
  sockwrite -nt xbox Host: $+($sock(xbox).addr,$str($crlf,2))
}
on *:load: {
  echo 12 -a You Have Just Loaded Napa182's Xbox Live Look-up Socket
  echo 07 -a A irc.EzzyChat.com Production
}
on *:sockread:xbox: {
  var %xbox | sockread %xbox
  if ($regex(%xbox,/<h1.+CustomErrorTitle.+>(Ooops!).+<\/h1>/)) {
    $gettok($sock(xbox).mark,2-3,32) $regml(1) I don't know who $+(",$gettok($sock(xbox).mark,4-,32),") is. $&
      Looks like you may have misspelled the Gamer-tag you are looking for.
    sockclose xbox
  }
  if ($regex(%xbox,/<div.+presence.+>(.+)<\/div>/)) { 
    hadd -m xbox 1 $regsubex($regml(1),/&#(\d+);/g,$chr(\1))
  }
  if ($regex(%xbox,/<div.+gamerscore.+>(\d+)<\/div>/)) {
    $+($gettok($sock(xbox).mark,2-,32),$chr(44)) $hget(xbox,1) - 04Gamerscore $regml(1)
    sockclose xbox
  }
}

now because of the regex within the on text event only the @xbox taghere will do a lookup. but if you change the regex on it you should be able to get it to work. i suck at regex so i'm not touching that one
if you changed

on $*:text:/^@xbox\s(.+)/iS:# {

to

on $*:text:/^@xbox/iS:# {

the added part that you want to add will work but napa's original @xbox taghere won't work. but as i said i'm no good with regex. so have fun with it

 Respond  
blackvenomm666   -  Apr 20, 2012

killer x. i would use an ini at least if not even a hash table for what you are trying to do.

 Respond  
napa182   -  Apr 20, 2012

lol.. it is not that hard to make, but like i said before Good Luck..

 Respond  
KilllerX   -  Apr 20, 2012

Ok, something broke on it. for my end. It's not capturing, the game anymore.

 Respond  
KilllerX   -  Apr 18, 2012

I tried adding

on $*:text:/^@xbox\s(.+)/iS:# {
  if (!%f.xbox) {
    if (!$2) { inc -u3 %f.xbox
      if ($sock(xbox)) sockclose xbox
      sockopen xbox live.xbox.com 80
      sockmark xbox $+(/en-US/Profile?gamertag=,$replace($read(xboxtag.txt,ns,$nick),$chr(32),$+($chr(37),20))) $&
        msg # $+ ($read(xboxtag.txt,ns,$nick))
    }
    if ($2 == @erase) { write $+(-dl,$readn) xboxtag.txt
      msg # $nick $+ , your gamer tag has been reset.  Please re-add your Gamertag if you wish with !xbox register [xboxtag]
    }
    if ($2 == register) {
      if (!$3) { msg # please put in your xbox username, if you change it. Please remember to reset it.
      }
      else {
        write xboxtag.txt $nick $$3- | msg # $nick $+ , Your gamer tag of $$3- has been memorized.
      }
    }
    else { inc -u3 %f.xbox
      if ($sock(xbox)) sockclose xbox
      sockopen xbox live.xbox.com 80
      sockmark xbox $+(/en-US/Profile?gamertag=,$replace($regml(1),$chr(32),$+($chr(37),20))) $&
        msg # $+($regml(1))
    }
  }
}

but when I try doing the @xbox @erase It erases the name, but it still comes up with the name not found. Also when I just try the @xbox it doesn't work at all.

I even tried seeing if the problem was with the $regml(1) and replacing that with the $read(xboxtag.txt,ns,$nick) and it still failed

Any help would be nice.

 Respond  
napa182   -  Apr 18, 2012

ah ic, but like one of the accounts that I am using atm I have 76+ friends an half of them seem to change their gamer-tags every week. So it is a pain in the a** just to keep up with whatever nick they are using this week, but if you want to make that for ur self by all means go right on ahead an do so, an good luck. ;x

 Respond  
KilllerX   -  Apr 18, 2012

well, they would just have to reregister, it. write over. But I don't know a whole lot of people that change theirs that much. Only 1 person I know has actually changed it. But then again, I don't know a whole lot of people on it, since mine broke :(

 Respond  
napa182   -  Apr 18, 2012

Yes you are right about that SunnyD i just saw PSN's page an it is a mess. They used to have a nice online status checker page a few years back, but they seem to have changed it for the worse. =/

KillerX, the only thing wrong with that is people well most people I know always change their gamer-tags so you would have to re add gamer-tags almost all the time. For now this is just a simple gamer-tag checker.

 Respond  
KilllerX   -  Apr 18, 2012

Now if only I could figure out how to make an Add-on, to store a person's data, so if they type

KilllerX: @xbox register thekilllerx
Bot: KilllerX, your Xbox name, has been written to my memory.

  • Later -
    randomperson: Hey what is your Xbox tag, and what are you playing? (or something like that)
    KilllerX: @xbox
    Bot: theKilllerX: Online playing [Game] - GS: [Gamer Score]

    Would be cool, to see a PSN, and a Steam version of these.

 Respond  
Sorasyn   -  Apr 18, 2012

I tried with my Java snippet and PSN has everything arranged so erratically you can't access the or the URL the sources its data from since it's secure.

 Respond  
napa182   -  Apr 18, 2012

Hawkee Wrote:

Good to see a new post napa, keep it up!
I know right. I didn't realize it has been a long time since my last post.

An thank you to everyone for the nice comments and likes.

Oh an Jethro I don't know about the PS3 gamer-tag look-up as i have never tried nore do I use my PS3 much. um give me the link for the gamer-tag look-up for PS3, an I will see if i can make something that will work. I can't promise anything tho....

 Respond  
Hawkee   -  Apr 18, 2012

Good to see a new post napa, keep it up!

 Respond  
Jordyk19   -  Apr 18, 2012

Very nice napa182. :)

 Respond  
GrimReaper   -  Apr 18, 2012

@Jethro I tried that with my TCL code, the way that the PSN has it setup, There is no definative way to get that information, I will have another look tho and if I see a way, I will show Napa. :)

 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.