|
Current version 0.5.266 New -url command: !sc2 -url bnetid !sc2 -url knownplayer Updated -stats command (username not needed anymore if bnet_id is provided): !sc2 -stats us 2768741 1
Changelog (v0.4.227 to v0.5.262): - Removed username from search with bnetid and server (#9). - Default help displayed in query rather than notices. Enhanced cache. (#3) - Added division rank and progression (#7). - Added a -url command (#2). - Fixed grandmaster display. - Fixed a bunch of bugs. - DIVISION SWITCH PREDICTION HAS BEEN REMOVED see http://www.teamliquid.net/forum/viewmessage.php?topic_id=200420¤tpage=2#33 -------------------------------------- OP ------------------------------------------------------- Dear TL members,
I'm glad to share with you what I guess is the first GPLed eggdrop script giving access to the sc2ranks.com database.
This script gives you the ability to query stats directly from your irc client.
You can find the script at: https://bitbucket.org/ThArGos/sc2bot/overview
Eggdrop owners enable the script directly from the party line with: .chanset #my_great_chan +sc2ranks_search
Then users of the #my_great_chan will be able to type the following set of commands: !sc2 -stats server user [bnetid|character code] [1-4](bracket) !sc2 -stats knownuser [1-4](bracket) !sc2 -version !sc2 -list [1-4](bracket) !sc2 -find [exact|contains|starts|ends] server name [offset]
Example: You want to retrieve the 1v1 stats of "control" from the EU server. Type: !sc2 -stats eu control 657035 1 > control (master terran): 1092/916 0.54 +1093W +917L (Bonus 11/3010 MMR 3296) (2011-03-11 15:42:33)
Returned informations are: name league + fav race wins/losses ratio progession since last sc2ranks.com update. The script is able to keep a track of what happens thanks to its cache system. Bonus pool/Server Max Bonus Pool MMR (and the division switch prediction when available) Date and time of the last sc2ranks.com update.
The script will keep a list of known players. Every queried player will become a known player for the bot. You can retrieve a known player stats with a simpler command: !sc2 -stats control 1
You can list the players the bot knows (this is bracket related). For instance, to obtained the list of known 1v1 players type: !sc2 -list 1
![[image loading]](http://i.imgur.com/mJOf7.png)
The list shows the player name, her battle.net id and her character code if available (else 0)
![[image loading]](http://i.imgur.com/Eyetu.png)
The script has a find command: !sc2 -find exact eu control
![[image loading]](http://i.imgur.com/hl9xr.png)
![[image loading]](http://i.imgur.com/tjzCb.png)
This will return the list of players named "control" on the eu server with their battle.net id. Only returns the first 10 names, but you can see the total number of characters and pass an offset if you need more. Search is case-insensitive.
![[image loading]](http://i.imgur.com/ZHzKt.png)
![[image loading]](http://i.imgur.com/3dgDh.png)
Finally the script has a simple implementation of the division switch prediction (http://sc2mmr.blogspot.com/). This may improve with time. You will get a message like this: (Bonus 1774/3010 MMR 1249. Estimated switching in 5 games)
You can customise the command names and which method the bot should use to display the results (notices, chan message…).
Short options are available: !sc2 -stats eu control 657035 1 is equivalent to !s -s eu control 657035 1
![[image loading]](http://i.imgur.com/Koe7t.png)
![[image loading]](http://i.imgur.com/5Qgis.png)
A lot of effort has been put on the cache system in order not to flood sc2ranks.com. By default the script will have a cache of 2 hours for each record. Bear in mind that sc2ranks.com has a 3 hours cache for 1v1 for instance. So we don't need to have a lower cache.
This is a very first release. Things are missing. MMR and division switch are computed only for 1v1. Cool things are planned like week rolling stats or month rolling stats.
I would like to thanks sc2ranks.com, Michael from http://sc2mmr.blogspot.com/ and RMS.
Critics, comments, insults are welcomed.
|
This is fantastic! Will this work on justin.tv as well?
|
ooh. Interesting. Interesting.
|
On March 13 2011 01:36 CPTHammer.464 wrote: This is fantastic! Will this work on justin.tv as well? Thanks.
I tried to setup a bot for irc.justin.tv and I managed to make it connect to the server and join a channel. So I guess it will work. I'll soon try to setup a test channel to let people see the bot in action.
So far I couldn't see if the irc of justin is the same chat we see on the streaming pages. I guess it's sometime the case depending on the streamer's settings but I don't know much justin because I've just setup an account in order to test all this. If the chat displayed on the streamer's web page is the content of an irc channel, I guess people could ask the bot directly from the web page too.
|
I am a complete illiterate when it comes to computer programming, so can you give a brief synopsis on how someone like me can use this without spending hours learning the ins and outs of this? In other words, hold my hand and give me a step by step process :p (Would be appreciated -- thanks!).
|
Bump for answers
|
Awesome bot, is there an !SC2 help or similar command? On EFnet we run a pretty populated sc2 channel and it would help if the bot could notice users the commands
|
Bump again for answers :p
|
On March 12 2011 01:42 ThArGos wrote: Returned informations are: name league + fav race wins/losses ratio progession since last sc2ranks.com update. The script is able to keep a track of what happens thanks to its cache system. Bonus pool/Server Max Bonus Pool MMR (and the division switch prediction when available) Date and time of the last sc2ranks.com update.
how does this script find your MMR? I was sure that none know how to find this value. I apologize for my english.
|
Hi,
On March 13 2011 17:41 Wegandi wrote: I am a complete illiterate when it comes to computer programming, so can you give a brief synopsis on how someone like me can use this without spending hours learning the ins and outs of this? In other words, hold my hand and give me a step by step process :p (Would be appreciated -- thanks!).
Setting up an eggdrop requires some understanding and some underlying operating system setup. Typically you will need a shell access to a Unix server (see http://www.egghelp.org/whatis.htm ). There are bots for windows too (Windrop for instance) but I don't know them at all. I guess the simplest way for you is that someone sets up a bot on your irc server and makes it possible to invite it to channels. Then you invite the bot to your specific channel. I'm pretty sure there are already some bots present on the irc server you are connected to. Maybe you can try to reach a bot owner and ask her to include the sc2bot module.
On March 14 2011 06:10 Stryk wrote:Awesome bot, is there an !SC2 help or similar command? On EFnet we run a pretty populated sc2 channel and it would help if the bot could notice users the commands 
Thanks. To have some help you can type !sc2 help. The bot will send the usage to the user with the "notice" protocol. In fact everytime a user types a missformated command the bot will send her the usage. I will add a !sc2 -help option. You are right it is kind of missing. Thanks for the feedback =)
On March 14 2011 13:08 GjRud wrote: how does this script find your MMR? I was sure that none know how to find this value. I apologize for my english.
The bot is using the http://sc2mmr.blogspot.com/ MMR algorithm discovered by Michael. The displayed MMR is the hidden MMR. Some fine tuning needs to be done but it should be quite the good result. About the switch prediction, it is a very early work and may not be that precise. Remember that if you are too close to division switch the algorithm may end up predicting things poorly. A lot of simplification has been done and it needs to be reworked a bit in order to fully reproduce the computations explained by Michael. For instance the division switch computation is using average wins/losses points values at the moment (24 and 11). In the future it may be able to compute these values from you actual average points. This introduces some little delta in the result. There are some missing information about the inactivity effect on the division switch too.
Well to sum things up. The MMR computation is quite accurate and is the same as explained on Michael's blog. The division switch is not very accurate and is the implementation of the simple computation explained on Michael's blog. Yet, it gives you an idea of your ability to switch division.
I strongly suggest to read Michael's blog if you are interested in these computations.
Cheers!
|
have you brought this bot onto quakenet?
|
I have quickly set up a testbot and made it join #akundo on quakenet. That way you will be able to see it in action.
But I have to say that It doesn't run on a stable server and may be disconnected though. I have limited resources and won't be able to become an eggdrop provider (and it is not the purpose of the initial post)
Anyway, I hope you like it 
|
I love it so far. Be careful of spam with notice... a lot of servers have limits and if multiple people queue commands the bot could get backed up. For example if your list contains more than several hundred people, will it notice a line for all of them?
|
|
Thank you guys for the constructive feedback!
On March 15 2011 13:39 Stryk wrote: I love it so far. Be careful of spam with notice... a lot of servers have limits and if multiple people queue commands the bot could get backed up. For example if your list contains more than several hundred people, will it notice a line for all of them?
I haven't thought about this! Thanks. I will try to change this. For instance I will change the default behaviour to send private messages rather than notices. Sort the list alphabetically and give the ability to ask for names starting with a specific letter. Thanks for pointing this out.
Thanks a lot about this. I wasn't aware of that thread. I will read and try to understand it. I will then fix the MMR calculation.
Again thanks for the feedback. I'll keep you in touch about the bot upgrades.
|
I updated the bot according to the patch 1.3:
Removed losses and losses differential for non masters. Removed MMR computation and division switch prediction. Added a direct url back to the sc2ranks.com page for every player displayed by the -list command.
Fixed some stuff
Players who are not in master league will only see their number of wins and how many wins they obtained since the last sc2rank update. Master players will see wins/losses, ratio and +W +L since last update like it was before.
The bot running on Quakenet #akundo is running the latest version of the script if you want to test.
|
Hey, I just tried to set this up on my server, I got this message:
[00:06:06] Sc2ranks : You need the json package to run this script.
Any ideas? I've had a lot of trouble with eggdrop bots for some reason, even though they seem straightforward enough to me. I can't run any commands.
Edit: D'oh, installed tcllib. Still not getting it to respond to commands, but that message went away.
Edit: So do I always need to run the .chanset command manually? I tried setting it up like
channel add #mychan{ +sc2ranks_search } in the bot's config file, but apparently that doesn't actually make it work. Doing .chanset worked, but now I can't actually get stats for anyone. I see this error:
[00:32:18] Tcl error [::sc2ranks::sc2ranks_command]: couldn't open socket: host is unreachable (Name or service not known)
Great stuff in any case, this should make it easier for my student group to keep track of people's accounts.
|
Hi!
Great, I see you managed to install json via the tcllib. That was the right thing to do.
About the .chanset command. I usually type it manually but there must be a way to configure it right through the configuration file. I'll have a look at this and come back here to tell.
About the host is unreachable. This is strange. It seems the bot cannot access either the battle.net web page of the player or the json script from sc2ranks
You can turn on debug informations with the following command: !sc2debug [0-9] Where 0 to 9 is the verbosity level. 9 is very very verbose. It will print the debug informations in the channel. Maybe you should join a debug channel with the bot.
Hope that helps.
|
Hmm, I did verbosity 9 but all it tells me is (12:22:47 AM) SC2ranks: DEBUG Searching for iofthestorm using type exact. I can definitely browse sc2ranks and battle.net via lynx (remote server).
Will investigate more when I have time.
|
|
|
|
|