Forum

trivia commands !st...
 
Notifications
Clear all

[Solved] trivia commands !start and !stop


asL pLs
(@aslpls)
Eminent Member
Joined: 1 year ago
Posts: 25
Topic starter  

Hello BlackShadow,

 

can you update the commands for the trivia to;

 

!start  - trivia start

!stop - trivia stop.

 

 

right now, this is my setting

 

trivia 2

 

 

if user starts the trivia by typing !trivia - trivia starts  but they cannot stop the trivia by typing again !trivia.

 

trivia 1

 

Tuko started the trivia.. and Ehra stop the trivia but not stopped.

again Tuko type !trivia to stop but still not working.

 

asl_pls me as owner bot, i can start and stop the trivia.

trivia

 

 

I need users can stop the trivia .. and we can use the commands

 

!start  - trivia start

!stop - trivia stop

 

 

 

Thank you for the support,


Quote
BLaCkShaDoW
(@blackshadow)
Member Admin
Joined: 1 year ago
Posts: 97
 
bind pub - $trivia(char)start trivia:start_2
bind pub - $trivia(char)stop trivia:stop_2

###
proc trivia:start_2 {nick host hand chan arg} {
	global trivia
if {![info exists trivia(started)]} {
	set trivia(started) 1
	set trivia(starting_time) [unixtime]
	trivia:tell "" $trivia(channel) 1 "" 0
if {[info exists trivia(autostop_time)]} {
	unset trivia(autostop_time)
	}
if {[info exists trivia(autostop_true)]} {
	unset trivia(autostop_true)
	}
	utimer 5 [list trivia:start_game]
if {![info exists trivia(bonus_start_timer)]} {
	set trivia(bonus_start_timer) 1
	utimer [expr $trivia(bonus_ques_show) * 60] [list trivia:bonus_question_timer]
	}
if {$trivia(advertise_time) != ""} {
	utimer [expr $trivia(advertise_time) * 60] [list trivia:advertise_timer]
	}
if {$trivia(topshow_time) != ""} {
	utimer [expr $trivia(topshow_time) * 60] [list trivia:top10show_timer]
		}
	}
}

###
proc trivia:stop_2 {nick host hand chan arg} {
	global trivia
if {[info exists trivia(started)]} {
	set trivia(end_time) [unixtime]
	set trivia_run [trivia:time_return [expr $trivia(end_time) - $trivia(starting_time)]]
	trivia:tell "" $trivia(channel) 8 [list $trivia_run] 0
	foreach tmr [utimers] {
if {[string match "*trivia:start_game*" [join [lindex $tmr 1]]]} {
	killutimer [lindex $tmr 2]
	}
if {[string match "*trivia:bonus_question_timer*" [join [lindex $tmr 1]]]} {
	killutimer [lindex $tmr 2]
	}
if {[string match "*trivia:advertise_timer*" [join [lindex $tmr 1]]]} {
	killutimer [lindex $tmr 2]
	}
if {[string match "*trivia:top10show_timer*" [join [lindex $tmr 1]]]} {
	killutimer [lindex $tmr 2]
	}
}
	trivia:save_roundplayers
	trivia:reset
	trivia:end 0
	}
}
This post was modified 4 months ago by BLaCkShaDoW

ReplyQuote
asL pLs
(@aslpls)
Eminent Member
Joined: 1 year ago
Posts: 25
Topic starter  

where should i add this? from the script


ReplyQuote
BLaCkShaDoW
(@blackshadow)
Member Admin
Joined: 1 year ago
Posts: 97
 

@aslpls paste the code in BlackTrivia.tcl


ReplyQuote
asL pLs
(@aslpls)
Eminent Member
Joined: 1 year ago
Posts: 25
Topic starter  

@blackshadow

 

i have added the code in the script.

xXxX

 

and this is the result..

image

<BUGOY> [0434] Tcl error [trivia can't read "option": no such variable

 


ReplyQuote
BLaCkShaDoW
(@blackshadow)
Member Admin
Joined: 1 year ago
Posts: 97
 

I modified the code above, please try again


ReplyQuote
asL pLs
(@aslpls)
Eminent Member
Joined: 1 year ago
Posts: 25
Topic starter  

thank you for the support. it is working now. 


ReplyQuote
Share: