ensingm2 / SteamMonsterGameScript

A Javascript automator for the 2015 Summer Steam Monster Minigame
78 stars 29 forks source link

Auto join room #89

Closed MayeulC closed 9 years ago

MayeulC commented 9 years ago

Hello,

To maximize efficiency, we could develop a feature to auto join some games, as soon as possible. We could store a webpage somewhere (even on github, if possible), containing room numbers that the bots auto-joined. If there is an available room, we join it; if not, we create a new one and add its ID to the list.

Approximately 6 hours remaining for today. What do you think ?

vanZeben commented 9 years ago

The ID system that you suggested wouldn't really work with steams "You can only join a game 10 minutes into the room", so I don't think that would really work. As for the auto-join, I found https://gist.github.com/RockyTV/5a6cd3e37283a6126e9b works very nice for updating the UI on the main info page

waterfoul commented 9 years ago

What if we setup a websockets/irc relay and watched ulletical's twitch irc channel?

waterfoul commented 9 years ago

I'm looking into a possible solution now, would require keeping another tab open but it should work

waterfoul commented 9 years ago

I've got it mostly figured out but need a list of mods in ulletical's twitch to secure it. Anyone have a decent list? Or a chatlog?

JesterEE commented 9 years ago

Similar to what @vanZeben wrote above here is my version. I didn't know that one existed, but even still, I couldn't get it to work in Chrome. These should make it easier to join a game on your own ... https://github.com/JesterEE/SteamMonsterMinigameJoinScript.

waterfoul commented 9 years ago

Here's what I have so far https://gist.github.com/waterfoul/109a1d9c0d59696c4980

In order for it to work you need to open http://www.twitch.tv/ulletical/chat and http://steamcommunity.com/minigame/ in seperate tabs (or you can use http://www.twitch.tv/waterfoul/chat for testing), If someone says JoinGame(Something) it will pick up the something and run the join game command every second on the http://steamcommunity.com/minigame/ tab. The only thing I believe I need to do is figure out the mods of ulletical's chat to protect it and integrate with the master script so it get's auto updated in. Could someone sanity check me?

vanZeben commented 9 years ago

I like where you're going with that waterfoul, setting up websockets to relay it to json or something of the sort wouldnt be too difficult... As for who the mod was (at least today, cant recall yesterday) initially stating the id was Minz, and if I recall his twitch was simply "Minz_Live". What they should really do though, is instead of sending out a message through their different mediums (twitch, group chat (which gets forgotten, as it did today)), the main admins should really just have a static json page somewhere where they update it with room ids and if the room is locked or not at the start, and then everyones scripts could just ping that page and attempt to join from there... That would probably also solve their issues of inactives and users who arent using scripts from joining simply to get the badge boost.

Then again, this event has about a week left, and this shouldnt really be integrated into this main script (regarding the issue), plus I dont think the reddit team has the resources for this sorta backend, unless @xPaw is willing to host something up for this sort of thing

waterfoul commented 9 years ago

That's why I went with the watch twitch idea, this way they don't have to change anything and we get the autojoin

ensingm2 commented 9 years ago

Yeah, generally I've been against relying on connecting to a server (people have asked me to do that in order to coordinate item use & elemental specialization in the past) as it opens up a whole new batch of issues.

I'm much more open to monitoring a 'neutral ground' like a chatroom or scraping the reddit api for rooms in the title, and would be willing to roll an existing implementation into this repo if people wanted(though t'd probably be best to stay as its own repo to prevent a ton of conflicting versions). The autojoiner should be set to run on http://steamcommunity.com/minigame/ rather than http://steamcommunity.com/minigame/towerattack, which would allow it to work independently of what script you use in game, if any.

waterfoul commented 9 years ago

Yeah, take a look at the gist above, It can be loaded as a separate script. Could you take a look and let me know what you think. If you think the idea is solid I'll create a repo for it and write up instructions. I'm testing it on the next join to see if it works

ensingm2 commented 9 years ago

Looks like a good start! A couple suggestions:

ensingm2 commented 9 years ago

Going to close this out as it isn't part of the script and hasn't been updated recently.