mIRC Home    About    Download    Register    News    Help

Print Thread
#103875 26/11/04 04:15 PM
Joined: Nov 2004
Posts: 84
GogetaX Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2004
Posts: 84
how to use random numer?

if i have:
alias 1 {blablabla}
and
alias 2 {blablabla}
?

that he will chouse random the alias function


by the time you finish reading this, you realize you have wasted 5 secundes of your life!
#103876 26/11/04 04:35 PM
Joined: Aug 2004
Posts: 16
I
Pikka bird
Offline
Pikka bird
I
Joined: Aug 2004
Posts: 16
Hi.

Code:
Alias rand { $r(1,2) }


This Alias chooses Alias 1 or 2.

You can put this all in one Alias and work with If:

Code:
Alias rand {
var %r = $r(1,4)
if (%r == 1) { do this }
elseif (%r == 2) { do this }
elseif (%r == 3) { do this }
elseif (%r == 4) { do this }
}


KathY


Regards,
KathY
#103877 26/11/04 04:40 PM
Joined: Nov 2004
Posts: 84
GogetaX Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2004
Posts: 84
hummm

and how do i need to do GoTo-ThisLine or wait X-Secunds?

cuz i wanna make a BoT that asking a quetions like
quertion 1: what is the blablabla
wait 10sec.
NEXT QUESTION.


how to do that?


by the time you finish reading this, you realize you have wasted 5 secundes of your life!
#103878 26/11/04 04:59 PM
Joined: Aug 2004
Posts: 16
I
Pikka bird
Offline
Pikka bird
I
Joined: Aug 2004
Posts: 16
Hmm.

I would write the questions in a text file, then you don't need "$rand" or an alias for each question.

Alias bla { .timerQuestion 0 10 blaa }
Alias blaa {
msg #channel $read(question.txt)
}

You start this with /bla. In querstion.txt, you have to write your questions, in each line one question.

Quote:
and how do i need to do GoTo-ThisLine or wait X-Secunds?

Sorry, I dont know, what you want to do with this.

Kathy


Regards,
KathY
#103879 30/11/04 11:49 AM
Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
$rand and $r are the same thing. e.g.

//echo -a $rand(A,Z)


What do you do at the end of the world? Are you busy? Will you save us?

Link Copied to Clipboard