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.
Help for those learning Tcl or writing their own scripts.
tahu
Voice
Posts: 14 Joined: Fri Feb 11, 2005 10:45 pm
Location: bandung
Contact:
Post
by tahu » Sun Nov 06, 2005 12:54 pm
hello ..
anybody can help me to tell about how to make random command for tcl script ?
thanks..
no limit to learn
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Nov 06, 2005 6:17 pm
What random commands?
]Kami[
Owner
Posts: 590 Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:
Post
by ]Kami[ » Sun Nov 06, 2005 6:49 pm
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Sun Nov 06, 2005 9:40 pm
Code: Select all
proc rand { {range 100} } {
return [expr {int(rand()*$range)}]
}
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Nov 07, 2005 7:41 am
Is that what he meant with random command?
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Nov 07, 2005 8:25 am
Sir_Fz wrote: Is that what he meant with random command?
I think so. I made an assumption based on dbl dutch.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
tahu
Voice
Posts: 14 Joined: Fri Feb 11, 2005 10:45 pm
Location: bandung
Contact:
Post
by tahu » Wed Nov 09, 2005 11:16 am
proc mx_timer_ask {} {
global botnick quizconf
global rankfile
global rankfile userlist timerankreset
global tgcurrentanswer tghinttimer tgtimenext tgchan
global tgnextqtimer tgstreak tgstreakmin
global tgscoresbyname tgranksbyname tgranksbynum
global tgcongrats tgscorestotal tgmissed
global tgtimestart tgshowallscores tgrealnames tgscoresbyrank
global tgtimeanswer
global upasAnswers upasNumAnswered upasQuestionTimer
global upasAdTimer
tmcquiz_rank_save {} {} {}
[no.1] tmcquiz_ask $botnick {} {} $quizconf(quizchannel) {}
[no.2] utimer 5 upasAskQuestion
[no.3] set tgnextqtimer [utimer $tgtimenext tgnextq]
set tgplaying 1
set tgstreak 0
set tgmissed 0
}
i want to random this no.1, no.2, no.3 but i dont know how to do. please help me . thanks
no limit to learn
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Nov 09, 2005 11:57 am
tahu wrote: i want to random this no.1, no.2, no.3 but i dont know how to do. please help me . thanks
What do you mean by randoming them?
tahu
Voice
Posts: 14 Joined: Fri Feb 11, 2005 10:45 pm
Location: bandung
Contact:
Post
by tahu » Wed Nov 09, 2005 9:38 pm
that script game is 3 proc for next question.
so i mean when this game over for next question move to another script.
sorry for my poor english. i hope u understand what i mean. thanks
no limit to learn