I'd really recommend just using a hash table.

Here is the first part. You'll still have to update the second part, but I don't have time right now to do it. You'll want to do a search on the table to find which bet the nick is in and store the rolls in the table. When both rolls are done, display the results and /hdel the bet.

Maybe someone can finish that part for you.

*Note for anyone trying to make use of this... the /hadd command adds roller1, roller2, rollerpot, and then 0 and 0 to the table with item name of $nick. The 2 zeros are the roll placeholders. To know if the roll has been completed, check to see if it's > 0. If both are > 0, then the bet is finished and you can do the display and remove it. You'll probably also want to add protection so someone doesn't roll again if they've already rolled. After adding that kind of protection, a nick could be a roller in multiple bets, but will only be able to roll on the first matching bet until that one completes. You could change how that works as well if you want.

Anyhow, this is just one option to handle this. Maybe someone has another option they want to suggest for you.

Code:
on *:TEXT:!bet*:#msl.test,#Goku04xx,#Epic_Dice: {
  if ($4 && !$nick(#Epic_Dice,$nick,ohv)) {
    notice $nick 12You must be a channel (half)operator to use this command.
    return
  }

  if (!$hget(bets)) { hmake bets }
  if ($hget(bets,$nick) {
    msg # You've already placed a bet.
    return
  }
  var %potamount = $calc($4 *1.8) 
  if ($4 && $nick(#Epic_Dice,$nick,ohv)) {
    hadd bets $nick $2-4 0 0
    msg # 7[ $nick ] 12 $+ $2 1vs 12 $3  - 12 $4 $+ M    - 1 Roll em!
  }
}
on *:TEXT:!remove*:#msl.test,#Goku04xx,#Epic_Dice: {
  if ($hget($2))
  {
    msg # 4Wager between  $gettok($hget(bets,$2),1,32) and $gettok($hget(bets,$2),2,32) has been removed!
    hdel bets $2
  }
  else if ($hget($nick)) {
    msg # 4Wager between  $gettok($hget(bets,$nick),1,32) and $gettok($hget(bets,$nick),2,32) has been removed!
    hdel bets $nick
  }
  else {
    msg # No matching bets to remove.
  }
}


Invision Support
#Invision on irc.irchighway.net