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
- $(1) (in example) is required for Nightbot to allow for !tours <number/all> (defaults to Two Cities (4))
- 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
- Report bugs or features in this thread, tweet @Wiethoofd or send PMs here on TFTV or Twitch
- Request official version here
- Show your appreciate me developing/hosting this