This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
tahu
Voice
Posts: 14 Joined: Fri Feb 11, 2005 10:45 pm
Location: bandung
Contact:
Post
by tahu » Fri Feb 11, 2005 11:03 pm
proc g_timer_ask {} {
global botnick quizconf
global Answers AllAnswered RoundOver NumAnswered AnswerCount QuestionTimer
set x_ask $botnick {} {} $quizconf(quizchannel) {}
set Timer [utimer 10 Question]
}
i want to random this but i dont know how to do
plz help me!
no limit to learn
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Sat Feb 12, 2005 12:56 am
Randomize what exactly? All this code ever does is adding a timer that is executing another proc (Question) 10sec later.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Sat Feb 12, 2005 1:25 pm
in case you want to get a random element from a list you should read:
http://www.tcl.tk/man/tcl8.4/TclCmd/lindex.htm
and
DOC/TCL-COMMANDS section "rand"
I didn't say RTFM, did I?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
tahu
Voice
Posts: 14 Joined: Fri Feb 11, 2005 10:45 pm
Location: bandung
Contact:
Post
by tahu » Sat Feb 12, 2005 2:02 pm
-set x_ask $botnick {} {} $quizconf(quizchannel) {}
-set Timer [utimer 10 Question]
i mean first round set x_ask
and the second round set timer
something like that.
thanks.
no limit to learn
^DooM^
Owner
Posts: 772 Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:
Post
by ^DooM^ » Sat Feb 12, 2005 2:06 pm
I dunno bout you guys but I am still confused by their Question.. Tahu Please explain properly..
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sat Feb 12, 2005 2:42 pm
u mean the u timer should be random ??
try this
XplaiN but think of me as stupid
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Sat Feb 12, 2005 9:42 pm
maybe he wants to rotate like this?
Code: Select all
switch $qcounter {
1 {set x_ask $botnick {} {} $quizconf(quizchannel) {} }
2 {set Timer [utimer 10 Question] }
}
if { [incr qcounter] > 2 } { set qcounter 1 }
alternativly he can use [set qcounter [rand 2]] or something like this for randomize @_o.
PS: this is my last guess without detailed explainations ^^
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
tahu
Voice
Posts: 14 Joined: Fri Feb 11, 2005 10:45 pm
Location: bandung
Contact:
Post
by tahu » Mon Feb 14, 2005 9:04 am
i write like what u say [De Kus} but the bot can executing another command. the bot stuck.
i wrote like this
proc mx_timer_ask {} {
global botnick quizconf
global Timer
switch $qcounter {
1 {set x_ask $botnick {} {} $quizconf(quizchannel) {} }
2 {set Timer [utimer 10 Question] }
}
if { [incr qcounter] > 2 } { set qcounter 1 }
please give me another way . cos i'm new in this n i want learn but i dont know how to do
for clue i want rotate this 2 script
n please write with the proc
cos i dunno what must i write.
thanks.
no limit to learn
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Wed Feb 16, 2005 2:02 am
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...