mIRC Home    About    Download    Register    News    Help

Print Thread
#252091 20/03/15 07:25 PM
Joined: Mar 2015
Posts: 14
V
vip3r22 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2015
Posts: 14
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.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Mar 2015
Posts: 14
V
vip3r22 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2015
Posts: 14
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.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Mar 2015
Posts: 14
V
vip3r22 Offline OP
Pikka bird
OP Offline
Pikka bird
V
Joined: Mar 2015
Posts: 14
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