egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BogusTrivia automatic shutdown if no one plays

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Thu Mar 24, 2016 12:06 pm    Post subject: BogusTrivia automatic shutdown if no one plays Reply with quote

Dear, SpiKe^^:
You can modify the script so that the bot turns off automatic if no one is playing for space ..... minutes?

Regards
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 505
Location: Tennessee, USA

PostPosted: Thu Mar 24, 2016 7:09 pm    Post subject: Reply with quote

juanamores: BogusTrivia already has settings to do that, it's called idle-stop.

There are 2 settings that can enable idle-stop, in this section of the t-2.settings.tcl file...
Code:

# slow-times or idle-stop #  after this many questions with no one playing the game: #
# the times between hints & questions increase to these settings, #
# or idle-stop the bogustrivia game. #
set t2(sqcnt) "6"     ;# use slow-times or idle-stop after this many questions not played #
set t2(qslow) "20"    ;# slow time between hints (6 to 90 seconds) (0 = idle-stop the game) #
set t2(pslow) "25"    ;# slow time between questions (6 to 90 seconds) #
# Note: if set to less than play-times & more than 0, slow-times will be same as play #

# resting-times or idle-stop #  after this many questions with no one playing the game: #
# the times between hints & questions increase to these settings, #
# or idle-stop the bogustrivia game. #
set t2(rqcnt) "15"   ;# use resting-times or idle-stop after this many not played #
set t2(rest) "30"    ;# resting time between hints/questions (6 to 120) (0 = idle-stop the game) #
# Note: if set to less than slow-times & more than 0, rest-times will be same as slow #



Using the example above,
setting t2(qslow) to "0" would have the game stopping after no one plays for 6 questions
|OR|
setting t2(rest) to "0" would have the game stopping after no one plays for 15 questions.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sat Mar 26, 2016 2:39 pm    Post subject: Reply with quote

Thanks SpiKe^^, works!!.
but.....
Oops... on-join auto-start was activated when I set Idle-stop Confused
You can solve for the game may not start when users join the channels ?

Another thing..
You can put a custom message when it is turned off automatically because nobody has played ?
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 505
Location: Tennessee, USA

PostPosted: Sat Mar 26, 2016 6:04 pm    Post subject: Reply with quote

BogusTrivia has a LOT of settings, Please read the entire settings file and set them as you require.

Right below the 2 settings discussed above is the setting you are currently seeking...
Code:

# on-join auto-start #
# automaticly start bogustrivia when someone joins the channel ??  (0 = no) #
# Note:  for this to function, Idle-stop Must Be Turned ON!  #
# Note:  using the public off command overrides auto-start!  #
#        use the public on command to reactivate auto-start. #
# Note:  auto-start only triggers if bogus was idle-stopped. #
# 1 = silently start game  |  2 = say public  |  3 = say channel notice #
#  SEE BELOW:  Advanced On-Join Auto-Start Settings #
set t2(autostart) "2"

As stated in the settings file, setting t2(autostart) to "0" will disable on-join auto-start
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sat Mar 26, 2016 7:20 pm    Post subject: Reply with quote

Thanks SpiKe^^, I thought it was incompatible to set Idle-stop with on-join auto-start (Off).
For my little knowledge of English, I had misunderstood the following note:
# on-join auto-start #
# automaticly start bogustrivia when someone joins the channel ?? (0 = no) #
# Note: for this to function, Idle-stop Must Be Turned ON! #

Apologies, solved. Very Happy
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 505
Location: Tennessee, USA

PostPosted: Sat Mar 26, 2016 10:03 pm    Post subject: Custom idle-stop message for BogusTrivia Reply with quote

juanamores wrote:
Another thing..
You can put a custom message when it is turned off automatically because nobody has played ?


That could be done, but there is no current setting that does that.
You would have to edit the script code in t-2.tcl

Search for this line in the t-2.tcl file...
Code:
   putquick "PRIVMSG $ch :$t2(script) by $t2(auth) Stopped."


and replace that line with something more like...
Code:
   if {$uh eq "idle" && $hn eq "stop"} {
     putquick "PRIVMSG $ch :What you want to say on an idle-stop"
   } else {
     putquick "PRIVMSG $ch :$t2(script) by $t2(auth) Stopped."
   }

_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sat Mar 26, 2016 11:08 pm    Post subject: Reply with quote

I had already solved, in a perhaps less professional than yours form, but equally it worked well:
Code:
  if {$t2(qslow)=="0" } {
     putquick "PRIVMSG $ch :$t2(script) by $t2(auth) Stopped, because nobody has played in 6 questions."
   } else {
     putquick "PRIVMSG $ch :$t2(script) by $t2(auth) Stopped."
   }


Thanks SpiKe^^, for the excellent support provided.
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 505
Location: Tennessee, USA

PostPosted: Sun Mar 27, 2016 12:32 am    Post subject: Reply with quote

juanamores
Your method will make all game stops read as though it was stopped due to the game being idle, even when you stop the game manually with the off command.

Change your patch to look more like this...
Code:
   if {$uh eq "idle" && $hn eq "stop"} {
     putquick "PRIVMSG $ch :$t2(script) by $t2(auth) Stopped, because nobody has played in 6 questions."
   } else {
     putquick "PRIVMSG $ch :$t2(script) by $t2(auth) Stopped."
   }


That way the new edited stop message will only be used when the script idle-stops itself.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sun Mar 27, 2016 6:21 pm    Post subject: Reply with quote

I have performed the recommended way. Thank you Very Happy
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber