mIRC Home    About    Download    Register    News    Help

Print Thread
Raffle Script #262028 23/12/17 03:51 AM
Joined: Dec 2017
Posts: 9
C
camckee316 Offline OP
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
}

Re: Raffle Script [Re: camckee316] #262029 23/12/17 04:19 AM
Joined: May 2015
Posts: 249
splinny Offline
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!
Re: Raffle Script [Re: splinny] #262030 23/12/17 04:41 AM
Joined: Dec 2017
Posts: 9
C
camckee316 Offline OP
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.
Re: Raffle Script [Re: camckee316] #262031 23/12/17 05:59 AM
Joined: Jan 2004
Posts: 1,769
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,769
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.

Re: Raffle Script [Re: maroon] #262041 23/12/17 07:33 PM
Joined: Dec 2017
Posts: 9
C
camckee316 Offline OP
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

Re: Raffle Script [Re: camckee316] #262042 23/12/17 07:48 PM
Joined: Jan 2004
Posts: 1,769
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,769
Is this what you're talking about? It fleshes out the info given in /help along with examples.

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