write -c raffle.txt
... is a command which wipes raffle.txt into being a zero size file. Your script has this command both when the raffle starts and when it stops, so if you don't want the list of nicks cleared, you can put a REM or a semi-colon in front of these commands to turn them into a comment. I assume you'll eventually want to wipe this file, so you can have another alias to specifically delete the file, or you can modify the alias so that it starts while also clearing it if it's started like: !startraffle clear
changing from:
if ($1 == !startraffle) {
if ($nick isop #) || ($nick == name) {
start_raffle
}
}
to:
if ($1 == !startraffle) {
if ($nick isop #) || ($nick == name) {
if ($2 == clear) write -c raffle.txt
elseif ($lines(raffle.txt)) msg $chan raffle started with $v1 entries!
start_raffle
}
}
Just to be safe, your ON TEXT should begin with a line to make sure it does nothing if you are in a different channel when someone uses a !trigger. On the line below the ON TEXT, have something like:
if ($chan != #name) return
Also, by default the timers are deleted if you disconnect from that server, and the end-raffle won't happen if the timer dies. For the 3 timer commands, you should make sure the 3rd one allows that timer to execute while offline, changing it to be:
.timerraffle3 -o 1 350 end_raffle
Also, to defend against the client crashing and restarting with %open set to 1, have the raffle set to not-open when mirc starts up. A line outside an alias:
ON *:START:{ unset %open }
You probably need to have rules about how someone can be eligible to win. i.e. do they need to be in channel when the winning ticket is chosen. Also, what will you do if I change nicks
/nick maroon
!raffle
/nick maroon2
!raffle
/nick maroon3
!raffle
/nick maroon4
!raffle
/nick maroon
... and one of these is the winner.