here you go all you have to do is swap out what you have for the raffle part but make sure when someone goes to buy a ticket they put a number after it if they leave it blank and just do !buyticket it wont work.


on $*:TEXT:/!buyticket /Si:#:{
if ($2 isnum) {
if ($2 > 10) {
msg $chan Sorry $nick but you can only up to 10 tickets
}
if ($2 < 11) {
var %i = 0
var %ticket = $2
var %topic = $+(#,.,$nick)
var %user = $readini(Points.ini,%topic,Points)
var %end = 10 * %ticket
var %delete = %user - %end
if (%delete > 0) {
writeini -n Points.ini %topic Points %delete
while (%i < %ticket) {
write Raffle.txt $nick
%i = %i + 1
}
msg $chan $nick you have bought %ticket tickets with %end points.
}
if (%delete < 0) {
msg $chan Sorry $nick you don't have enough points to buy %ticket tickets!
}
}
}
if (%raffle == 0) {
msg $chan Raffle is currently closed!
}
}
on $*:TEXT:/!raffle /Si:#:{
if ($nick isop #) {
if ($2 == open) {
if (%raffle == 0) {
msg $chan RAFFLE IS NOW OPEN!!
/set %raffle 1
write -c Raffle.txt
}
}
}
if ($2 == close) {
if (%raffle == 1) {
msg $chan RAFFLE IS NOW CLOSED!!
/set %raffle 0
write -c Raffle.txt
}
}
}


on *:TEXT:!roll:#:{
if ($nick isop #) {
if (%raffle == 1) {
var %user = $read(Raffle.txt)
msg $chan RAFFLE IS NOW BEING ROLLED, GOOD LUCK!!
.timer1 1 1 msg $chan /me 5!
.timer2 1 2 msg $chan /me 4!
.timer3 1 3 msg $chan /me 3!
.timer4 1 4 msg $chan /me 2!
.timer5 1 5 msg $chan /me 1!
.timer6 1 6 msg $chan AND THE WINNER IS:
.timer7 1 7 msg $chan %user
.timer8 1 8 msg $chan TH RAFFLE IS NOW OVER
set %raffle 0
write -c Raffle.txt
}
}
}