mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Looking for help on a simple choice selecting script.

!choice Yes No Maybe
<Bot> From Nickname's options I have selected: No

!choice "Bloody death" "I'm Fine" "Ow"
<Bot> From Nickname's options I have selected: Bloody death


So the user can input their own options through the command, and the bot picks one. The "quotes" are for selecting a phrase rather than a single word in the options.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Code:
on *:text:!choice ?*:#yourchannel:{
noop $regex($2-,/(?:^| )("[^"]+"|[^ ]+)(?= |$)/g)
msg $chan From $nick $+ 's options I have selected: $regml($r(1,$regml(0)))
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Oh thank you SO SO SO much!!!


Link Copied to Clipboard