Hey Guys It's Me S1L3NC3 Im wondering if someone can make or help me make a custom trigger's script. By custom triggers I mean you program to set a value the bot responds, only to that value and you edit the output in which the bot responds with --- EX USER : user has quit) The Bot : See Ya Later Come Back! - - - - As you can see the user has quit the server the bot identifies that message it acknowledges that it's in the word list to " look for " and responds with an edited response in this case "See Ya Later Come Back!" So in other words i want a script that tell my eggdrop to look for a quit, when eggdrop see's that quit it sets a custom response I can edit ------ Thanks [_-S1L3NC3-0F-T4UTH-_] On FreeNode Eggdrops Help Channel
# leave this empty for all channels the bot is on
# or set the channel(s) for the script to run on
# Example: set quitChans {#yourchannel}
# Example: set quitChans {#chan #chan2 #chan3}
set quitChans {}
# set the trigger|reply text here. #
set quitText {
*Read error*|Ouch! That hurts.
*Bye*|See you later.
}
########## END SETTINGS ##########
bind sign - * quit:say
set quitChans [split [string tolower [string trim $quitChans]]]
set quitText [split [string trim $quitText] "\n"]
proc quit:say {nk uh hn ch rsn} { set ch [string tolower $ch]
if {$::quitChans ne "" && [lsearch -exact $::quitChans $ch]=="-1"} { return }
if {[string equal -nocase $::botnick $nk] || $rsn eq ""} { return }
foreach item $::quitText { set item [split $item |]
if {[string match -nocase [lindex $item 0] $rsn]} {
puthelp "PRIVMSG $ch :[lindex $item 1]" ; break
}
}
return
}
Great It works, but can you add a randomized option so it wont respond with the same output? EX - # set the trigger|reply text here. #
set quitText *Spark Out,Roger?*|Acknowledged, Echo Out.
*Quit: Spark Out,Roger?*|Confirmed, Catch Ya Later.
*Quit: Spark Out,Roger?*|Message Recieved| Until Next Time
}
So It one of those are randomly selected once at a time
# leave this empty for all channels the bot is on
# or set the channel(s) for the script to run on
# Example: set quitChans {#yourchannel}
# Example: set quitChans {#chan #chan2 #chan3}
set quitChans {}
# set the trigger|reply|reply2|reply3|morereplies text here. #
# put each different trigger on its own line.
# each trigger can have as many replies as you want.
set quitText {
*Spark Out,Roger?*|Confirmed, Catch Ya Later.|Message Recieved.|Until Next Time.
} ;# end of quitText #
########## END SETTINGS ##########
bind sign - * quit:say
set quitChans [split [string tolower [string trim $quitChans]]]
set quitText [split [string trim $quitText] "\n"]
proc quit:say {nk uh hn ch rsn} { set ch [string tolower $ch]
if {$::quitChans ne "" && [lsearch -exact $::quitChans $ch]=="-1"} { return }
if {[string equal -nocase $::botnick $nk] || $rsn eq ""} { return }
foreach item $::quitText { set item [split $item |]
if {[string match -nocase [string trim [lindex $item 0]] $rsn]} {
set reply [lrange $item 1 end]
puthelp "PRIVMSG $ch :[lindex $reply [rand [llength $reply]]]" ; break
}
}
return
}