This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

incith:gamertag (v1.3) Jan 24, 2o1o

Support & discussion of released scripts, and announcements of new releases.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

incith:gamertag (v1.3) Jan 24, 2o1o

Post by speechles »

Now I bet your wondering what this has to do with incith. Just why does it have his name? Well, the simple answer is the man is brilliant. Plus, this script uses his code as a base.. So the right thing to do in this case, is credit the man...

Code: Select all

#---------------------------------------------------------------#
# incith:gamertag                                          v1.3 #
#                                                               #
# This script basically scrapes profile.mygamercard.net and     #
# returns relevant information about that gamer to irc.         #
#                                                               #
# Usage:                                                        #
#   .chanset #channel +gamertag                                 #
#   !gamertag <tag to search for>                               #
#                                                               #
# ChangeLog:                                                    #
#    v1.3 - To piss off the admins of mygamercard I've now      #
#           added cookies to more robustly support browser      #
#           like behavior and keep them from caring.            #
#    v1.2 - MGC notes for gamerscore discrepancies.             #
#           percentages now check for divide by zero.           #
#    v1.1 - percentages added for easily seeing ratio           #
#           of score and achievements.                          #
#    v1.0 - first release, enjoy.. :)                           #
v1.0 sample from irc wrote:<speechles> !gamertag foxmcloud007
<sp33chy> MyGamerTag for FoxMcloud007 | Games: 16 | Score: 3660/13570 | Achievements: 182/569 | Status: Last Playing Thrillville: OTR Demo--Offline for 1 Day | Reputation: 4 | GamerScore: 8860 | LastLive: Halo 3 on Fri, 28 Sep 2007 22:23:11 GMT @ http://profile.mygamercard.net/FoxMcloud007
<speechles> !gamertag gibberish
<sp33chy> This player has not yet played any Xbox 360 games!
<speechles> !gamertag wertiusdjf
<sp33chy> The GamerTag wertiusdjf does not exist on Xbox Live!
v1.1 sample from irc (new % feature shown) wrote:<speechles> !gamertag foxmcloud007
<sp33chy> MyGamerTag for FoxMcloud007 | Games: 32 | Score: 7265/29270 (24.82%)| Achievements: 348/1246 (27.92%)| Status: Last Playing Virtua Fighter 5 DEMO--Offline for 4 Hrs | Reputation: 4.75 | GamerScore: 9775 | LastLive: ACE COMBAT 6 on Thu, 25 Oct 2007 23:45:43 GMT @ http://profile.mygamercard.net/FoxMcloud007
v1.2 sample from irc (MGC notes and divide by zero feature shown) wrote:<speechles> !gt the sharkface
<sp33chy> MyGamerTag for The Sharkface | Games: 0 | Score: 0/0 (0%)| Achievements: 0/0 (0%)| Status: Last Playing Guitar Hero III--Offline for 7 Hrs | Reputation: 5.00 | GamerScore: 8328 (We are missing game data totaling 8328 GamerScore. This can be corrected by simply booting games not shown in this list.) | LastLive: None on Never @ http://profile.mygamercard.net/The%20Sharkface

