| Random Line Of Text When Bots Name Is Said | |
|
|
Author | Message |
---|
Poul Guest
| Subject: Random Line Of Text When Bots Name Is Said 27/6/2020, 00:13 | |
| I need a start to figure out to make a script so that when a bots name is mentioned any wheres in a line of text it will say a random quote. |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: Random Line Of Text When Bots Name Is Said 27/6/2020, 09:15 | |
| You can start with this script: - Code:
-
set randomLine [list "blablabla" "hehehe" "gegegege" "pif paf pouf" "lalalala"]
bind pubm - "* $botnick *" dop:answer proc dop:answer {nick host hand chan arg} { global randomLine set autoanswer [lindex $randomLine [rand [llength $randomLine]]] putserv "privmsg $chan :$autoanswer" }
I haven't tested it, but it should work. | |
|
| |
Poul Guest
| Subject: Random Line Of Text When Bots Name Is Said 27/6/2020, 18:31 | |
| set randomLine [list "Stop Molesting Me!" "Your House Or Mine" "Gigity Giity" "Oh My That Was A Great Fart" "Meow Meow Meow Meow Meow Meow"]
bind pubm - "* $botnick *" dop:answer proc dop:answer {nick host hand chan arg} { global randomLine set autoanswer [lindex $randomLine [rand [llength $randomLine]]] putserv "privmsg $chan :$autoanswer" }
---- It isn't saying anything in the channel.... |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: Random Line Of Text When Bots Name Is Said 27/6/2020, 19:37 | |
| Do you have a error un PartyLine ? | |
|
| |
Poul2 Guest
| Subject: Random Line Of Text When Bots Name Is Said 27/6/2020, 20:01 | |
| |
|
| |
Poul Voice
Posts : 6 Points : 8 Reputation : 0 Join date : 2020-06-27
| Subject: Random Line Of Text When Bots Name Is Said 27/6/2020, 20:25 | |
| I almost feel as if there should be a var set to say the actual name of the channel you want to have it say it in, just not sure about how to do that | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: Random Line Of Text When Bots Name Is Said 27/6/2020, 21:55 | |
| Perhaps try changing the trigger to make sure $botnick isnt the problem - Code:
-
set randomLine [list "blablabla" "hehehe" "gegegege" "pif paf pouf" "lalalala"]
bind pubm - "test" dop:answer proc dop:answer {nick host hand chan arg} { global randomLine set autoanswer [lindex $randomLine [rand [llength $randomLine]]] putserv "privmsg $chan :$autoanswer" } | |
|
| |
Poul Voice
Posts : 6 Points : 8 Reputation : 0 Join date : 2020-06-27
| Subject: Random Line Of Text When Bots Name Is Said 27/6/2020, 23:13 | |
| | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: Random Line Of Text When Bots Name Is Said 27/6/2020, 23:49 | |
| @Bds tried this code - Code:
-
set randomLine [list "blablabla" "hehehe" "gegegege" "pif paf pouf" "lalalala"]
bind pub - "* nick *" dop:answer proc dop:answer {nick host hand chan arg} { global randomLine set autoanswer [lindex $randomLine [rand [llength $randomLine]]] putserv "privmsg $chan :$autoanswer" } but it shows these results - Code:
-
<Techer> gegegege <ComputerTech> tech <Techer> blablabla <ComputerTech> / tech
see the way when anything is infront of tech it doesnt work, i dont know why this wouldn't work\ got any ideas ? | ComputerTech likes this post |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: Random Line Of Text When Bots Name Is Said 28/6/2020, 10:42 | |
| - Code:
-
set randomLine [list "blablabla" "hehehe" "gegegege" "pif paf pouf" "lalalala"]
bind pubm - * dop:answer
proc dop:answer {nick uhost hand chan arg} { set arg [stripcodes uacgbr $arg] foreach word [string tolower $arg] { if {[string match -nocase $::botnick $word]} { set autoanswer [lindex $::randomLine [rand [llength $::randomLine]]] putserv "privmsg $chan :$autoanswer" } } }
| |
|
| |
Poul Voice
Posts : 6 Points : 8 Reputation : 0 Join date : 2020-06-27
| Subject: Random Line Of Text When Bots Name Is Said 28/6/2020, 13:08 | |
| It Works!!!!! Thank you so much | |
|
| |
ComputerTech Owner
Posts : 99 Points : 268 Reputation : 0 Join date : 2020-04-30
| Subject: Re: Random Line Of Text When Bots Name Is Said 28/6/2020, 16:10 | |
| Great Special Thanks To Bds for being a great Member and Coder | |
|
| |
BdS Moderator
Posts : 33 Points : 33 Reputation : 0 Join date : 2020-05-08 Location : France
| Subject: Re: Random Line Of Text When Bots Name Is Said 29/6/2020, 16:02 | |
| you can use this version of code, lighter in resource for the eggdrop: - Code:
-
set randomLine [list "blablabla" "hehehe" "gegegege" "pif paf pouf" "lalalala"] bind pubm - "* $::botnick*" dop:answer proc dop:answer {nick uhost hand chan text} { set arg [split [stripcodes uacgbr $text]] if {[lsearch -nocase $arg $::botnick]!= -1} { set autoanswer [lindex $::randomLine [rand [llength $::randomLine]]] putserv "privmsg $chan :$autoanswer" } }
| |
|
| |
Sponsored content
| Subject: Re: Random Line Of Text When Bots Name Is Said | |
| |
|
| |
| Random Line Of Text When Bots Name Is Said | |
|