Hi again! smile
Code:

on *:TEXT:*:#: {
  if ($1 == !raffle) {
    if (%open == 1) {
      write raffle.txt $nick
      msg #cartooncyborg /me $nick entered the raffle!
    }
    elseif (!%open) { msg #cartooncyborg /me There is not an active raffle. }
  }
  elseif ($1 == !people) {
    if (%open) {
      msg #cartooncyborg /me There are currently $lines(raffle.txt) users in the raffle!
    }
  }
  if ($1 == !raffleopen) {
if ($istok(%mods,$nick,32)) {
    start_raffle
}
  }
}
  alias start_raffle {
    if (!%open) {
      write -c raffle.txt
      set %open 1
      msg #cartooncyborg The raffle is open! You have 5 minutes to submit a level by typing !raffle. Type !people to see who's already entered the raffle!
      .timerraffle1 1 120 msg #cartooncyborg 3 minutes left for the raffle to close. Type !raffle if you have a level suggestion!
      .timeraffle2 1 290 msg #cartooncyborg 1 minute left people! Type !raffle to enter! Go Go Go!
      .timerraffle3 1 350 end_raffle
    }
    elseif (%open) { msg #cartooncyborg /me There is an active raffle already. }
  }
  alias end_raffle { 
    if (%open) {
.timerraffle* off
      var %user = $read(raffle.txt,n)
      write -c raffle.txt
      unset %open 
      msg #cartooncyborg /me And the winner is... %user $+ !!! Well Done!
    }
    elseif (!%open) { msg #cartooncyborg /me There is not an active raffle. }
}

The timed messages will stop when the raffle ends now. That was my mistake!
I dont know if isop works on twitch.. so i made it so it checks if the nick is in %mods . So you'll have to put the nicks of the mods in %mods seperated with spaces.
And at last, echo -at wasnt needed in front of msg command
smile

Last edited by OrFeAsGr; 19/10/15 03:54 PM.