|
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.
|
|
On April 03 2011 16:10 i.of.the.storm wrote: 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:
I have lurked a bit about that. I think that you load the sc2bot script after the channel settings. The sc2ranks_search flag is then not defined. So you can't add it to the channel settings.
You can try to type the following:
setudef flag sc2ranks_search
channel add #mychan{ +sc2ranks_search }
and maybe you will have to remove the following line in the sc2bot script: https://bitbucket.org/ThArGos/sc2bot/src/276bf8754450/sc2ranks.tcl#cl-147
Help about the setudef flag command can be found here: http://tclhelp.net/?lang=de&menu=help&sub=eggcmds&help=eggcmd:name:setudef
|
I've got source scripts/sc2ranks.tcl in my eggdrop.conf but when i try enable the script from party line it comes back with Error trying to set +sc2ranks_search for #sc2bot, invalid mode.
using windrop though, if that's an issue
|
Have you rehashed? type .rehash to make the bot load the script.
|
Tried a rehash and it's still saying invalid mode
|
Im completely confused on how to do this. But it looks and sounds great anyway.
Well done.
|
Can't believe I didn't know about this. This is reallly awesome.
|
On April 13 2011 00:25 Stickmatrix wrote: Tried a rehash and it's still saying invalid mode What is the version of your windrop please? Do you have errors while rehashing? Are there error messages while loading the sc2bot script?
It should work with windrop I think.
On April 13 2011 02:25 pStar wrote: Im completely confused on how to do this. But it looks and sounds great anyway.
Well done. Thanks. What is the part confusing you?
On April 13 2011 02:26 Wolf wrote: Can't believe I didn't know about this. This is reallly awesome. Thanks =)
I plan to add the division rank and the +/- places since last update, just like the +W+L.
|
using current ver from windrop sourceforge (Eggdrop v1.6.20)
|
When loading the script do you have any error like:
Sc2ranks : You need the http package to run this script. That kind of message should be in the logs too.
It seems the sc2ranks_search flag is not set, which may indicate that the script hasn't load correctly. That's why I'm asking for such an error message. You may have a package missing.
|
|
Okey, so what I did to get it to work on windows was:
1) DL Atcl Clicky for windows. activetcl 8.5 And then installed it. 2) Downloaded windrop clicky Eggdrop v1.6.20 and installed it. It's not really fast to install since you have to actually read and adjust A LOT in the eggdrop.conf though This might help 3) Download tclib 1.12 from here clicky! and put it in the windrops lib folder.
Basically it. Read all install notes etc if you want to set it up and never done it before. Eta about half an hour from scratch. Quite hard to do, read a lot of help files etc.
|
What triggers the
Finally the script has a simple implementation of the division switch prediction (http://sc2mmr.blogspot.com/).
From showing? Never got it to show :/
|
On April 14 2011 03:09 Rosvall wrote: Okey, so what I did to get it to work on windows was:
Thanks for the windows users!
On April 14 2011 06:39 Rosvall wrote: What triggers the
Finally the script has a simple implementation of the division switch prediction (http://sc2mmr.blogspot.com/).
From showing? Never got it to show :/ At the moment the division switch prediction is disabled due to Blizzard smart decision de remove the lose count. Thank you Blizzard.
I'll try to put it back as soon as the division switch is computable again. Another thing is TehForce pointed me that the MMR calculation wasn't that accurate.
I'm doing some test about the division switching myself with stats I gather by hand. If something good comes out from this I'll use it in the division switch feature.
Next short term features should be: - Display division rank and progress since last update - These other stuffs
I'll keep you in touch. Although you are right, I should edit the initial post in order not to confuse the readers.
Sorry for the inconvenience and the disappointment about the division switch removed feature. I may be as pissed as you I think. I didn't even have the time to tune it right. Let's hope blizzard change there mind or somebody finds a good way to compute this.
By the way. If anyone here have requests for the bot, do not hesitate in submitting them. I'll do my best to make users happy with the bot.
best,
|
Okey, a few pointers.
Firstly, when you do !s help you get the info from the bot, very very slowly. It takes about 7 sec for him to give me 5 rows. All this is local so it's not an issue of sc2ranks being slow.
And a few features I'd like. If you type !s -s eu user ### {No bracket} I'd like it to list short stats about every bracket. Like "Rosvall - Zerg: 1v1 League Points -- 2v2 League Points -- 3v3 League Points -- 4v4 League Points"
If I type !s -f {Nothing here} eu Rosvall I'd like a list of everyone with the Exact name Rosvall as standard.
Also, Can several players have the same bnet ID's? If not I guess !s -s eu {No Name here} ##### 1 would work.
|
On April 14 2011 19:10 Rosvall wrote: Okey, a few pointers.
thanks!
Firstly, when you do !s help you get the info from the bot, very very slowly. It takes about 7 sec for him to give me 5 rows. All this is local so it's not an issue of sc2ranks being slow.
You can configure this in the script by changing from NOTICE to PRIVMSG. See Configurable variables. I will change the default and maybe enhance this a bit.
The bot use the NOTICE command in order not to flood and get banned from the server.
And a few features I'd like. If you type !s -s eu user ### {No bracket} I'd like it to list short stats about every bracket. Like "Rosvall - Zerg: 1v1 League Points -- 2v2 League Points -- 3v3 League Points -- 4v4 League Points" Good idea! Will do.
If I type !s -f {Nothing here} eu Rosvall I'd like a list of everyone with the Exact name Rosvall as standard. Very smart. Will do to.
Also, Can several players have the same bnet ID's? If not I guess !s -s eu {No Name here} ##### 1 would work. Smart too! Will do it to =)
Thanks for that precious feedback.
|
the only current "problem" i can think of is that it won't take non-unicode names (kr, cn, tw etc) instead it will say it can't find the player.
|
ok, sorry for bumpin this, but I have no idea where to put the script?
|
On April 16 2011 03:46 Stickmatrix wrote: the only current "problem" i can think of is that it won't take non-unicode names (kr, cn, tw etc) instead it will say it can't find the player.
I guess kr cn and tw are UTF8 but eggdrops and channels may not handle this properly. I'll have a look but indeed, it's a kind of tricky part.
On April 20 2011 06:00 pStar wrote: ok, sorry for bumpin this, but I have no idea where to put the script?
What kind of bot do you use? Eggdrop, Windrop?
|
Israel2209 Posts
With grandmaster players I think it would be nice to show their current rank when -stats'ing them. Also if you could add the current version to the OP it could be a great way to make sure we're all updated.
|
Hi,
Thanks for your input. The cool thing is that I'm adding the rank at the moment as I was thinking the same =)
About the version number in the OP. No problem I will.
I'll keep you in touch.
|
Version 0.5.262 is out. See the original post for the changelog.
|
Version 0.5.266 is out. Fixed division rank progression.
|
just updated to your latest version, my issue is that when i search someone
e.g !s -stats US PiLLaGe 2688364 1
the bot whispers me with the usage stuff, when it worked in the version i was using prior to this one.
also getting this in my telnet session [18:13:00] Tcl error [::sc2ranks::sc2ranks_command]: key "character_code" not known in dictionary
|
Hi, Username is not required anymore if battle.net id is provided (cf line 6 of original post) =) The command becomes the following: !s -stats US 2688364 1
Cheers!
|
Hi,
I have a Eggdrop from Bouncer 4 You and I uploaded and loaded the script. but when i want to activate it with: ".chanset #ks-gaming +sc2ranks_search" I get: Error trying to set +sc2ranks_search for #ks-gaming, invalid mode.
help plz! :'(
|
From what I understand, it seems the script haven't load correctly. I will add a message in order to be sure it is loaded.
|
|
|
|