In your mIRC folder, create a file called
q.txt in the following format:
- question
[color:green]answer
question
answer[/color]
(odd lines = questions; even lines = answers)
Enter this code into the Scripts Editor (Alt+R):
On me:*:join:[color:blue]#chan:{
- if !$isfile(q.txt) {
echo -gtc info # * Note: couldn't find $mircdirq.txt (questions file)
return
}
if $hget(q) { hfree q }
hmake q
hload q q.txt
}
On *:text:*:
#chan:{
- if $hget(q,$strip($1-)) { msg # $ifmatch }
}[/color]
Change both occurrences of
#chan to the name of the channel where the script will take effect.
Connect the bot, and get somebody to type one of your defined questions. The bot will then message the channel with the corresponding answer.