| View previous topic :: View next topic |
| Author |
Message |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Thu Apr 02, 2020 2:19 am Post subject: Idle time channel talk script |
|
|
Hi all,
Can someone pls write a script which watches the idle time of the channel (configured in the script in min) and if this time passed the bot randomly chooses a sentence from a txt file and send it to the channel.
In this txt we might use actions as well (\001ACTION blalalabla).
The script should be on/off with a flag via DCC.
Thanks in advance! |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Thu Apr 02, 2020 1:50 pm Post subject: |
|
|
| CrazyCat wrote: | You can have an eye on Reanimator made by MenzAgitat.
Explanations are in french, sorry. |
Thank you CrazyCat, I tried the script but I got a strange error msg:
"[Reanimator - Error] The version of your Eggdrop is 1.8.4 1080404; Reanimator will only work correctly on Eggdrops version 1.6.20 or higher."
Translation is made by google translate. I don't speak French. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Tue Apr 14, 2020 3:32 am Post subject: |
|
|
This is a weel known trouble, you can easily correct it
Find the line containing:
| Code: | | if { [regsub -all {\.} [lindex $::version 0] ""] < 1620 } |
Replace this previous code with:
| Code: | | if { [package vcompare [regexp -inline {^[[:digit:]\.]+} $::version] 1.6.20] == -1 } |
_________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Tue Apr 21, 2020 9:22 am Post subject: |
|
|
| This script is in French Lang I guess. English not Available? |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Tue Apr 21, 2020 9:44 am Post subject: |
|
|
i can translate it will do it in a few i will give you a english version  _________________ ComputerTech |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Tue Apr 21, 2020 10:20 am Post subject: |
|
|
| ComputerTech wrote: | i can translate it will do it in a few i will give you a english version  |
Please Do  |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Wed Apr 22, 2020 2:33 pm Post subject: |
|
|
| CrazyCat wrote: | This is a weel known trouble, you can easily correct it
Find the line containing:
| Code: | | if { [regsub -all {\.} [lindex $::version 0] ""] < 1620 } |
|
Hello CrazyCat,
I cant find this line in my script.
I have v1.2 You can check it here:
https://pastebin.com/U9Gb9Nr2 |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Apr 22, 2020 2:58 pm Post subject: |
|
|
Line 97 you got this:
| Code: |
if { [join [split [::tcl::string::range [lindex $version 0] 0 5] "."] ""] < 1620 } { putloglev o * "\00304\002\[Reanimator - Erreur\]\002\003 La version de votre Eggdrop est \00304\002$version\002\003; Reanimator ne fonctionnera correctement que sur les Eggdrops version 1.6.20 ou sup�rieure." ; return }
|
but it's different.
@CrazyCat Why don't you go with something simple like:
| Code: |
if {[catch {package require "eggdrop 1.6.20"} err]} {
# user doesn't have eggdrop 1.6.20 or whatever you want to set
}
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Wed Apr 22, 2020 3:30 pm Post subject: |
|
|
Is this correct:
| Code: | | if { [package vcompare [regexp -inline {^[[:digit:]\.]+} $::version] 1.6.20] == -1 } {putloglev o * "\00304\002\[Reanimator - Error - Please upgrade your Eggdrop to 1.6.20 or above!" ; return } | ? |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Wed Apr 22, 2020 5:48 pm Post subject: |
|
|
I'm not the creator nor the maintainer of this script, but if I remember well, this way to check the eggdrop version is made to bypass a changement of version notation introduced in branch 1.8.
I'll try to find the conversation / explanation about that.
btw, the short code (made by the author of Reanimator) works well and is validated by himself (lol) and me (lol bis) _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Wed Apr 22, 2020 6:44 pm Post subject: |
|
|
whoops i forgot to translate that script sorry will do it as soon as i can  _________________ ComputerTech |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Wed Apr 22, 2020 8:27 pm Post subject: |
|
|
wait a minute i just realised all you want is a anti idle script that says random messages from a txt file if nobody talks on a channel easy
http://tclarchive.org/download.php?id=1194
 _________________ ComputerTech |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Apr 23, 2020 12:45 am Post subject: |
|
|
@CrazyCat It runs just fine on my eggdrop version 1.8.4 as you can see:
| Code: |
.tcl package require eggdrop
Tcl: 1.8.4
.tcl catch {package require "eggdrop 1.6.20"} err
Tcl: 1
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Thu Apr 23, 2020 3:27 am Post subject: |
|
|
I know that MenzAgitat had troubles with some versions having letters in the version. Can't remember which version it was, neither if it was eggdrop or windrop. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
|