This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

TCL script wich let the eggdrop talk every 5 min

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
a
afrit
Voice
Posts: 7
Joined: Sat Jan 06, 2024 11:54 pm

TCL script wich let the eggdrop talk every 5 min

Post by afrit »

hello everyone , please can you provide me a script wich let the eggdrop talk every 5 min on channel ? saying some words

thank you very much
User avatar
CrazyCat
Revered One
Posts: 1304
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: TCL script wich let the eggdrop talk every 5 min

Post by CrazyCat »

Can you be more explicit ?
proc autospeak {min hour day month dow} {
   putserv "PRIVMSG #yourchan :I'm an automated sentence"
}

bind cron - "*/5 * * * *" autospeak
a
afrit
Voice
Posts: 7
Joined: Sat Jan 06, 2024 11:54 pm

Re: TCL script wich let the eggdrop talk every 5 min

Post by afrit »

hello mister CrazyCat i want to add a tcl script to my eggdrop wich can allow the eggdrop to post on my channel every 5 minutes a specifique message from list bellow

{
"#ircseure Rules : https ://somethins "
"For help cotact Afrit"
"#ircsecure moderated by Afrit please wait to be voiced by the bot"
}
a
afrit
Voice
Posts: 7
Joined: Sat Jan 06, 2024 11:54 pm

Re: TCL script wich let the eggdrop talk every 5 min

Post by afrit »

i made this one with the code provider by CrazyCat it's working fine but he can't read "!start" or any word with !
he is reading olny text without "!" how i can resolve that ???
error msg : [20:01:00] Tcl error [autospeak]: can't read "greetmsg": no such variable

Code: Select all

# Set here the your msgs.
set mygreetmsgs {
  
  "!start"
  "!hint"
  "Oh là laaaa je suis fatigué"
  "je re , Smoke Time !!!"
  "!hint"
  "c'est fatiguant  , d'être un robot Ouuuff!!!"
  "!stop"
  "!w rabat"
}

### DONT EDIT BELOW ###
proc greetTrig {} {
  global mygreettrig
  return $mygreettrig
}

setudef flag autogreetings
 
bind join - * greet:msg
bind pub - ${mygreettrig}greets greet:pub


proc autospeak {min hour day month dow} {
   putserv "PRIVMSG #yourchan $greetmsg"
}

bind cron - "*/5 * * * *" autospeak

putlog "autotalk.tcl,v1.1:. Loaded! - By CrazyCat"

User avatar
CrazyCat
Revered One
Posts: 1304
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: TCL script wich let the eggdrop talk every 5 min

Post by CrazyCat »

This is a nice "fourre-tout", but I think you lack the bases of tcl scripting.
I'll make a script tomorrow, with a lot of comments to explain how it works. And if I find time, I'll explain you the main errors you made.

But for now, it's sleepin' time.

P.S.: contact me using MP about your registration @ forum.eggdrop.fr, I'll give you a password to let you access the forum & your account
a
afrit
Voice
Posts: 7
Joined: Sat Jan 06, 2024 11:54 pm

Re: TCL script wich let the eggdrop talk every 5 min

Post by afrit »

thank you boss Crazy Cat
User avatar
CrazyCat
Revered One
Posts: 1304
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: TCL script wich let the eggdrop talk every 5 min

Post by CrazyCat »

I don't understand exactly what you plan to do, there are several parts:
- the automatic sentence each 5 minutes: I guess you want to display a random sentence
- a greet message (on join) : another random sentence (different from the previous ?)
- some triggers like !start, !stop, !hint, but I don't know what you want to do with them.
a
afrit
Voice
Posts: 7
Joined: Sat Jan 06, 2024 11:54 pm

Re: TCL script wich let the eggdrop talk every 5 min

Post by afrit »

i have a eggdrop which i want him to choose from the list and send to channel every 5 minutes
list :
{

"!start"
"!hint"
"Oh là laaaa je suis fatigué"
"je re , Smoke Time !!!"
"!hint"
"c'est fatiguant , d'être un robot Ouuuff!!!"
"!stop"
"!w rabat"
}
User avatar
CrazyCat
Revered One
Posts: 1304
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: TCL script wich let the eggdrop talk every 5 min

Post by CrazyCat »

So the script is really simple:
set asmsg {
   "!start"
   "!hint"
   "Oh là laaaa je suis fatigué"
   "je re , Smoke Time !!!"
   "!hint"
   "c'est fatiguant , d'être un robot Ouuuff!!!"
   "!stop"
   "!w rabat"
}

proc autospeak {min hour day month dow} {
   putserv "PRIVMSG #yourchan :[lindex $::asmsg [rand [llength $::asmsg]]]"
}

bind cron - "*/5 * * * *" autospeak
It's exactly the same I did before but it chooses a random element in the $asmsg list
a
afrit
Voice
Posts: 7
Joined: Sat Jan 06, 2024 11:54 pm

Re: TCL script wich let the eggdrop talk every 5 min

Post by afrit »

thank you very much Mr CrazyCat it's working perfecly :D :D :D :D :D :D :D
Post Reply