![]() If for PS4, I would change them to console=ps and gamertag=woahh_jess. If woahh_jess’ account was in Europe, then I would change the gamertag portion to gamertag=woahh_jess-1234-eu. So if I wanted to only allow viewers to check the PC stats for woahh_jess, I would make sure that those parts were changed to console=pc and gamertag=woahh_jess-1234. So in the above response example, the parts that say console=XX and gamertag=USERNAME-XXXX will need to be changed to whatever Overwatch player you want the command to check by default for and what platform they are playing on. It requires you to make two adjustments so that it knows what user name to look up by default. Usage: This command is not copy/paste friendly but my suggested method. Important to note, that if you’re playing on PC and not in the NA/US region, you will need to explicitly give the region. You can find an entire list of the various stats you’re able to look up here, and further general documentation here. This allows you to use a shorter command to check the stats, and also limits the usage so that any Overwatch player isn’t able to be looked up – just you (or whoever you define). The second Response is for a command that checks a defined Overwatch player, and what I personally recommend. ![]() While this allows your viewers to check any Overwatch player on any platform, it makes it so the command can be longer for the user to type, as well as has a chance to become a source of chat spam if too many people are using it. The first Response is for a command that checks a user-inputted Overwatch player. This allows users to issue commands to check various Overwatch stats of an Overwatch player and comes in two flavors for you to pick from. See the chatbot docs for more details on scripting.Description: Yes this is quite a block of text, but read it thoroughly as the overall concept is rather easy to understand. You also might want things like the trigger command to be configurable you can set that up using a UI_Config.json file. Your code can see an object called Parent which provides methods to handle these things. Note that in practice you might want to add cooldown controls, or permission controls. # gets run frequently, so if the check is resource-intensive then you don't # write code that watches for that condition, it can go here but beware this # your bot wants to act on *other* than data from the bot, and if you can # called frequently to mark the passage of time if there's some condition Parent.SendTwitchMessage(data.GetParam(1) + " is not correct") ![]() Try: # avoid problems if a non-numeric guess is given If data.IsChatMessage() and data.GetParam(0).lower() = '!guess': # called whenever the chatbot has data - chat messages, whispers, etc. Services/Scripts directory you would create a subdirectory for your script (lets call it guess, and in that folder you would create guess_StreamlabsSystem.py as follows # chatbot won't load a script that doesn't define these variablesĬreator = "madelsberger" # or for a script you write, your name here The script you need may not be very complicated, but you would need to install Python 2.7.13 and write a little Python code that satisfies the requirements for a Streamlabs Chatbot script.Īs a very basic example, say we want to create a "guess my number" game, and when someone guesses it says "Correct" if the guess is correct. So what you want is for the user to issue a command, and then the bot does a calculation if a particular equation is satisfied, it sends a particular response, and if the equation is not satisfied it sends a different response (or just doesn't send) is that right? I'll try to make a reasonable effort to answer reasonable questions as time permits. It should work fine, and you're free to review the code to verify I haven't done anything malicious. Note that this script is not approved by the Streamlabs Chatbot support (nor am I familiar with a procedure for submitting it to be approved) and I provide it under the MIT license (i.e. But then if you install this parameter script, you can use it in regular commands instead of implementing each command with yet more custom scripting. ![]() The parameter is itself implemented in a Python script, so you'd still have to set your bot up to use Python scripts. UPDATE - After writing the original answer below, I realized that regular commands would be able to handle many cases if there were a suitable parameter, like $if('expr', 'true-response', 'false-response').
0 Comments
Leave a Reply. |