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 

random command in tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
tahu
Voice


Joined: 11 Feb 2005
Posts: 14
Location: bandung

PostPosted: Sun Nov 06, 2005 12:54 pm    Post subject: random command in tcl Reply with quote

hello ..
anybody can help me to tell about how to make random command for tcl script ?
thanks..
_________________
no limit to learn
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Nov 06, 2005 6:17 pm    Post subject: Reply with quote

What random commands?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
]Kami[
Owner


Joined: 24 Jul 2003
Posts: 590
Location: Slovenia

PostPosted: Sun Nov 06, 2005 6:49 pm    Post subject: Reply with quote

Check this
_________________
Slovene Eggdrop Page
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Nov 06, 2005 9:40 pm    Post subject: Reply with quote

Code:
proc rand { {range 100} } {
  return [expr {int(rand()*$range)}]
}

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Nov 07, 2005 7:41 am    Post subject: Reply with quote

Is that what he meant with random command? Razz
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Nov 07, 2005 8:25 am    Post subject: Reply with quote

Sir_Fz wrote:
Is that what he meant with random command? Razz

I think so. I made an assumption based on dbl dutch. Laughing
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
tahu
Voice


Joined: 11 Feb 2005
Posts: 14
Location: bandung

PostPosted: Wed Nov 09, 2005 11:16 am    Post subject: random Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Nov 09, 2005 11:57 am    Post subject: Re: random Reply with quote

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?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
tahu
Voice


Joined: 11 Feb 2005
Posts: 14
Location: bandung

PostPosted: Wed Nov 09, 2005 9:38 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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