Code:
on *:text:!5050:[color:red]#yourchan[/color]: {
  [color:green]; Create the table for scores and set it to load/save automatically so no data loss will occur.[/color]
  if ($hget(Game) == $null) {
    hmake Game 50
    hload Game 5050.txt
    .timerGame -o 0 10 hsave Game 5050.txt
  }
  [color:green]; Check the random number 1 or 2.  If it's a 1, kick or kick/ban them.[/color]
  if ($rand(1,2) == 1) {
    [color:green]; Count the number of kicks and add them to the hash table.[/color]
    hadd Game $+($nick,.kicks) $calc($hget(Game,$+($nick,.kicks)) + 1)
    [color:green]; If the number of kicks is divisible by 5, ban and kick the person for 5 minutes.[/color]
    if ($calc($hget(Game,$+($nick,.kicks)) % 5) == 0) {
      ban -ku300 $chan $nick You have lost the 50/50 and suffer a 5 minute ban.
    }
    [color:green]; If the number of kicks isn't divisible by 5, just kick the person.[/color]
    else {
      kick $chan $nick You lost the 50/50.
    }
  }
  [color:green]; If the random number is 2, give points.[/color]
  else {
    [color:green]; Add points to the hash table.[/color]
    hadd Game $+($nick,.points) $calc($hget(Game,$+($nick,.points)) + 1)
    msg $chan You have won the 50/50 and received 1 point for a total of $hget(Game,$+($nick,.points)) points.
  }
}

[color:green]; Allow viewing scores with !won (to see your own) or !won nick (to see a nick's points).[/color]
on *:text:!won*:[color:red]#yourchan[/color]: {
  if ($2 != $null) {
    if ($hget(Game,$+($2,.points)) != $null) {
      msg $chan $2 has won $hget(Game,$+($2,.points)) points in the 50/50.
    }
    else {
      msg $chan $2 has not won any points in the 50/50.
    }
  }
  else {
    if ($hget(Game,$+($nick,.points)) != $null) {
      msg $chan You have won $hget(Game,$+($nick,.points)) points in the 50/50.
    }
    else {
      msg $chan You have not won any points in the 50/50.
    }
  }
}


This should do what you want. Change the red text to your channel name. You can keep or remove the green comments. Those are there to explain some of it.


Invision Support
#Invision on irc.irchighway.net