Author Topic: Custom Commands Question  (Read 1670 times)

0 Members and 1 Guest are viewing this topic.

wonderwez

  • Youngling
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
  • Twitch Name: WonderWez
Custom Commands Question
« on: October 26, 2016, 06:03:44 AM »
Hi all! I have a question about how deep I can get with commands. I have an idea to have a command that viewers can enter into chat that would a) withdraw a certain amount of their currency, b) trigger an on-stream display of an image, txt file, or layer in OBS Studio, and c) have each successive use of the command trigger the next in the series.

To use an example, I want people to be able to use a command like "!factoid" and have it withdraw, let's say 20 points from their currency account and display the next in a series of pre-selected "facts" that I setup in advance. Ideally this facts would be ordered and on cooldown, meaning I'd have some max amount available per stream (one per half-hour, for example). For a three-hour stream, I'd have 6 facts setup and available to go. Users would not need to type !factoid1 or !factoid2, but each successive use of the !factoid command would trigger the next available in the series.

Is this something that is possible with deepbot? If not, I guess I can create a single graphic that could trigger, and then I could manually engage an OBS layer's visibility... but I'd of course prefer it be automated. :) Any help or direction is appreciated!

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Custom Commands Question
« Reply #1 on: October 26, 2016, 07:23:03 AM »
This is all possible. You would most likely use command chains, or even @exec@ to trigger commands. For on screen popups you could use OBS Remote, or Image-Only widget/Regular widget, depending on the need/want.

Image Only Widget: http://wiki.deepbot.tv/image_only_widget

OBS Studio Remote: http://wiki.deepbot.tv/obs_studio_remote
or
OBS Classic Remote: https://www.youtube.com/watch?v=WnH6M07pRVo

Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

wonderwez

  • Youngling
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
  • Twitch Name: WonderWez
Re: Custom Commands Question
« Reply #2 on: October 26, 2016, 07:30:09 AM »
Great to know this is a possibility! Is there somewhere you would recommend looking to get up-to-speed on command chains and @exec@? Also I was browsing the forums and came up with the idea that the command "!factoid" would actually link to a string of other commands with if statements, like when executing the "!factoid" command, it would check to see if "!factoid1" had been used, and if not, to use it. If it had been used, it would check to see if "!factoid2" had been used, and if not, to use it. Not sure if I'm barking up the wrong tree here and there's an easier way to do it, or what. Thanks!

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Custom Commands Question
« Reply #3 on: October 26, 2016, 08:08:55 AM »
@exec@ = Chain one or more commands from a single command. E.g. @exec@[5,!bot] will run !bot after 5 seconds.

Source: http://wiki.deepbot.tv/custom_commands

Yeah, probably use something with @if@, @savefile@, and @readfile@.

If you want, I can go about making a few of the !factoid commands and then you can adjust them as needed.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

wonderwez

  • Youngling
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
  • Twitch Name: WonderWez
Re: Custom Commands Question
« Reply #4 on: October 26, 2016, 11:32:23 PM »
Thanks so much. I'd love it if you could draft up something to help get me started. I'm reviewing the custom commands list now (especially the @if@ commands), but I'm guessing I'm going to get a little hung up with syntax. Unless there's some more straightforward way to accomplish it, what I'm thinking is setting up 6 different numbered factoid commands (!factoid1, !factoid2, etc.), and then having the primary "!factoid" command set to check @if@ !factoid1 has yet been run this session, if not, executes !factoid1, and if !factoid1 HAS been executed, then checks !factoid2, etc. Then I'd stick a cooldown on "!factoid" so I don't run out of factoids mid-stream :)

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Custom Commands Question
« Reply #5 on: October 27, 2016, 05:31:05 AM »
Thanks so much. I'd love it if you could draft up something to help get me started. I'm reviewing the custom commands list now (especially the @if@ commands), but I'm guessing I'm going to get a little hung up with syntax. Unless there's some more straightforward way to accomplish it, what I'm thinking is setting up 6 different numbered factoid commands (!factoid1, !factoid2, etc.), and then having the primary "!factoid" command set to check @if@ !factoid1 has yet been run this session, if not, executes !factoid1, and if !factoid1 HAS been executed, then checks !factoid2, etc. Then I'd stick a cooldown on "!factoid" so I don't run out of factoids mid-stream :)

Here is the initial command and first two factoids: http://pastebin.com/raw/F0m9z5yK
Extract into your Deepbot Folder > Custom Logs Folder: https://www.mediafire.com/?bf2inz98yx1u9w5

How to Import Commands: http://wiki.deepbot.tv/import_and_export_commands

It first checks to see if the user even has 20 points or more. If they do have 20 points or more, it runs !factoid1. Factoid1 then displays and writes a .txt file to say it has been used. Then when the command is ran again, it will check the Factoid1.txt file, if it says used, it will go to !factoid2check.

The command to reset the .txt files is !factoidreset. It will reset all .txt files to be used again.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport