OkyAnuS
15-09-2007, 18:02
#######################################
# Ai.tcl 0.1 by TicariChat
#
# Set the next lines as the triggers and random responses you want
set ai_data {
{
"*trigger #1*" {
"trigger #1 response #1"
"trigger #1 response #2"
}
}
{
"trigger #2*" {
"trigger #2 response #1"
"trigger #2 response #2"
}
}
{
"*trigger #3" {
"trigger #3 response #1"
"trigger #3 response #2"
}
}
}
# Set the next line as the channels you want to run in
set ai_chans "#testchannel1 #testchannel2"
bind pubm - * pub_ai
putlog "*** Ai.tcl 0.1 by TicariChat loaded"
proc pub_ai {nick uhost hand chan arg} {
global ai_data ai_chans botnick
if {(([lsearch -exact [string tolower $ai_chans] [string tolower $chan]] != -1) || ($ai_chans == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
foreach i $ai_data {
if {[string match [string tolower [lindex $i 0]] [string tolower $arg]]} {
putserv "PRIVMSG $chan :[subst [lindex [lindex $i 1] [rand [llength [lindex $i 1]]]]]"
}
}
}
}
# Ai.tcl 0.1 by TicariChat
#
# Set the next lines as the triggers and random responses you want
set ai_data {
{
"*trigger #1*" {
"trigger #1 response #1"
"trigger #1 response #2"
}
}
{
"trigger #2*" {
"trigger #2 response #1"
"trigger #2 response #2"
}
}
{
"*trigger #3" {
"trigger #3 response #1"
"trigger #3 response #2"
}
}
}
# Set the next line as the channels you want to run in
set ai_chans "#testchannel1 #testchannel2"
bind pubm - * pub_ai
putlog "*** Ai.tcl 0.1 by TicariChat loaded"
proc pub_ai {nick uhost hand chan arg} {
global ai_data ai_chans botnick
if {(([lsearch -exact [string tolower $ai_chans] [string tolower $chan]] != -1) || ($ai_chans == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
foreach i $ai_data {
if {[string match [string tolower [lindex $i 0]] [string tolower $arg]]} {
putserv "PRIVMSG $chan :[subst [lindex [lindex $i 1] [rand [llength [lindex $i 1]]]]]"
}
}
}
}