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 

trivia.tcl autostart

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


Joined: 17 Sep 2007
Posts: 2

PostPosted: Fri Dec 19, 2008 11:05 am    Post subject: trivia.tcl autostart Reply with quote

I am using a modified version of trivia.tcl and it currently needs someone to type a command to start the game. The channel it runs in has a lot of trivia addicts and i would like it to auto start when the bot runs.

The bot is running on a cron so it is rare that this is needed, however as i'm learning tcl as i play, it would be nice to add this modification to the code.

below is the code that traps the command if it is typed in the channel. Could anyone help me add something that will either call this procedure or start the game when the bot either restarts due to a server issue or restarts due to someone accessing the command via the partyline.

Thanks in advance

#starts the game if it isn't running.
proc tgstart {nick host hand chan text} {
global tgplaying tgstreak tgchan tgerrremindtime tgerrremindtimer tgmissed
if {[strlwr $tgchan]==[strlwr $chan]} {
if {$tgplaying==0} {
tggamemsg "[tgcolstart]Trivia game started by $nick!"
tgnextq
set tgplaying 1
set tgstreak 0
set tgmissed 0
set tgerrremindtimer [timer $tgerrremindtime tgerrremind]
}
}
}
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