I created something for Twitch Streamers who play (a lot) of Mann vs. Machines.
Because mvmlobby.tf has easy accessible information for your MvM tour completions info I wrote a script that scrapes this information and outputs some plain text which Nightbot can display in chat.
What do I need to do?
Add the command to Nightbot in Twitch Chat after replacing STEAMID with yours with the following line:
!addcom !tours $(urlfetch http://wiethoofd.info/tours?steamid=STEAMID&tour=$(1))
Typing !tours in chat will then output Two Cities tour completion information, using 1-5 or all will display additional info.
Check it out in action in my Twitch chat.
Example screenshots:
https://i.imgur.com/JaguNQW.png
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
List of arguments (separated by & when added to the url):
- steamid=<customurl/steamid> (REQUIRED)
- accepts custom urls & any form of valid steamid
- tour=<1-5/all> (optional but recommended)
- $(1) (in example) is required for Nightbot to allow for !tours <number/all> (defaults to Two Cities (4))
- all shows an overview
!tours allWiethoofd completed 0 Oil Spill (0/6), 8 Steel Trap (0/6), 19 Mecha Engine (0/3), 661 Two Cities (1/4), 14 Gear Grinder (0/3) Tours
- 1-5 forces to display info about a single tour of duty
Examples:!tours 3Wiethoofd has finished 19 Mecha Engine tours & completed 0 out of 3 missions
!tours 4Red has finished 63 Two Cities tours & completed 3 out of 4 missions
!tours 5CeeJaey has finished 65 Gear Grinder tours & completed 1 out of 3 missions
- name=Nickname (allowed characters: letters, numbers, dashes, underscores & spaces)
- If set overrides the current Steam name found on MvM Lobby
- profile
- Adds a link to mvmlobby.tf profile with steamid64 at end of chat message
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Possible features that could be added if there is interest for it:
- TTours emote instead of tours
- Custom url instead of SteamID in profile url
- Less strict custom nickname for &name (examples required)
- Leave out tour of duties which have never been played from !tours all
- Showing which missions are left to complete if less than half remaining
- Configuration page with Steam login to generate the url for the !addcom chat command
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Support
I created something for Twitch Streamers who play (a lot) of Mann vs. Machines.
Because [url=http://mvmlobby.tf]mvmlobby.tf[/url] has easy accessible information for your MvM tour completions info I wrote a script that scrapes this information and outputs some plain text which [url=https://nightbot.tv/]Nightbot[/url] can display in chat.
[b]What do I need to do?[/b]
Add the command to Nightbot in Twitch Chat after replacing [i]STEAMID[/i] with yours with the following line:
[code]!addcom !tours $(urlfetch http://wiethoofd.info/tours?steamid=STEAMID&tour=$(1))[/code]
Typing [i]!tours[/i] in chat will then output Two Cities tour completion information, using [i]1-5[/i] or [i]all[/i] will display additional info.
Check it out in action in [url=http://twitch.tv/wiethoofd]my Twitch chat[/url].
Example screenshots: [img]https://i.imgur.com/JaguNQW.png[/img]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
List of arguments (separated by & when added to the url):
[list]
[*][i]steamid[/i]=<customurl/steamid> ([b][u]REQUIRED[/u][/b])
[list][*]accepts custom urls & any form of valid steamid[/list]
[*][i]tour[/i]=<1-5/all> (optional but recommended)[list]
[*][i]$(1)[/i] (in example) is required for Nightbot to allow for !tours <number/all> (defaults to Two Cities (4))
[*][i]all[/i] shows an overview
[quote=!tours all]Wiethoofd completed 0 Oil Spill (0/6), 8 Steel Trap (0/6), 19 Mecha Engine (0/3), 661 Two Cities (1/4), 14 Gear Grinder (0/3) Tours[/quote]
[*][i]1-5[/i] forces to display info about a single tour of duty
Examples:
[quote=!tours 3]Wiethoofd has finished 19 Mecha Engine tours & completed 0 out of 3 missions[/quote]
[quote=!tours 4]Red has finished 63 Two Cities tours & completed 3 out of 4 missions[/quote]
[quote=!tours 5]CeeJaey has finished 65 Gear Grinder tours & completed 1 out of 3 missions[/quote][/list]
[*][i]name[/i]=Nickname (allowed characters: letters, numbers, dashes, underscores & spaces)[list][*]If set overrides the current Steam name found on MvM Lobby[/list]
[*][i]profile[/i]
[list][*]Adds a link to mvmlobby.tf profile with steamid64 at end of chat message[/list]
[/list]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Possible features that could be added if there is interest for it:
[list]
[*] TTours emote instead of [i]tours[/i]
[*] Custom url instead of SteamID in profile url
[*] Less strict custom nickname for [i]&name[/i] (examples required)
[*] Leave out tour of duties which have never been played from [i]!tours all[/i]
[*] Showing which missions are left to complete if less than half remaining
[*] Configuration page with Steam login to generate the url for the [i]!addcom[/i] chat command
[/list]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
[b]Support[/b]
[list]
[*]Report bugs or features in this thread, tweet [url=http://twitter.com/Wiethoofd]@Wiethoofd[/url] or send PMs here [url=http://teamfortress.tv/inbox/compose/Wiethoofd]on TFTV[/url] or [url=https://twitch.tv/message/compose?to=wiethoofd]Twitch[/url]
[*]Request official version [url=http://steamcommunity.com/groups/mvmlobby-com/discussions/0/357286663681532759/]here[/url]
[*][url=http://scrap.tf/tip/wiethoofd]Show your appreciate me developing/hosting this[/url]
[/list]