mIRC Home    About    Download    Register    News    Help

Print Thread
#262028 23/12/17 03:51 AM
Joined: Dec 2017
Posts: 9
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2017
Posts: 9
I have a raffle script but it will choose voice/op. How do i fix that.

code:
on *:text:!raffle:#crd: {
set %random $nick($chan,$rand(1,$nick($chan,0,r)),r)
msg $chan The winner is: %random $+ !!
unset %random
}

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Code:
set %random $nick($chan,$rand(1,$nick($chan,0)))


Dont give a fish - teach to fish!
splinny #262030 23/12/17 04:41 AM
Joined: Dec 2017
Posts: 9
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2017
Posts: 9
thank you splinny, what if i wanted to leave certain nick out, my channel runs 2 bots and i dont them included. i would need to test to if the random is equal to names and if it is unset and redo

Last edited by camckee316; 23/12/17 04:44 AM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Code:
//var %random | while (!$gettok(botnick1 botnick2, %random , 32) ) { var %random $nick($chan,$rand(1,$nick($chan,0))) } | echo -a %random



Remember that when you exclude-then-repeat you need to make sure those are not the only nicks in channel, or you get infinite loop.

maroon #262041 23/12/17 07:33 PM
Joined: Dec 2017
Posts: 9
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2017
Posts: 9
thank you all. you have been very helpful. last question, do you have any sites, or books, i that would helpful for a noob. once again thank you all

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Is this what you're talking about? It fleshes out the info given in /help along with examples.

https://en.wikichip.org/wiki/mirc


Link Copied to Clipboard