on *:TEXT:*:#: {
if ($1 == !giveaway) {
if (%open == 1) {
write Raffle.txt $nick
msg $chan $nick entered the giveaway!
}
}
elseif ($1 == !people) {
if (%open) {
msg $chan There are currently $lines(Raffle.txt) users in the giveaway!
}
}
}
alias start_raffle {
if (!%open) {
write -c Raffle.txt
set %open 1
msg #yourchan The raffle is open! You have 5 minutes to enter by typing !raffle
.timer 1 120 msg #yourchan 3 minutes left for the raffle to close. Type !raffle to enter!
.timer 1 290 msg #yourchan 1 minute left people! Type !raffle to enter! Go Go Go!
.timer 1 350 end_raffle
}
elseif (%open) { echo -at There is an active raffle already. }
}
alias end_raffle {
if (%open) {
var %user = $read(Raffle.txt,n)
write -c Raffle.txt
unset %open
msg #yourchan /me And the winner is... %user $+ !!! Well Done!
}
elseif (!%open) { echo -at There is not a n active raffle. Type /start_raffle to start one. }
}
Change #yourchan with your channel's name.
Type /start_raffle to start a raffle. It will end automatically in 5 minutes.
You can end it on your own too by typing /end_raffle
Have a nice.. day!
-OrFeAsGr-