All pastes #251715 Raw Edit

Someone

public text v1 · immutable
#251715 ·published 2006-11-18 15:00 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) && ($2 !isin %box.used) {
    .msg $nick You Have Chosen Box Number $2
    .set %Box. [ $+ [ $nick ] ] $2
    /set %box.used %box.used $2
    $Box.Choice($nick)
  } 
  elseif ($2- !isnum 1-22) { .msg $nick Please Select A Box Between 1 And 22 }
  elseif ($2 isin %box.used) { msg $nick Box alredy used. please select another }
}

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 
  }
}