<speechles> !gt dueling bros
<sp33chy> MyGamerTag for Dueling Bros | Games: 16 | Score: 2230/11450 (19.47%)| Achievements: 105/470 (22.34%)| Status: -Certain Privacy Settings are enabled for this account.-These settings prevent online status from being updated. | Reputation: 5.00 | GamerScore: 3050 (We are missing game data totaling 820 GamerScore. This can be corrected by simply booting games not shown in this list.) | LastLive: Halo 3 on Sun, 11 Nov 2007 23:14
<sp33chy> @ http://profile.mygamercard.net/Dueling%20Bros
You can see this keeps with the familiar format of all incith scripts, as well as keeping the same config making it easy for anyone to use and modify. If you wish to change the output, just find the commented (# alter this to change the output display to your liking..) change the set output line to your liking. For v1.1 the bot simply 'does the math' for the score/achievement ratios turning them into percentages, it's a nice feature to have makes it easier to compare your fields against another players. for v1.2 we step it up a notch with the additional benefit of MGC notes for gamerscore discrepancy as well as checking for divide by zero. You now have a total package that can get info on any xbox-live gamer. ;)

Try out v1.2: Here
Last edited by speechles on Sun Jan 24, 2010 4:07 pm, edited 17 times in total.
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

Not sure if it's a good idea to give credits in the very name of the script, it sounds like Incith made it.

I wonder if Incith is ready to take responsibility for possible bugs :wink:
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

MenzAgitat wrote:Not sure if it's a good idea to give credits in the very name of the script, it sounds like Incith made it.
That was the point, he did make it, except for the proc that does the scraping. That was why I decided not to claim everything for myself, because all I did was add the scraper, the rest _is_ incith. If he feels differently about it, and feels it shouldn't be monikered after him, then by all means I've done him a disservice. I'm just hoping he feels honored
MenzAgitat wrote:I wonder if Incith is ready to take responsibility for possible bugs :wink:
Hopefully people are smart enough to realize the difference since to even get the script they would have had to read this post. This wont be posted to the archive, it's just for those here that wish to use it, a forum exclusive as is the unofficial google, they are tributes to incith ;)
User avatar
schizosmurf
Voice
Posts: 15
Joined: Fri Oct 12, 2007 10:50 am

Post by schizosmurf »

I noticed something while using this script.
if someone types just !gamertag with no argument it brings of the stats for some guy named morgon.
<someguy> !gamertag
<somebot> MyGamerTag for Morgon Games: 99 Score: 9608/44090 Achievements: 527/2044 Status: Last Seen on Xbox.com--Offline for 46 Secs Reputation: 5.00 GamerScore: 9608
<somebot> LastLive: Tetris Splash on Tue, 09 Oct 2007 22:39:58 GMT http://profile.mygamercard.net/Morgon

I dont think it's the scripts fault bc going to http://profile.mygamercard.net (with no /gamertag on the end) shows that info.
So is there some way I/you could change it to check for an argument before attempting to retrieve information, so you end up with some thing like
<someguy> !gamertag
<somebot> Please enter a search query. Ex. !gamertag bobsmith
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

schizosmurf wrote:I noticed something while using this script.
if someone types just !gamertag with no argument it brings of the stats for some guy named morgon.
<someguy> !gamertag
<somebot> MyGamerTag for Morgon Games: 99 Score: 9608/44090 Achievements: 527/2044 Status: Last Seen on Xbox.com--Offline for 46 Secs Reputation: 5.00 GamerScore: 9608
<somebot> LastLive: Tetris Splash on Tue, 09 Oct 2007 22:39:58 GMT http://profile.mygamercard.net/Morgon

I dont think it's the scripts fault bc going to http://profile.mygamercard.net (with no /gamertag on the end) shows that info.
So is there some way I/you could change it to check for an argument before attempting to retrieve information, so you end up with some thing like
<someguy> !gamertag
<somebot> Please enter a search query. Ex. !gamertag bobsmith

Code: Select all

# If the user omits the tag, let's yell at them...
if {$input == ""} { return "No tag specified, search terminated. Please supply a gamertag." }

# fetch the html
set html [fetch_html $input]
Feel free to edit the code to match the reply you find acceptable. To avoid editing, you can get the fixed script here. Most important, have a fun :wink:
User avatar
schizosmurf
Voice
Posts: 15
Joined: Fri Oct 12, 2007 10:50 am

Post by schizosmurf »

works perfect. i figured it would be an easy fix but wasn't exactly sure how to do it myself.
thanks :D
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Woo go me! Releasing scripts without even tryin'!

Nice work, doesn't offend me at all. Brought a smile. =) Thanks for the kind words speechles..
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

incith wrote:Woo go me! Releasing scripts without even tryin'!

Nice work, doesn't offend me at all. Brought a smile. =) Thanks for the kind words speechles..
Indeed, its neccessary to give props to the code that gave me inspiration. Helping others using comments in your code so they learn from your examples is excellent. In keeping with that tradition, I've got another update to this script to bring it closer to perfection.. ;)

To get the newest version of this script please see the 1st post in this thread, it contains all the history and revisions that have been made.


@incith, your wonderful google script constantly amazes me. Thanks so much for allowing me (and others since its GNU) to modify your script. It's allowed me to create something I think is truly unique in the eggdrop world. A multi-purpose, multi-language, super google bot ;)
t
tehsu
Voice
Posts: 1
Joined: Thu Aug 20, 2009 9:44 pm

Post by tehsu »

Any ideas on why I keep getting
20:40 < tsunade> The connection has timed out...


everytime someone tries to use the script it fails now, any ideas or updates on this script?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

tehsu wrote:Any ideas on why I keep getting
20:40 < tsunade> The connection has timed out...


everytime someone tries to use the script it fails now, any ideas or updates on this script?
MyGamerTag dislikes this script for some reason. In fact several users have sent me messages they received from MyGamerTag when asking why their IP was banned/blacklisted. The message made it pretty clear they know about this script. They asked the fellow if he knew of a scripting language called tcl which ran on eggdrop bots for irc. Pretty clear to me they must mean this script :(

I guess the fact that it doesn't allow a user to click banners/advertising, nor does it attempt to download the images they use for banners/advertising causes them to get a little pissed off. They are now throttling requests and over-use will now lead to a blackhole (basically they blacklist your ip for 24 hours). Happens to me when using only a browser (firefox in this case) as well. Eventually they stop replying and the page will timeout. I'll try to investigate it deeper and find a more suitable user-agent string or pass some headers along too to keep this at bay. But for the meantime, there is really nothing wrong with the script. It's a problem with the webmaster/admins of MyGamerTag and their policies towards bots/automated scripts (they abhor them)..
User avatar
pogue
Voice
Posts: 28
Joined: Sun May 17, 2009 3:56 am
Contact:

Post by pogue »

speechles wrote:
tehsu wrote:Any ideas on why I keep getting
20:40 < tsunade> The connection has timed out...


everytime someone tries to use the script it fails now, any ideas or updates on this script?
MyGamerTag dislikes this script for some reason. In fact several users have sent me messages they received from MyGamerTag when asking why their IP was banned/blacklisted. The message made it pretty clear they know about this script. They asked the fellow if he knew of a scripting language called tcl which ran on eggdrop bots for irc. Pretty clear to me they must mean this script :(

I guess the fact that it doesn't allow a user to click banners/advertising, nor does it attempt to download the images they use for banners/advertising causes them to get a little pissed off. They are now throttling requests and over-use will now lead to a blackhole (basically they blacklist your ip for 24 hours). Happens to me when using only a browser (firefox in this case) as well. Eventually they stop replying and the page will timeout. I'll try to investigate it deeper and find a more suitable user-agent string or pass some headers along too to keep this at bay. But for the meantime, there is really nothing wrong with the script. It's a problem with the webmaster/admins of MyGamerTag and their policies towards bots/automated scripts (they abhor them)..
This has begun happening to me too. I changed the flood settings to allow for more lookups faster and now it appears my IP has been blocked. Before that, I had no problem.

A couple things I can think of that may help. The most obvious would be to have proxy support. I also noticed (or couldn't find) that the script emulates a browser and sends any sort of user agent (ua) back to the server. Possibly doing that and having a random ua sent for each gamertag query might confuse them a bit.
Helpful Tools:
  • Notepad++: Windows Text Editor with TCL Syntax Highlighting
  • Pastebin TCL: For easy script collaboration
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

This is because they intially give you a phpsessid to follow for future reference and the script wasn't keeping track of cookie traffic. But now, since the admins of mygamercard seem to be such well..f****** a******* then let's make it totally look like the script is a browser and support phpsessid cookies. This is now functional and available.
<speechles> !gt decoy0cto
<sp33chy> MyGamerTag for Decoy0cto "AHHH OPEN UR MOOOUUTH" | Games: 81 | Score: 15900/65170 (24.39%) | Achievements: 792/2979 (26.58%) | Status: Last Playing Halo 3--Offline for 2 Days | Reputation: 5.00 | GamerScore: 29065 (We are missing game data totaling 13165 GamerScore. This can be corrected by simply booting games not shown in this list.) | LastLive: Halo 3 on Fri, 22 Jan 2010 05:47:55 GMT @
<sp33chy> http://profile.mygamercard.net/Decoy0cto [cookies used]
If you see that cookies are used, then this should stop the site from eventually abolishing your ip to hell. Hopefully... ;)

get the new script here:Incith Gamertag v1.3 .. have a fun ;P
User avatar
pogue
Voice
Posts: 28
Joined: Sun May 17, 2009 3:56 am
Contact:

Post by pogue »

speechles wrote:If you see that cookies are used, then this should stop the site from eventually abolishing your ip to hell. Hopefully... ;)

get the new script here:Incith Gamertag v1.3 .. have a fun ;P
Thanks very much speechles! Looks like they have my bots IP totally blocked now though, unfortunately, so I guess I'm stuck. Still appreciated.
Helpful Tools:
  • Notepad++: Windows Text Editor with TCL Syntax Highlighting
  • Pastebin TCL: For easy script collaboration
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

pogue wrote:
speechles wrote:If you see that cookies are used, then this should stop the site from eventually abolishing your ip to hell. Hopefully... ;)

get the new script here:Incith Gamertag v1.3 .. have a fun ;P
Thanks very much speechles! Looks like they have my bots IP totally blocked now though, unfortunately, so I guess I'm stuck. Still appreciated.
Will add proxy support as well. But for most proxies, cookie traffic usually isn't carried over. But this should allow you to get the script "working" again.
User avatar
pogue
Voice
Posts: 28
Joined: Sun May 17, 2009 3:56 am
Contact:

Post by pogue »

speechles wrote:
pogue wrote:
speechles wrote:If you see that cookies are used, then this should stop the site from eventually abolishing your ip to hell. Hopefully... ;)

get the new script here:Incith Gamertag v1.3 .. have a fun ;P
Thanks very much speechles! Looks like they have my bots IP totally blocked now though, unfortunately, so I guess I'm stuck. Still appreciated.
Will add proxy support as well. But for most proxies, cookie traffic usually isn't carried over. But this should allow you to get the script "working" again.
Any update on the proxy support speechles? :)

Thanks,
pogue
Helpful Tools:
  • Notepad++: Windows Text Editor with TCL Syntax Highlighting
  • Pastebin TCL: For easy script collaboration
Post Reply