All pastes #251709 Raw Edit

Unnamed

public text v1 · immutable
#251709 ·published 2006-11-18 14:50 UTC
rendered paste body
on $*:TEXT:/^[@.!](PlayDealOrNoDeal|DealOrNoDeal|PlayDeal|Play)/Si:?: {
  .msg $nick You Have Started A Game Of Deal Or No Deal! I Am Your Host, Noel Edmonds. Please Start By Selecting A Box
  .msg $nick Please Pick A Box Number Between 1 And 22 By Saying "Box <Number 1 - 22>"
}
on *:TEXT:Box *:?: {
  if ($2- isnum 1-22) && (%box. $+ $nick == $null) {
    .msg $nick You Have Chosen Box Number $2-
  .set %Box. [ $+ [ $nick ] ] $2- } 
  elseif ($2- !isnum 1-22) { .msg $nick Please Select A Box Between 1 And 22 }
  $Box.Choice($nick)
}

alias Box.Choice {
  if ($isid) {
    set %box.colour. [ $+ [ $1 ] ] $rand(1,2)
    set %Box.price $read($iif(%box.colour. [ $+ [ $1 ] ] == 1,`RedBoxes.txt,`Blueboxes.txt),£*)
    $Box-done($1)
  }
}
alias -l Box-done {
  if ($isid) {
    msg $1 $iif(%box.colour. [ $+ [ $1 ] ] == 1,4,12) $+ Your Box contained %Box.price 
  }
}