I tried what you mentioned, Ryukoto, and it's still not working for me.

Here's what I have:
Code:
;Raffle System (Beavis)
on *:text:!raffle off:#:{
  if ($nick isop #) {
    set %ticketoff
    msg $chan $nick, the raffle/giveaway system is now set to OFF.
  }
  else { msg $chan This command is only available to moderators. }
}
on *:text:!raffle:#:{
  if ($nick isop #) {
    unset %ticketoff
    msg $chan $nick has started a raffle/giveaway. To enter the raffle/giveaway, you need a ticket. You can purchase a ticket for 200pts by typing the command "!ticket"; only 1 ticket allowed per user. 
  }
  else { msg $chan This command is only available to moderators. }
}
on *:text:!ticket:#:{
  if (%ticketoff) { HALT }
  if ((%floodraffle) || ($($+(%,floodraffle.,$nick),2))) { return }
  set -u3 %floodraffle On
  set -u60 %floodraffle. $+ $nick On
  if ($hget($+(tickets.,#),$nick)) { msg # $nick , you already have a ticket! | return }
  var %topic = $+(#,.,$nick)
  ; Check if enough points
  if ($readini(Points.ini,%topic,Points) >= 200) {
    ; Deduct the points
    var %a = $v1 - 200
    writeini Points.ini %topic Points %a
    ; Add the user to tickets.#channel hash table, creating the table if it doesn't exist
    hadd -m $+(tickets.,#) $nick 1
    msg # $nick spent 200 points on a raffle ticket.

  }
else msg #  Sorry $nick , you don't have enough points to join this raffle. You need 200 points to join. }

on *:text:!roll:#:{
  if ($nick isop #) {
    if ($hget($+(tickets.,#))) {
      var %i = $r(1,$hget($+(tickets.,#),0).item)
      msg # The winner is $hget($+(tickets.,#),%i).item
      ; The next line frees the table (all data in it is gone)
      hfree $+(tickets.,#)
    }
    else msg # There are no ticket entries at this time. 
  }
  else msg # $nick, only moderators can use that command.
}


Did I do something wrong?
Also, is there a way to have !ticket set to off by default?

I have a timer that has an on/off feature and works fine for me.

Code:
on *:text:!timer on:#: {
  if ($nick isop #) { 
    msg $chan $nick , the timer system is now ON.
    .timer.pointsystem 0 1800 msg $chan You will accumulate 5pts/min for watching this stream. You can check your point balance with "!points". Points can be used to enter our giveaways; raffles generally cost about 200pts to enter. Also, you can risk your points at a gain/loss by playing our battle game using "!battle". Battles last 30 seconds each and cost 50pts to enter. Type "!modcomms" for moderator only commands. 
  }

  else { msg $chan This command is only available to moderators. }
}
on *:text:!timer off:#: {
  if ($nick isop #) { 
    msg $chan $nick , the timer system is now OFF.
  .timer.pointsystem off }
  else { msg $chan This command is only available to moderators. }
}

Last edited by radmux; 31/05/14 11:43 PM.