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 

Alternative commands in BogusTrivia

 
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: Fri Jul 15, 2016 3:22 am    Post subject: Alternative commands in BogusTrivia Reply with quote

Is possible alternative commands to turn on and off the trivial ?

Example commands for play: !start or !comenzar
Example commands for stop: !stop or !detener

If you could modify that , commands can be understood by Spanish and English speakers.
_________________
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
d3n
Voice


Joined: 13 Jul 2016
Posts: 15
Location: Italy

PostPosted: Fri Jul 15, 2016 5:31 am    Post subject: Reply with quote

go to file t-2.settings.tcl and edit this line
Code:

set t2(on) "!trivia"      ;# public trigger to turn game on #
set t2(off) "!strivia"        ;# public trigger, game off  ("" = same as on trigger)

!trivia on !comenzar
!strivia on !detener

try and let me know if it works.......
Back to top
View user's profile Send private message Visit poster's website
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Fri Jul 15, 2016 8:57 am    Post subject: Reply with quote

if I use this, I just change the names of the commands, but I cannot use altenatives commands.

What I want is that Trivial could be started and stopped with two differents commands.

Example:
Quote:
@oper: !start
@BoT: BogusTrivia loading......
@oper: !stop
@BoT: BogusTrivia stopped.
@oper: !comenzar
@BoT: BogusTrivia loading......
@oper: !detener
@BoT: BogusTrivia stopped.

_________________
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: Fri Jul 15, 2016 6:22 pm    Post subject: Reply with quote

juanamores

I am working on this request.
_________________
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
SpiKe^^
Owner


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

PostPosted: Fri Jul 15, 2016 11:32 pm    Post subject: BogusTrivia: multiple on and/or off triggers. Reply with quote

Great request juanamores.

Making that happen for you will require quite a bit of editing of the t-2.tcl file. If you are careful and follow these directions exactly, you should be able to do the editing:)


1) Find this line in the t-2.tcl file...
Code:
 set v(tls2) "chan on off upubq hint p-cmdpre m-cmdpre hintchar"
and make it look more like this...
Code:
 set v(tls2) "chan upubq hint p-cmdpre m-cmdpre hintchar"



2) Then Find this line...
Code:
 set v(tls3) "p-mystat p-opstat p-info p-owner p-page p-top-d p-t20-d p-tmor-d"
and make it look more like this...
Code:
 set v(tls3) "on off p-mystat p-opstat p-info p-owner p-page p-top-d p-t20-d p-tmor-d"



3) Next find this chunk of code...
Code:
 if {$t2(p-cmdpre) ne "."} {
   foreach x {on off} {  set y $t2($x)
    if {[string match .* $y]} {  set t2($x) "$t2(p-cmdpre)[string range $y 1 end]"  }
   }
 }
and delete that entire chunk of code (All 5 lines)


4) Then Find these two lines...
Code:
if {$t2(off) ne $t2(on)} {  bind pubm $t2(sflag) "$t2(chan) $t2(off)" TOnOff  }
bind pubm $t2(oflag) "$t2(chan) $t2(on)" TOnOff
delete those 2 lines and replace them with these...
Code:
foreach ttmp(x) $t2(on) {  bind pubm - "$t2(chan) $ttmp(x)" TOnOff  }
if {$t2(off) ne $t2(on)} {
  foreach ttmp(x) $t2(off) {
   if {[lsearch -nocase $t2(on) $ttmp(x)]=="-1"} {
     bind pubm - "$t2(chan) $ttmp(x)" TOnOff
   }
  }
}



5) Then Find this line...
Code:
   if {$from=="0" && ![string match -nocase $t2(on) $tx]} {  return 0  }
delete that line and replace it with these...
Code:
   if {$from=="0"} {
     if {[lsearch -nocase $t2(on) $tx]=="-1"} {  return 0  }
     if {$t2(oflag) ne "-" && $hn eq "*"} {  return 0  }
     if {$t2(oflag) ne "-" && ![matchattr $hn $t2(oflag) $ch]} {  return 0  }
   }



6) Then Find this line...
Code:
   if {$from=="0" && ![string match -nocase $t2(off) $tx]} {  return 0  }
delete that line and replace it with these...
Code:
   if {$from=="0"} {
     if {[lsearch -nocase $t2(off) $tx]=="-1"} {  return 0  }
     if {$t2(sflag) ne "-" && $hn eq "*"} {  return 0  }
     if {$t2(sflag) ne "-" && ![matchattr $hn $t2(sflag) $ch]} {  return 0  }
   }



7) Save & close the t-2.tcl file, and now edit the t-2.settings.tcl file. Find this chunk of code in the t-2.settings.tcl file...
Code:
set t2(on) ".t2"      ;# public trigger to turn game on #
set t2(off) ""        ;# public trigger, game off  ("" = same as on trigger) #
set t2(oflag) "o|o"   ;# flags to turn the game on ("" = everyone) #
set t2(sflag) ""      ;# flags to turn game off    ("" = same as on flags) #
                      ;# separate off flags requires using separate on & off triggers #
and make it look more like this...
Code:
set t2(on) "!start !comenzar"      ;# public trigger(s) to turn game on #
set t2(off) "!stop !detener"       ;# public trigger(s), game off  ("" = same as on trigger(s)) #
set t2(oflag) "o|o"   ;# flags to turn the game on ("" = everyone) #
set t2(sflag) ""      ;# flags to turn game off    ("" = same as on flags) #
                      ;# Separate off flags No Longer Requires using separate on & off triggers !! #



8) Save & close the t-2.settings.tcl file. Upload the t-2.tcl & t-2.settings.tcl files to the shell and rehash the bot.


Please test this code and report back.
_________________
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 Jul 16, 2016 5:20 am    Post subject: Reply with quote

SpiKe^^ it works perfectly, thank you so much! Very Happy

So, as far as I can see, that could allow to make it able to play in several channels, right ?

When you'll hace a minute I would thank you to helping me in that.
_________________
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 Jul 16, 2016 5:50 am    Post subject: Reply with quote

No, not at all.

BogusTrivia will probably never be a multi-channel script.
_________________
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 Jul 16, 2016 4:38 pm    Post subject: Reply with quote

SpiKe^^ wrote:
No, not at all.

BogusTrivia will probably never be a multi-channel script.


Ok, I assumed it would be difficult the cuestion of databases of users and scores.
Thank you
_________________
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
sky6419
Voice


Joined: 17 Jan 2014
Posts: 20

PostPosted: Sat Jul 30, 2016 3:40 pm    Post subject: Reply with quote

Hello asked a question in this section do not know if it is correct.
However the question is how can I accept the answers of those who write the script colored bogus trivia?
Back to top
View user's profile Send private message
SpiKe^^
Owner


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

PostPosted: Sat Jul 30, 2016 6:46 pm    Post subject: Reply with quote

sky6419

Try turning on the strip colors setting, it is off by default...
Code:

# strip color codes from players answers # requires eggdrop 1.6.17+ #
# allow BogusTrivia to accept answers typed in color ? #
# this will have the bot remove color codes to look for an answer match #
set t2(stripcolor) "1"   ;# (1=yes | 0=no) #


_________________
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
sky6419
Voice


Joined: 17 Jan 2014
Posts: 20

PostPosted: Sun Jul 31, 2016 3:16 am    Post subject: Reply with quote

Thank you so much you could tell me the guides for writing tcl? Very Happy SpiKe^^.
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