TCLDROP
Would you like to react to this message? Create an account in a few clicks or log in to continue.
TCLDROP

Eggdrop And TCL Help, Support And Chat
 
HomeHome  PublicationsPublications  FAQFAQ  SearchSearch  MemberlistMemberlist  Latest imagesLatest images  UsergroupsUsergroups  RegisterRegister  Log in  CalendarCalendar  WebsiteWebsite  ChatRoomChatRoom  

 

 Random Line Of Text When Bots Name Is Said

Go down 
3 posters
AuthorMessage
Poul
Guest




Random Line Of Text When Bots Name Is Said Empty
PostSubject: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/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.
Back to top Go down
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/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.
Back to top Go down
Poul
Guest




Random Line Of Text When Bots Name Is Said Empty
PostSubject: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/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....
Back to top Go down
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/6/2020, 19:37

Do you have a error un PartyLine ?
Back to top Go down
Poul2
Guest




Random Line Of Text When Bots Name Is Said Empty
PostSubject: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/6/2020, 20:01

no errors any wheres
Back to top Go down
Poul
Voice
Voice



Posts : 6
Points : 8
Reputation : 0
Join date : 2020-06-27

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/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
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/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"
}
Back to top Go down
http://www.computer-tech1.webnode.co.uk
Poul
Voice
Voice



Posts : 6
Points : 8
Reputation : 0
Join date : 2020-06-27

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/6/2020, 23:13

still nothing
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty27/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\ Laughing

got any ideas ?

ComputerTech likes this post

Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty28/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"
      }
   }
}
Back to top Go down
Poul
Voice
Voice



Posts : 6
Points : 8
Reputation : 0
Join date : 2020-06-27

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty28/6/2020, 13:08

It Works!!!!! Thank you so much
Back to top Go down
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty28/6/2020, 16:10

Great Very Happy

Special Thanks To Bds for being a great Member and Coder Cool
Back to top Go down
http://www.computer-tech1.webnode.co.uk
BdS
Moderator
Moderator
BdS


Posts : 33
Points : 33
Reputation : 0
Join date : 2020-05-08
Location : France

Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty29/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"
  }
}
Back to top Go down
Sponsored content





Random Line Of Text When Bots Name Is Said Empty
PostSubject: Re: Random Line Of Text When Bots Name Is Said   Random Line Of Text When Bots Name Is Said Empty

Back to top Go down
 
Random Line Of Text When Bots Name Is Said
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TCLDROP :: TCL :: Script Requests-
Jump to: