i type hello baby on main channel but my eggdrop still answering.... now u understood what i mean? i wanna only response on hello guys and not only on word hello
dict set responses "hello" "heya %nick, welcome to %chan channel!"
dict set responses "beer?" "yeah %nick, hand me a cold one please!"
bind pubm * * fetch:response
proc fetch:response {nick uhost hand chan text} {
global responses
set text [split $text]
if {[lsearch -nocase [dict keys $responses] $text] != -1} {
set message [string map [list %chan $chan %nick $nick] [dict get $responses $text]]
puthelp "PRIVMSG $chan :$message"
}
}
In the first line the "hello" is the word it will trigger and the "heya %nick, welcome to %chan channel!" is the answer it will give to that.
Notice the presence of %nick and %chan that will be replaced with actual nick of the user that triggered the response and the %chan will be replaced with the actual name of the channel.
Haven't tested anything but he said it's working.
Once the game is over, the king and the pawn go back in the same box.