mIRC Home    About    Download    Register    News    Help

Print Thread
#252091 20/03/15 07:25 PM
V
vip3r22
vip3r22
V
I've been searching for this but haven't had any luck, if someone can point me in the right direction or let me know if this is even possible:
I have a Twitch bot that I would like to have set up to where it selects a random command that viewers will try to guess. They will be given hints as to what the command is. My problem is 'activating' a new random command every time one is correctly guessed and also assigning the correct clues/hints to each command. Thanks for any insight on this. DISCLAIMER: I'm still pretty new to this stuff, but I generally learn pretty quickly.

#252092 20/03/15 09:17 PM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
You should probably learn to use ini files for something like this

I imagine that you could build an ini file like so:

[Command1]
Hint1=Hint 1 Text
Hint2=Hint 2 Text

[Command2]
Hint1=Hint 1 Text

etc.

Then just random between the content of the file's sections using $ini.

/help $ini
/help $readini
/help $rand

You can build a command using these things

V
vip3r22
vip3r22
V
But is it possible to set it up so that only 1 command will respond at a time? For example, if command 1 is !apples and command 2 is !cherry, they would have similar hints so I wouldn't want command 2 to respond if that was someone's guess. Thanks for the response.

#252112 22/03/15 05:33 PM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
Of course it is, you can script pretty much whatever it is you want, especially if it's text based responses.

You can set up however many if statements in your scripts as you please.

V
vip3r22
vip3r22
V
Okay nice! Thanks for the help, I wanted to be sure this could be done before I dug into it more.


Link Copied to Clipboard