Craps Table

A craps table with ANSI graphics. (This craps table uses a Role Playing MUSH money system, and the &VAR_MONEY has to be changed accordingly. With a little work it could be made to work using the built-in MUSH currency.)

Author: Demonic
Category: Games
Compatibility: CobraMUSH, PennMUSH, TinyBit, TinyMUX.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Craps Table

@set me=quiet
@switch [isdbref(num(Craps Parent))]=0,{think [ansi(hm,INSTALL:)] No "Craps Parent" object found -- creating...;@create Craps Parent},1,{think [ansi(hm,INSTALL:)] "Craps Parent" object already exists... skipping creation.}
@set Craps Parent = SAFE
@set Craps Parent = NO_COMMAND
@set Craps Parent = !HALT
think [ansi(hm,INSTALL:)] Downloading Craps Built-In Attributes...
@OXLEAVE Craps Parent=approaches from [name(me)]'s area.
@OLEAVE Craps Parent=departs the Craps Table and heads back toward [name(loc(me))].
@LEAVE Craps Parent=You depart [name(me)]'s area.
@ALEAVE Craps Parent=[u(TRI_AUTO.Stuff,%#,%n)]
@OXENTER Craps Parent=departs toward [name(me)]'s area.
@OENTER Craps Parent=approaches the Craps Table from [name(loc(me))].
@AENTER Craps Parent=[pemit(%#,* Type '[ansi(v(FONT_CRAPS.Cmds),craps/help)]' for more information.)]
@ENTER Craps Parent=You approach [name(me)]'s area.
@FAILURE Craps Parent=It seems to be bolted to the ground.
@IDESCRIBE Craps Parent=[u(ADD_DESC)][ansi(v(FONT_DESC.Border),%r---------------.[repeat(-,62)]%r)][ansi(v(FONT_DESC.Title),Players Playing)][ansi(v(FONT_DESC.Border),:)] [iter(v(LIST_CRAPS.Playing),name(##),,\,%b)]%r[ansi(v(FONT_DESC.Border),---------------')]%r[ansi(v(FONT_DESC.Title),Players Betting)][ansi(v(FONT_DESC.Border),:)] [iter(after(v(LIST_CRAPS.Bets),|),name(first(##)),|,\,%b)]%r[ansi(v(FONT_DESC.Border),---------------')]%r[ansi(v(FONT_DESC.Title),Min Bet:)] [ljust(v(DATA_BET.Min),53)][ansi(v(FONT_DESC.Title),Max Bet:)] [v(DATA_BET.Max)]%r[ansi(v(FONT_DESC.Border),repeat(-,78))]
@DESCRIBE Craps Parent=Type '[ansi(hc,enter [name(me)])]' to play a game.
think [ansi(hm,INSTALL:)] Downloading Craps Fonts...
&FONT_TYPES.TITLE Craps Parent=hm
&FONT_TYPES.HEADER Craps Parent=hc
&FONT_TYPES.BORDER Craps Parent=hb
&FONT_HELP.BORDER Craps Parent=hb
&FONT_HELP.HEADER Craps Parent=hc
&FONT_HELP.CMDS Craps Parent=hc
&FONT_HELP.TITLE Craps Parent=hb
&FONT_CRAPS.CMDS Craps Parent=hc
&FONT_DESC.TITLE Craps Parent=hc
&FONT_DESC.BORDER Craps Parent=hb
&FONT_LIST.TITLE Craps Parent=hc
&FONT_LIST.HEADER Craps Parent=hm
&FONT_LIST.BORDER Craps Parent=hb
&FONT_LIST.NOBETS Craps Parent=hr
&FONT_LIST.ROLLER Craps Parent=hc
think [ansi(hm,INSTALL:)] Downloading Craps Commands...
&CMD_CRAPS.SETUP Craps Parent=$craps/setup:[ifelse(u(FUN_PLR.Auth,%#),u(TRI_CRAPS.Setup,%#),u(TRI_ERROR,%#,PLR_!AUTH))]
&CMD_CRAPS.PLAY Craps Parent=$craps/play:[switch([u(FUN_PLR.Valid,%#)][u(FUN_PLR.Banned,%#)][u(FUN_PLR.Playing,%#)][u(FUN_ENOUGH.Room,%#)][u(FUN_ENOUGH.Money,%#,v(DATA_BET.Min))],0????,u(TRI_ERROR,%#,PLR_!VALID),11???,u(TRI_ERROR,%#,PLR_BANNED),101??,u(TRI_ERROR,%#,PLR_PLAYING),1000?,u(TRI_ERROR,%#,!ENOUGH_ROOM),10010,u(TRI_ERROR,%#,!ENOUGH_MONEY),10011,u(TRI_CRAPS.Play,%#),u(TRI_SYSERR,%#))]
&CMD_CRAPS.BETS Craps Parent=$craps/types:[pemit(%#,[ansi(v(FONT_TYPES.Border),[repeat(-,78)]%r<<<<<)][ansi(v(FONT_TYPES.Header),center(CRAPS -- BET TYPES SECTION,68))][ansi(v(FONT_TYPES.Border),>>>>>%r[repeat(-,78)])]%r[ansi(v(FONT_TYPES.Border),\[)] [ansi(v(FONT_TYPES.Title),Sequence Roll Bets)] [ansi(v(FONT_TYPES.Border),\])]%rPass[space(8)]Don't Pass[space(18)]Odds on Pass[space(8)]Odds on Don't Pass%rCome[space(8)]Don't Come[space(18)]Odds on Come[space(8)]Odds on Don't Come%r%rPlace 4[space(5)]Place 5[space(5)]Place 6[space(5)]Place 8[space(5)]Place 9[space(5)]Place 10%rLay 4[space(7)]Lay 5[space(7)]Lay 6[space(7)]Lay 8[space(7)]Lay 9[space(7)]Lay 10%rHard 4[space(6)]Hard 6[space(6)]Hard 8[space(6)]Hard 10%rBig 6[space(7)]Big 8%r%r[ansi(v(FONT_TYPES.Border),\[)] [ansi(v(FONT_TYPES.Title),One Roll Bets)] [ansi(v(FONT_TYPES.Border),\])]%rField[space(4)]Whirl[space(4)]Horn[space(4)]Under Seven[space(4)]Over Seven[space(4)]Any Seven[space(4)]Any Craps%r%rHop 1-1%b%bHop 1-2%b%bHop 1-3%b%bHop 1-4%b%bHop 1-5%b%bHop 1-6%rHop 2-2%b%bHop 2-3%b%bHop 2-4%b%bHop 2-5%b%bHop 2-6%rHop 3-3%b%bHop 3-4%b%bHop 3-5%b%bHop 3-6%rHop 4-4%b%bHop 4-5%b%bHop 4-6%rHop 5-5%b%bHop 5-6%b%bHop 6-6%r[ansi(v(FONT_TYPES.Border),repeat(-,78))])]
&CMD_CRAPS.HELP Craps Parent=$craps/help:[pemit(%#,[ansi(v(FONT_HELP.Border),[repeat(-,78)]%r<<<<<)][ansi(v(FONT_HELP.Header),center(CRAPS -- HELP SECTION,68))][ansi(v(FONT_HELP.Border),>>>>>%r[repeat(-,78)])]%rCraps is a fairly simple game of dice at the surfce, though it can get pretty complex as more players become involved. Whenever you make a bet\, you are betting on a number \(or series of numbers\) on the next roll \(or series of rolls\). If you are looking for advanced strategies\, you will not find them here. It is recommended you buy a book such as "Hoyles".%r%r[ansi(v(FONT_HELP.Title),Commands:%r---------)]%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/setup,16))] - Resets the Craps Table \(Admin Only\).%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/play,16))] - Establish yourself as an active player.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/start,16))] - Forces the stickman to wake up and start a game.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/newroller,16))] - Forces the stickman to designate a new roller.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/types,16))] - Lists valid bets that you can make.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/view,16))] - Views the Craps Table.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/list,16))] - Lists all current bets.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/roll,16))] - Rolls the dice \(if you are the designated roller\).%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/on <type>,16))] - Activates a bet that's already on the table.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/off <type>,16))] - Deactivates a bet that's already on the table.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/buy <type>,16))] - "Buys" correct odds for a bet.%r%b%b[ansi(v(FONT_HELP.Cmds),ljust(craps/copyright,16))] - Shows Copyright information.%r%r%b%b[ansi(v(FONT_HELP.Cmds),craps/bet <type>=<amount>)] - Places a bet.%r%r* Type '[ansi(v(FONT_HELP.Cmds),craps/rules)]' for instructions on how to play the game.%r[ansi(v(FONT_HELP.Border),repeat(-,78))])]
&CMD_CRAPS.ROLL Craps Parent=$craps/roll:&FLAG_BUSY2 me=[inc(v(FLAG_BUSY2))];@switch [u(FUN_BUSY2)][v(FLAG_BUSY)][v(FLAG_ROLLING)][u(FUN_PLR.Playing,%#)][u(FUN_PLR.Roller,%#)]=1????,{think [u(TRI_ERROR,%#,SYS_BUSY)];&FLAG_BUSY2 me=0},00???,{think [u(TRI_ERROR,%#,!BUSY)];&FLAG_BUSY2 me=0},011??,{think [u(TRI_ERROR,%#,ALREADY_ROLLING)];&FLAG_BUSY2 me=0},0100?,{think [u(TRI_ERROR,%#,PLR_!PLAYING)];&FLAG_BUSY2 me=0},01010,{think [u(TRI_ERROR,%#,PLR_!ROLLER)];&FLAG_BUSY2 me=0},01011,{&FLAG_BUSY2 me=0;&FLAG_ROLLING me=1;@tr me/TRI_CRAPS.Roll-Start=%#},{think [u(TRI_SYSERR,%#)];&FLAG_BUSY2 me=0}
&CMD_CRAPS.START Craps Parent=$craps/start:[switch([u(FLAG_BUSY)][u(FUN_PLR.Playing,%#)],1?,u(TRI_ERROR,%#,BUSY),00,u(TRI_ERROR,%#,PLR_!PLAYING),01,u(TRI_CRAPS.Start,%#),u(TRI_SYSERR,%#))]
&CMD_CRAPS.BET Craps Parent=$craps/bet *=*:[switch([u(FUN_PLR.Valid,%#)][u(FUN_PLR.Banned,%#)][u(FUN_PLR.Playing,%#)][u(FUN_TYPE.Valid,edit(secure(%0),%b,_))][u(FUN_TIME.Ok,edit(secure(%0),%b,_),%#,trunc(secure(%1)))][u(FUN_BET.Valid,edit(secure(%0),%b,_),trunc(secure(%1)),%#)][u(FUN_CRAPS.Enough-Money,trunc(secure(%1)))][u(FUN_PLR.Enough-Money,%#,trunc(secure(%1)))][u(FUN_HAS.Type,%#,edit(secure(%0),%b,_))],0????????,u(TRI_ERROR,%#,PLR_!VALID),11???????,u(TRI_ERROR,%#,PLR_BANNED),100??????,u(TRI_ERROR,%#,PLR_!PLAYING),1010?????,u(TRI_ERROR,%#,TYPE_!VALID),10110????,u(TRI_ERROR,%#,TIME_!VALID),101110???,u(TRI_ERROR,%#,BET_!VALID,%#,edit(secure(%0),%b,_)),1011110??,u(TRI_ERROR,%#,OUT_OF_MONEY),10111110?,u(TRI_ERROR,%#,!ENOUGH_MONEY),101111111,u(TRI_ERROR,%#,HAS_BET),101111110,u(TRI_CRAPS.Bet,%#,edit(secure(%0),%b,_),trunc(secure(%1))),u(TRI_SYSERR,%#))]
&CMD_CRAPS.VIEW Craps Parent=$craps/view:@dol lnum(22)=@pemit %#=[u(DRAW_LAYOUT.Line#@,%#)]
&CMD_CRAPS.LAYOUT Craps Parent=$craps/lay*:@dol lnum(21)=@pemit %#=[u(DRAW_LAYOUT.Line#@,%#)]
&CMD_CRAPS.LIST Craps Parent=$craps/list:@pemit %#=[setq(0,space(0))][setq(1,space(0))][ansi(v(FONT_LIST.Border),[repeat(-,78)]%r<<<<<)][ansi(v(FONT_LIST.Header),center(CRAPS TABLE -- LIST OF BETS,68))][ansi(v(FONT_LIST.Border),>>>>>%r[repeat(-,78)])][ifelse(words(v(LIST_CRAPS.Bets)),[iter(after(v(LIST_CRAPS.Bets),|),ifelse(match(first(##),%#),setq(0,%q0 #@),setq(1,%q1 #@)),|,space(0))]%r%r[ansi(v(FONT_LIST.Header),Other People's Bets:)]%r%b%b[ansi(v(FONT_LIST.Border),\[)] [ansi(v(FONT_LIST.Title),DB#)] [ansi(v(FONT_LIST.Border),\]%b%b\[)] [ansi(v(FONT_LIST.Title),Name)] [ansi(v(FONT_LIST.Border),\][space(11)]\[)] [ansi(v(FONT_LIST.Title),Wager)] [ansi(v(FONT_LIST.Border),\]%b%b\[)] [ansi(v(FONT_LIST.Title),Type)] [ansi(v(FONT_LIST.Border),\][space(11)]\[)] [ansi(v(FONT_LIST.Title),Point)] [ansi(v(FONT_LIST.Border),\] \[)] [ansi(v(FONT_LIST.Title),Stat)] [ansi(v(FONT_LIST.Border),\])][iter(sort(elements(after(v(LIST_CRAPS.Bets),|),trim(%q1,%b,b),|),a,|),%r%b%b\([rjust(first(##),6)]\) [ljust(name(first(##)),17)][ansi(hg,$[rjust(extract(##,3,1),7)].00)]%b%b[ljust(ucstr(edit(extract(##,2,1),_,%b)),23)][ljust(ifelse(match(pass don't_pass,extract(##,2,1)),ifelse(v(DATA_POINT),v(DATA_POINT),-),ifelse(match(come don't_come,extract(##,2,1)),ifelse(extract(##,4,1),extract(##,4,1),-),-)),9)][ifelse(match(extract(##,2,1),place_*),ifelse(or(and(eq(extract(##,5,1),-1),not(v(DATA_POINT))),eq(extract(##,5,1),0)),OFF,ON),ifelse(lte(extract(##,5,1),0),OFF,ON))],|)]%r%r[ansi(v(FONT_LIST.Header),Your Bets:)]%r%b%b[ansi(v(FONT_LIST.Border),\[)] [ansi(v(FONT_LIST.Title),DB#)] [ansi(v(FONT_LIST.Border),\]%b%b\[)] [ansi(v(FONT_LIST.Title),Name)] [ansi(v(FONT_LIST.Border),\][space(11)]\[)] [ansi(v(FONT_LIST.Title),Wager)] [ansi(v(FONT_LIST.Border),\]%b%b\[)] [ansi(v(FONT_LIST.Title),Type)] [ansi(v(FONT_LIST.Border),\][space(11)]\[)] [ansi(v(FONT_LIST.Title),Point)] [ansi(v(FONT_LIST.Border),\] \[)] [ansi(v(FONT_LIST.Title),Stat)] [ansi(v(FONT_LIST.Border),\])][iter(sort(elements(after(v(LIST_CRAPS.Bets),|),trim(%q0,%b,b),|),a,|),%r%b%b\([rjust(first(##),6)]\) [ljust(name(first(##)),17)][ansi(hg,$[rjust(extract(##,3,1),7)].00)]%b%b[ljust(ucstr(edit(extract(##,2,1),_,%b)),23)][ljust(ifelse(match(pass don't_pass,extract(##,2,1)),ifelse(v(DATA_POINT),v(DATA_POINT),-),ifelse(match(come don't_come,extract(##,2,1)),ifelse(extract(##,4,1),extract(##,4,1),-),-)),9)][ifelse(match(extract(##,2,1),place_*),ifelse(or(and(eq(extract(##,5,1),-1),not(v(DATA_POINT))),eq(extract(##,5,1),0)),OFF,ON),ifelse(lte(extract(##,5,1),0),OFF,ON))],|)],%r[ansi(v(FONT_LIST.NoBets),No bets have been placed.)])]%r[ansi(v(FONT_LIST.Border),repeat(-,78))]%r* The roller is currently [ansi(v(FONT_LIST.Roller),ifelse(words(v(DATA_PLR.Roller)),name(v(DATA_PLR.Roller)),NO ONE))].
&CMD_CRAPS.NEWROLLER Craps Parent=$craps/new*:[switch([u(FLAG_BUSY)][u(FUN_PLR.Playing,%#)][u(FUN_PLR.Roller,%#)][gte(sub(secs(),v(DATA_LAST.Roll)),v(DATA_TIME.IdleOut))],0???,u(TRI_ERROR,%#,!BUSY),10??,u(TRI_ERROR,%#,PLR_!PLAYING),111?,u(TRI_ERROR,%#,PLR_ROLLER),1100,u(TRI_ERROR,%#,PLR_!IDLEOUT),1101,u(TRI_CRAPS.NewRoller,%#),u(TRI_SYSERR,%#))]
&CMD_CRAPS.COPYRIGHT Craps Parent=$craps/copy*:[pemit(%#,Craps Code v[v(DATA_VERSION)] - Created by: Demonic \(1999\)%rThis code is presently incomplete.%rUpdated versions of this code can be found on:%r%b%bhttp://www.mindspring.com/~loparo)]
think [ansi(hm,INSTALL:)] Downloading Craps Triggers...
&TRI_CRAPS.ROLL Craps Parent=think [setq(9,v(DATA_POINT))][u(TRI_MESSAGE,PLR_ROLLS,%0,%1,%2,extract(##,2,1),extract(##,3,1))][set(me,FLAG_ROLLING:0)][set(me,DATA_LAST.Roll:[secs()])][iter(revwords(after(v(LIST_CRAPS.Bets),|),|),switch(u(CALC_[extract(##,2,1)],%1,%2,extract(##,4,1),extract(##,5,1),first(##)),1,u(TRI_ROLL.Win,first(##),%1,%2,extract(##,2,1),extract(##,3,1)),0,u(TRI_ROLL.Lose,first(##),%1,%2,extract(##,2,1),extract(##,3,1)),u(TRI_#$,first(##),%1,%2,extract(##,2,1),extract(##,3,1),extract(##,4,1),extract(##,5,1))),|)][ifelse(trunc(%q9),switch(add(%1,%2),7,[u(TRI_RESET)][u(TRI_CHANGE.Rollers)],v(DATA_POINT),u(TRI_RESET)),ifelse(match(2 3 7 11 12,add(%1,%2)),[u(TRI_RESET)][ifelse(match(2 3 12,add(%1,%2)),u(TRI_CHANGE.Rollers),)],[set(me,DATA_POINT:[add(%1,%2)])][u(TRI_MESSAGE,POINT,%1,%2)]))]
&TRI_CRAPS.START Craps Parent=[set(me,FLAG_BUSY:1)][setq(0,first(shuffle(v(LIST_CRAPS.Playing))))][u(TRI_MESSAGE,SEPARATOR)][u(TRI_MESSAGE,CRAPS_STARTING)][ifelse(member(v(DATA_PLR.Roller),%q0),u(TRI_MESSAGE,SAME_SHOOTER),[u(TRI_MESSAGE,DIFFERENT_SHOOTER,%q0)][set(me,DATA_PLR.Roller:%q0)])]
&TRI_CRAPS.PLAY Craps Parent=[u(TRI_MESSAGE,PLR_PLAYS,%0)][set(me,LIST_CRAPS.Playing:[v(LIST_CRAPS.Playing)] %0)]
&TRI_SYSERR Craps Parent=[pemit(%0,[ansi(hfr,SYSERR:)] There is a bug in the code. Report this to an Admin immediately.)]
&TRI_MESSAGE Craps Parent=[remit(me,[u(DATA_PREFIX.Game)][space(not(not(words(u(DATA_PREFIX.Game)))))][u(MSG_%0,%1,%2,%3)])]
&TRI_CRAPS.BET Craps Parent=[u(TRI_MESSAGE,PLR_BET,%0,%1,%2)][set(me,LIST_CRAPS.Bets:[v(LIST_CRAPS.Bets)]|%0 %1 %2 X [ifelse(match(%1,place_*),-1,1)])][u(TRI_SET.Plr-Money,%0,sub(u(FUN_GET.Plr-Money,%0),%2))][u(TRI_INCREASE.Craps-Money,%2)]
&TRI_ERROR Craps Parent=[pemit(%0,[u(DATA_PREFIX.Error)][space(not(not(words(u(DATA_PREFIX.Error)))))][u(ERR_%1,%2,%3,%4)])]
&TRI_ROLL.WIN Craps Parent=[u(TRI_SET.Plr-Money,%0,add(u(FUN_GET.Plr-Money,%0),%4,setr(5,u(PAYOFF_%3,%4,%1,%2,%0))))][u(TRI_DECREASE.Craps-Money,add(%4,%q5))][u(TRI_MESSAGE,PLR_WINS,%0,%3,%q5)][u(TRI_REMOVE.Bet,%0,%3)]
&TRI_ROLL.LOSE Craps Parent=[u(TRI_MESSAGE,PLR_LOSES,%0,%3)][u(TRI_REMOVE.Bet,%0,%3)]
&TRI_ROLL.POINT Craps Parent=[u(TRI_MESSAGE,MAKE_POINT,%0,%1,%2)][set(me,DATA_POINT:[add(%1,%2)])]
&TRI_ROLL.COME-POINT Craps Parent=[u(TRI_MESSAGE,MAKE_COME-Point,%0,%1,%2)][set(me,DATA_COME-Point:[add(%1,%2)])]
&TRI_RESET Craps Parent=[u(TRI_MESSAGE,SEPARATOR)][u(TRI_MESSAGE,RESET)][set(me,DATA_POINT:)]
&TRI_DECREASE.CRAPS-MONEY Craps Parent=[set(me,DATA_CRAPS.Money:[sub(v(DATA_CRAPS.Money),%0)])]
&TRI_INCREASE.CRAPS-MONEY Craps Parent=[set(me,DATA_CRAPS.Money:[add(v(DATA_CRAPS.Money),%0)])]
&TRI_CRAPS.NEWROLLER Craps Parent=[setq(8,v(DATA_PLR.Roller))][u(TRI_MESSAGE,NEW_ROLLER.Request,%0)][u(TRI_CHANGE.Rollers)][set(me,LIST_CRAPS.Playing:[remove(v(LIST_CRAPS.Playing),%q8)])]
&TRI_CRAPS.ROLL-BLOWS Craps Parent=think [u(TRI_MESSAGE,PLR_BLOWS,%0)];@wait [rand(5)]={@tr me/[ifelse(rand(2),TRI_CRAPS.Roll-Blows,TRI_CRAPS.Roll)]=%0,[inc(rand(6))],[inc(rand(6))]}
&TRI_CRAPS.ROLL-START Craps Parent=think [u(TRI_MESSAGE,ROLL_STARTING,%0)];@wait [ifelse(eq(words(v(LIST_CRAPS.Playing)),1),0,v(DATA_DELAY.Start))]={@tr me/TRI_CRAPS.Roll-Blows=%0}
&TRI_PUSH Craps Parent=[u(TRI_SET.Plr-Money,%0,add(u(FUN_GET.Plr-Money,%0),%4))][u(TRI_DECREASE.Craps-Money,%4)][u(TRI_MESSAGE,PLR_PUSHES,%0,%3)][u(TRI_REMOVE.Bet,%0,%3)]
&TRI_MAKE.COME-POINT Craps Parent=[set(me,LIST_CRAPS.Bets:[replace(v(LIST_CRAPS.Bets),match(v(LIST_CRAPS.Bets),%0 %3 *,|),%0 %3 %4 [add(%1,%2)] %6,|)])][u(TRI_MESSAGE,MAKE_COME_POINT,%0,%3,add(%1,%2))]
&TRI_REMOVE.BET Craps Parent=[set(me,LIST_CRAPS.Bets:[ldelete(v(LIST_CRAPS.Bets),match(v(LIST_CRAPS.Bets),%0 %1 *,|),|)])]
&TRI_SET.PLR-MONEY Craps Parent=[ifelse(gte(%1,v(DATA_MAX.Money)),[set(%0,[v(VAR_MONEY)]:[v(DATA_MAX.Money)])][pemit(%0,[u(DATA_PREFIX.Warn)] You cannot carry any more money! Any money won from this point on will NOT be given to you.)][set(me,DATA_CRAPS.Money:[add(v(DATA_CRAPS.Money),sub(%1,v(DATA_MAX.Money)))])],set(%0,[v(VAR_MONEY)]:%1))]
&TRI_AUTO.STUFF Craps Parent=[ifelse(and(match(pmatch(%1),%0),match(v(LIST_CRAPS.Playing),%0)),ifelse(eq(words(trim(v(LIST_CRAPS.Playing),%b,b)),1),u(TRI_RESET.Full),[ifelse(match(v(DATA_PLR.Roller),%0),u(TRI_CHANGE.Rollers),)][set(me,LIST_CRAPS.Playing:[remove(v(LIST_CRAPS.Playing),%0)])]),)]
&TRI_CHANGE.ROLLERS Craps Parent=[ifelse(eq(words(trim(v(LIST_CRAPS.Playing),%b,b)),1),,[set(me,DATA_PLR.Roller:[setr(3,ifelse(lte(words(trim(v(LIST_CRAPS.Playing),%b,b)),setr(7,match(trim(v(LIST_CRAPS.Playing),%b,b),v(DATA_PLR.Roller)))),first(v(LIST_CRAPS.Playing)),extract(v(LIST_CRAPS.Playing),inc(%q7),1)))])][u(TRI_MESSAGE,SEPARATOR)][u(TRI_MESSAGE,NEW_ROLLER,%q3)])]
&TRI_RESET.FULL Craps Parent=[u(TRI_MESSAGE,SEPARATOR)][u(TRI_MESSAGE,RESET_FULL)][set(me,DATA_POINT:0)][set(me,LIST_CRAPS.Playing:)][set(me,FLAG_BUSY:0)][set(me,DATA_PLR.Roller:)]
&TRI_CRAPS.SETUP Craps Parent=[lock(me,me)][lock(me/use,LOCK_AT.Table/1)][set(me,LISTEN_DISCONNECT:^* has disconnected.:\[u\(TRI_AUTO.Stuff\,\%#\,\%0\)\])][set(me,LIST_CRAPS.Bets:)][set(me,FLAG_BUSY:0)][set(me,FLAG_BUSY2:0)][set(me,FLAG_ROLLING:0)][set(me,DATA_LAST.Roll:[secs()])][set(me,DATA_PLR.Roller:)][set(me,DATA_POINT:0)][wipe(me/DATA_CRAPS.Money)][set(me,LIST_CRAPS.Playing:)][set(me,MONITOR)][set(me,ENTER_OK)][u(TRI_MESSAGE,PLR_SETUP,%0)]
think [ansi(hm,INSTALL:)] Downloading Craps ASCII-Art...
&DRAW_DICE Craps Parent=.-------. .-------.%r[u(DRAW_[extract(one two three four five six,%0,1)].Line1)] [u(DRAW_[extract(one two three four five six,%1,1)].Line1)]%r[u(DRAW_[extract(one two three four five six,%0,1)].Line2)] [u(DRAW_[extract(one two three four five six,%1,1)].Line2)]%r[u(DRAW_[extract(one two three four five six,%0,1)].Line3)] [u(DRAW_[extract(one two three four five six,%1,1)].Line3)]%r`-------' `-------'
&DRAW_SIX.LINE1 Craps Parent=| @[space(3)]@ |
&DRAW_SIX.LINE2 Craps Parent=| @[space(3)]@ |
&DRAW_SIX.LINE3 Craps Parent=| @[space(3)]@ |
&DRAW_FIVE.LINE1 Craps Parent=| @[space(3)]@ |
&DRAW_FIVE.LINE2 Craps Parent=|[space(3)]@[space(3)]|
&DRAW_FIVE.LINE3 Craps Parent=| @[space(3)]@ |
&DRAW_FOUR.LINE1 Craps Parent=| @[space(3)]@ |
&DRAW_FOUR.LINE2 Craps Parent=|[space(7)]|
&DRAW_FOUR.LINE3 Craps Parent=| @[space(3)]@ |
&DRAW_THREE.LINE1 Craps Parent=|[space(5)]@ |
&DRAW_THREE.LINE2 Craps Parent=|[space(3)]@[space(3)]|
&DRAW_THREE.LINE3 Craps Parent=| @[space(5)]|
&DRAW_TWO.LINE1 Craps Parent=| @[space(5)]|
&DRAW_TWO.LINE2 Craps Parent=|[space(7)]|
&DRAW_TWO.LINE3 Craps Parent=|[space(5)]@ |
&DRAW_ONE.LINE1 Craps Parent=|[space(7)]|
&DRAW_ONE.LINE2 Craps Parent=|[space(3)]@[space(3)]|
&DRAW_ONE.LINE3 Craps Parent=|[space(7)]|
&DRAW_LAYOUT.LINE1 Craps Parent=%b[repeat(_,49)]%b%b[repeat(_,13)]%b[repeat(_,12)]
&DRAW_LAYOUT.LINE2 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bD%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),space(5))]|[ansi(u(FUN_COLOR,%0,lay_4),_____)]|[ansi(u(FUN_COLOR,%0,lay_5),_____)]|[ansi(u(FUN_COLOR,%0,lay_6),_____)]|[ansi(u(FUN_COLOR,%0,lay_8),_____)]|[ansi(u(FUN_COLOR,%0,lay_9),_____)]|[ansi(u(FUN_COLOR,%0,lay_10),_____)]||[ansi(u(FUN_COLOR,%0,any_seven),space(13))]|[ansi(u(FUN_COLOR,%0,over_seven),Over7)]|[ansi(u(FUN_COLOR,%0,under_seven),Under7)]|
&DRAW_LAYOUT.LINE3 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bP%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bO%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),space(5))]|[ansi(u(FUN_COLOR.Come-Point,%0,don't_come,4),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,don't_come,5),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,don't_come,6),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,don't_come,8),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,don't_come,9),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,don't_come,10),.....)]||[ansi(u(FUN_COLOR,%0,any_seven),%b%bANY SEVEN%b%b)]|-----|------|
&DRAW_LAYOUT.LINE4 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bA%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bN%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),DON'T)]|[ansi(ifelse(eq(v(DATA_POINT),4),hg,n),space(5))]|[ansi(ifelse(eq(v(DATA_POINT),5),hg,n),space(5))]|[ansi(ifelse(eq(v(DATA_POINT),6),hg,n),space(5))]|[ansi(ifelse(eq(v(DATA_POINT),8),hg,n),space(5))]|[ansi(ifelse(eq(v(DATA_POINT),9),hg,n),space(5))]|[ansi(ifelse(eq(v(DATA_POINT),10),hg,n),space(5))]||[ansi(u(FUN_COLOR,%0,any_seven),_____________)]|[ansi(u(FUN_COLOR,%0,hop_1-3),1 & 3)]|[ansi(u(FUN_COLOR,%0,hop_1-5),1 & 5%b)]|
&DRAW_LAYOUT.LINE5 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bS%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bT%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),COME%b)]|[ansi(ifelse(eq(v(DATA_POINT),4),hg,n),%b%b4%b%b)]|[ansi(ifelse(eq(v(DATA_POINT),5),hg,n),%b%b5%b%b)]|[ansi(ifelse(eq(v(DATA_POINT),6),hg,n),%b%b6%b%b)]|[ansi(ifelse(eq(v(DATA_POINT),8),hg,n),%b%b8%b%b)]|[ansi(ifelse(eq(v(DATA_POINT),9),hg,n),%b%b9%b%b)]|[ansi(ifelse(eq(v(DATA_POINT),10),hg,n),%b10%b%b)]||[ansi(u(FUN_COLOR,%0,any_craps),space(13))]|-----|------|
&DRAW_LAYOUT.LINE6 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bS%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%b%b%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),BAR%b%b)]|[ansi(u(FUN_COLOR.Come-Point,%0,come,4),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,come,5),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,come,6),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,come,8),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,come,9),.....)]|[ansi(u(FUN_COLOR.Come-Point,%0,come,10),.....)]||[ansi(u(FUN_COLOR,%0,any_craps),%b%bANY CRAPS%b%b)]|[ansi(u(FUN_COLOR,%0,hop_2-2),2 & 2)]|[ansi(u(FUN_COLOR,%0,hop_3-3),3 & 3%b)]|
&DRAW_LAYOUT.LINE7 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bP%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),space(5))]|_____|_____|_____|_____|_____|_____||[ansi(u(FUN_COLOR,%0,any_craps),_____________)]|-----|------|
&DRAW_LAYOUT.LINE8 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bL%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bA%b)]|[ansi(u(FUN_COLOR.Come,%0,don't_come),_____)]|[ansi(u(FUN_COLOR,%0,place_4),_____)]|[ansi(u(FUN_COLOR,%0,place_5),_____)]|[ansi(u(FUN_COLOR,%0,place_6),_____)]|[ansi(u(FUN_COLOR,%0,place_8),_____)]|[ansi(u(FUN_COLOR,%0,place_9),_____)]|[ansi(u(FUN_COLOR,%0,place_10),_____)]||[ansi(u(FUN_COLOR,%0,hard_4),space(6))]|[ansi(u(FUN_COLOR,%0,hard_6),space(6))]|[ansi(u(FUN_COLOR,%0,hop_1-4),1 & 4)]|[ansi(u(FUN_COLOR,%0,hop_2-4),2 & 4%b)]|
&DRAW_LAYOUT.LINE9 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bI%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bS%b)]|[ansi(u(FUN_COLOR.Come,%0,come),space(35))]|[space(6)]|[ansi(u(FUN_COLOR,%0,hard_4),Hard 4)]|[ansi(u(FUN_COLOR,%0,hard_6),Hard 6)]|-----|------|
&DRAW_LAYOUT.LINE10 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bN%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%bS%b)]|[ansi(u(FUN_COLOR.Come,%0,come),[space(14)]C O M E[space(14)])]|[space(6)]|[ansi(u(FUN_COLOR,%0,hard_4),______)]|[ansi(u(FUN_COLOR,%0,hard_6),______)]|[ansi(u(FUN_COLOR,%0,hop_2-3),2 & 3)]|[ansi(u(FUN_COLOR,%0,hop_1-6),1 & 6%b)]|
&DRAW_LAYOUT.LINE11 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%bE%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),%b%b%b)]|[ansi(u(FUN_COLOR.Come,%0,come),%b%b_________________________________)]|[space(6)]|[ansi(u(FUN_COLOR,%0,hard_10),space(6))]|[ansi(u(FUN_COLOR,%0,hard_8),space(6))]|-----|------|
&DRAW_LAYOUT.LINE12 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),BAR)]|[ansi(u(FUN_COLOR.Come,%0,come),_)]-[ansi(u(FUN_COLOR,%0,field),[space(11)]4%b%b%b%b9%b%b%b10[space(11)])]|[space(6)]|[ansi(u(FUN_COLOR,%0,hard_10),Hard10)]|[ansi(u(FUN_COLOR,%0,hard_8),Hard 8)]|[ansi(u(FUN_COLOR,%0,hop_3-6),3 & 6)]|[ansi(u(FUN_COLOR,%0,hop_2-5),2 & 5%b)]|
&DRAW_LAYOUT.LINE13 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),___)]|[ansi(u(FUN_COLOR,%0,field),[space(9)]3[space(17)]11[space(6)])]|[space(6)]|[ansi(u(FUN_COLOR,%0,hard_10),______)]|[ansi(u(FUN_COLOR,%0,hard_8),______)]|-----|------|
&DRAW_LAYOUT.LINE14 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,big_6),%b%b%b%b)]`\\[ansi(u(FUN_COLOR,%0,field),_%b%b%b2[space(7)]F I E L D[space(8)]12%b%b)]|[space(6)]|[ansi(u(FUN_COLOR,%0,hop_1-2),space(6))]|[ansi(u(FUN_COLOR,%0,hop_1-1),space(6))]|[ansi(u(FUN_COLOR,%0,hop_4-5),4 & 5)]|[ansi(u(FUN_COLOR,%0,hop_3-4),3 & 4%b)]|
&DRAW_LAYOUT.LINE15 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,big_6),BIG 6__)]\\[ansi(u(FUN_COLOR,%0,field),_______________________________)]|[space(6)]|[ansi(u(FUN_COLOR,%0,hop_1-2),1 & 2%b)]|[ansi(u(FUN_COLOR,%0,hop_1-1),1 & 1%b)]|-----|------|
&DRAW_LAYOUT.LINE16 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|[ansi(u(FUN_COLOR,%0,big_6),%b%b_)]/[ansi(u(FUN_COLOR,%0,big_8),'%b%b)]|[ansi(u(FUN_COLOR,%0,don't_pass),space(31))]|[space(6)]|[ansi(u(FUN_COLOR,%0,hop_1-2),______)]|[ansi(u(FUN_COLOR,%0,hop_1-1),______)]|[ansi(u(FUN_COLOR,%0,hop_5-5),5 & 5)]|[ansi(u(FUN_COLOR,%0,hop_4-4),4 & 4%b)]|
&DRAW_LAYOUT.LINE17 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b)]|/[ansi(u(FUN_COLOR,%0,big_8),'BIG 8)]|[ansi(u(FUN_COLOR,%0,don't_pass),D O N ' T%b%b%b%bP A S S%b%b%b%bL I N E)]|[space(6)]|[ansi(u(FUN_COLOR,%0,hop_5-6),space(6))]|[ansi(u(FUN_COLOR,%0,hop_6-6),space(6))]|-----|------|
&DRAW_LAYOUT.LINE18 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),%b%b%b%b)]\\[ansi(u(FUN_COLOR,%0,big_8),______)]|[ansi(u(FUN_COLOR,%0,don't_pass),_______________________________)]|[space(6)]|[ansi(u(FUN_COLOR,%0,hop_5-6),5 & 6%b)]|[ansi(u(FUN_COLOR,%0,hop_6-6),6 & 6%b)]|[ansi(u(FUN_COLOR,%0,hop_4-6),4 & 6)]|[ansi(u(FUN_COLOR,%0,hop_2-6),2 & 6%b)]|
&DRAW_LAYOUT.LINE19 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),space(43))]|[space(6)]|[ansi(u(FUN_COLOR,%0,hop_5-6),______)]|[ansi(u(FUN_COLOR,%0,hop_6-6),______)]|-----|------|
&DRAW_LAYOUT.LINE20 Craps Parent=|[ansi(u(FUN_COLOR,%0,pass),[space(11)]P A S S%b%b%b%bL I N E[space(14)])]|[space(6)]|[ansi(u(FUN_COLOR,%0,horn),%b%b%b%bHORN%b%b%b%b%b)]|[ansi(u(FUN_COLOR,%0,whirl),WHIRL)]|[ansi(u(FUN_COLOR,%0,hop_3-5),3 & 5%b)]|
&DRAW_LAYOUT.LINE21 Craps Parent=`-[ansi(u(FUN_COLOR,%0,pass),__________________________________________)]|[space(6)]`-------------^-----^------'
&DRAW_LAYOUT.LINE22 Craps Parent=* The roller is currently [ansi(v(FONT_LIST.Roller),ifelse(words(v(DATA_PLR.Roller)),name(v(DATA_PLR.Roller)),NO ONE))].
think [ansi(hm,INSTALL:)] Downloading Craps Calculations...
&CALC_DON'T_COME Craps Parent=[ifelse(%3,ifelse(trunc(%2),switch(add(%0,%1),%2,0,7,1,NULL),switch(add(%0,%1),7,0,11,0,2,ifelse(eq(v(CNF_POINT.Barred),2),PUSH,1),3,1,12,ifelse(eq(v(CNF_POINT.Barred),12),PUSH,1),MAKE.Come-Point)),NULL)]
&CALC_COME Craps Parent=[ifelse(%3,ifelse(trunc(%2),switch(add(%0,%1),%2,1,7,0,NULL),switch(add(%0,%1),7,1,11,1,2,0,3,0,11,0,12,0,MAKE.Come-Point)),NULL)]
&CALC_DON'T_PASS Craps Parent=[ifelse(%3,ifelse(v(DATA_POINT),switch(add(%0,%1),v(DATA_POINT),0,7,1,NULL),switch(add(%0,%1),2,ifelse(eq(v(CNF_POINT.Barred),2),PUSH,1),3,1,12,ifelse(eq(v(CNF_POINT.Barred),12),PUSH,1),7,0,11,0,NULL)),NULL)]
&CALC_PASS Craps Parent=[ifelse(%3,ifelse(v(DATA_POINT),switch(add(%0,%1),v(DATA_POINT),1,7,0,NULL),switch(add(%0,%1),2,0,3,0,12,0,7,1,11,1,NULL)),NULL)]
&CALC_LAY_4 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,1,4,0,NULL),NULL)]
&CALC_LAY_5 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,1,5,0,NULL),NULL)]
&CALC_LAY_6 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,1,6,0,NULL),NULL)]
&CALC_LAY_8 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,1,8,0,NULL),NULL)]
&CALC_LAY_9 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,1,9,0,NULL),NULL)]
&CALC_LAY_10 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,1,10,0,NULL),NULL)]
&CALC_PLACE_4 Craps Parent=[ifelse(or(eq(%3,2),and(%3,v(DATA_POINT))),switch(add(%0,%1),7,0,4,1,NULL),NULL)]
&CALC_PLACE_5 Craps Parent=[ifelse(or(eq(%3,2),and(%3,v(DATA_POINT))),switch(add(%0,%1),7,0,5,1,NULL),NULL)]
&CALC_PLACE_6 Craps Parent=[ifelse(or(eq(%3,2),and(%3,v(DATA_POINT))),switch(add(%0,%1),7,0,6,1,NULL),NULL)]
&CALC_PLACE_8 Craps Parent=[ifelse(or(eq(%3,2),and(%3,v(DATA_POINT))),switch(add(%0,%1),7,0,8,1,NULL),NULL)]
&CALC_PLACE_9 Craps Parent=[ifelse(or(eq(%3,2),and(%3,v(DATA_POINT))),switch(add(%0,%1),7,0,9,1,NULL),NULL)]
&CALC_PLACE_10 Craps Parent=[ifelse(or(eq(%3,2),and(%3,v(DATA_POINT))),switch(add(%0,%1),7,0,10,1,NULL),NULL)]
&CALC_FIELD Craps Parent=[ifelse(%3,switch(add(%0,%1),2,1,3,1,4,1,5,0,6,0,7,0,8,0,9,1,10,1,11,1,12,1,NULL),NULL)]
&CALC_BIG_6 Craps Parent=[ifelse(%3,switch(add(%0,%1),6,1,7,0,NULL),NULL)]
&CALC_BIG_8 Craps Parent=[ifelse(%3,switch(add(%0,%1),8,1,7,0,NULL),NULL)]
&CALC_HARD_4 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,0,4,ifelse(and(eq(%0,2),eq(%0,2)),1,0),NULL),NULL)]
&CALC_HARD_6 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,0,6,ifelse(and(eq(%0,3),eq(%0,3)),1,0),NULL),NULL)]
&CALC_HARD_8 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,0,8,ifelse(and(eq(%0,4),eq(%0,4)),1,0),NULL),NULL)]
&CALC_HARD_10 Craps Parent=[ifelse(%3,switch(add(%0,%1),7,0,10,ifelse(and(eq(%0,5),eq(%0,5)),1,0),NULL),NULL)]
think [ansi(hm,INSTALL:)] *STILL* Downloading Craps Calculations...
&CALC_HOP_1-2 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,1),eq(%1,2)),and(eq(%0,2),eq(%1,1))),1,0),NULL)]
&CALC_HOP_5-6 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,5),eq(%1,6)),and(eq(%0,6),eq(%1,5))),1,0),NULL)]
&CALC_HOP_1-1 Craps Parent=[ifelse(%3,ifelse(and(eq(%0,1),eq(%1,1)),1,0),NULL)]
&CALC_HOP_6-6 Craps Parent=[ifelse(%3,ifelse(and(eq(%0,6),eq(%1,6)),1,0),NULL)]
&CALC_HOP_1-3 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,1),eq(%1,3)),and(eq(%0,3),eq(%1,1))),1,0),NULL)]
&CALC_HOP_1-5 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,1),eq(%1,5)),and(eq(%0,5),eq(%1,1))),1,0),NULL)]
&CALC_HOP_2-2 Craps Parent=[ifelse(%3,ifelse(and(eq(%0,2),eq(%1,2)),1,0),NULL)]
&CALC_HOP_3-3 Craps Parent=[ifelse(%3,ifelse(and(eq(%0,3),eq(%1,3)),1,0),NULL)]
&CALC_HOP_1-4 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,1),eq(%1,4)),and(eq(%0,4),eq(%1,1))),1,0),NULL)]
&CALC_HOP_2-4 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,2),eq(%1,4)),and(eq(%0,4),eq(%1,2))),1,0),NULL)]
&CALC_HOP_2-3 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,2),eq(%1,3)),and(eq(%0,3),eq(%1,2))),1,0),NULL)]
&CALC_HOP_1-6 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,1),eq(%1,6)),and(eq(%0,6),eq(%1,1))),1,0),NULL)]
&CALC_HOP_3-6 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,3),eq(%1,6)),and(eq(%0,6),eq(%1,3))),1,0),NULL)]
&CALC_HOP_2-5 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,2),eq(%1,5)),and(eq(%0,5),eq(%1,2))),1,0),NULL)]
&CALC_HOP_4-5 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,4),eq(%1,5)),and(eq(%0,5),eq(%1,4))),1,0),NULL)]
&CALC_HOP_3-4 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,3),eq(%1,4)),and(eq(%0,4),eq(%1,3))),1,0),NULL)]
&CALC_HOP_5-5 Craps Parent=[ifelse(%3,ifelse(and(eq(%0,5),eq(%1,5)),1,0),NULL)]
&CALC_HOP_4-4 Craps Parent=[ifelse(%3,ifelse(and(eq(%0,4),eq(%1,4)),1,0),NULL)]
&CALC_HOP_4-6 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,4),eq(%1,6)),and(eq(%0,6),eq(%1,4))),1,0),NULL)]
&CALC_HOP_2-6 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,2),eq(%1,6)),and(eq(%0,6),eq(%1,2))),1,0),NULL)]
&CALC_HOP_3-5 Craps Parent=[ifelse(%3,ifelse(or(and(eq(%0,3),eq(%1,5)),and(eq(%0,5),eq(%1,3))),1,0),NULL)]
&CALC_WHIRL Craps Parent=[ifelse(%3,switch(add(%0,%1),2,1,3,1,11,1,12,1,7,PUSH,0),NULL)]
&CALC_OVER_SEVEN Craps Parent=[ifelse(%3,ifelse(gt(add(%0,%1),7),1,0),NULL)]
&CALC_UNDER_SEVEN Craps Parent=[ifelse(%3,ifelse(lt(add(%0,%1),7),1,0),NULL)]
&CALC_ANY_SEVEN Craps Parent=[ifelse(%3,ifelse(eq(add(%0,%1),7),1,0),NULL)]
&CALC_ANY_CRAPS Craps Parent=[ifelse(%3,ifelse(member(2 3 12,add(%0,%1)),1,0),NULL)]
&CALC_HORN Craps Parent=[ifelse(%3,switch(add(%0,%1),2,1,3,1,11,1,12,1,0),NULL)]
&CALC_ODDS_ON_COME Craps Parent=[ifelse(%3,switch(add(%0,%1),extract(grab(v(LIST_CRAPS.Bets),%4 come *,|),4,1),1,7,0,NULL),NULL)]
&CALC_ODDS_ON_DON'T_COME Craps Parent=[ifelse(%3,switch(add(%0,%1),extract(grab(v(LIST_CRAPS.Bets),%4 don't_come *,|),4,1),0,7,1,NULL),NULL)]
&CALC_ODDS_ON_PASS Craps Parent=[ifelse(%3,switch(add(%0,%1),v(DATA_POINT),1,7,0,NULL),NULL)]
&CALC_ODDS_ON_DON'T_PASS Craps Parent=[ifelse(%3,switch(add(%0,%1),v(DATA_POINT),0,7,1,NULL),NULL)]
think [ansi(hm,INSTALL:)] Downloading Craps Payoffs...
&PAYOFF_PASS Craps Parent=%0
&PAYOFF_DON'T_PASS Craps Parent=%0
&PAYOFF_COME Craps Parent=%0
&PAYOFF_DON'T_COME Craps Parent=%0
&PAYOFF_LAY_4 Craps Parent=[trunc(sub(fdiv(%0,2),mul(%0,.05)))]
&PAYOFF_LAY_5 Craps Parent=[trunc(sub(fdiv(mul(%0,2),3),mul(%0,.05)))]
&PAYOFF_LAY_6 Craps Parent=[trunc(sub(fdiv(mul(%0,5),6),mul(%0,.05)))]
&PAYOFF_LAY_8 Craps Parent=[trunc(sub(fdiv(mul(%0,5),6),mul(%0,.05)))]
&PAYOFF_LAY_9 Craps Parent=[trunc(sub(fdiv(mul(%0,2),3),mul(%0,.05)))]
&PAYOFF_LAY_10 Craps Parent=[trunc(sub(fdiv(%0,2),mul(%0,.05)))]
&PAYOFF_PLACE_4 Craps Parent=[trunc(mul(fdiv(%0,5),9))]
&PAYOFF_PLACE_5 Craps Parent=[trunc(mul(fdiv(%0,5),7))]
&PAYOFF_PLACE_6 Craps Parent=[trunc(mul(fdiv(%0,6),7))]
&PAYOFF_PLACE_8 Craps Parent=[trunc(mul(fdiv(%0,6),7))]
&PAYOFF_PLACE_9 Craps Parent=[trunc(mul(fdiv(%0,5),7))]
&PAYOFF_PLACE_10 Craps Parent=[trunc(mul(fdiv(%0,5),9))]
&PAYOFF_FIELD Craps Parent=[ifelse(member(2 12,add(%1,%2)),mul(%0,2),%0)]
&PAYOFF_BIG_6 Craps Parent=%0
&PAYOFF_BIG_8 Craps Parent=%0
&PAYOFF_HARD_4 Craps Parent=[mul(7,%0)]
&PAYOFF_HARD_6 Craps Parent=[mul(9,%0)]
&PAYOFF_HARD_8 Craps Parent=[mul(9,%0)]
&PAYOFF_HARD_10 Craps Parent=[mul(9,%0)]
think [ansi(hm,INSTALL:)] *STILL* Downloading Craps Payoffs...
&PAYOFF_HOP_1-2 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_5-6 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_1-1 Craps Parent=[mul(30,%0)]
&PAYOFF_HOP_6-6 Craps Parent=[mul(30,%0)]
&PAYOFF_HOP_1-3 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_1-5 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_2-2 Craps Parent=[mul(30,%0)]
&PAYOFF_HOP_3-3 Craps Parent=[mul(30,%0)]
&PAYOFF_HOP_1-4 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_2-4 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_2-3 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_1-6 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_3-6 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_2-5 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_4-5 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_3-4 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_5-5 Craps Parent=[mul(30,%0)]
&PAYOFF_HOP_4-4 Craps Parent=[mul(30,%0)]
&PAYOFF_HOP_4-6 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_2-6 Craps Parent=[mul(15,%0)]
&PAYOFF_HOP_3-5 Craps Parent=[mul(15,%0)]
&PAYOFF_WHIRL Craps Parent=[switch(add(%1,%2),2,trunc(sub(mul(30,fdiv(%0,5)),mul(fdiv(%0,5),4))),3,trunc(sub(mul(15,fdiv(%0,5)),mul(fdiv(%0,5),4))),11,trunc(sub(mul(15,fdiv(%0,5)),mul(fdiv(%0,5),4))),12,trunc(sub(mul(30,fdiv(%0,5)),mul(fdiv(%0,5),4))))]
&PAYOFF_OVER_SEVEN Craps Parent=%0
&PAYOFF_ANY_CRAPS Craps Parent=[mul(%0,7)]
&PAYOFF_HORN Craps Parent=[switch(add(%1,%2),2,trunc(sub(mul(30,fdiv(%0,4)),mul(fdiv(%0,4),3))),3,trunc(sub(mul(15,fdiv(%0,4)),mul(fdiv(%0,4),3))),11,trunc(sub(mul(15,fdiv(%0,4)),mul(fdiv(%0,4),3))),12,trunc(sub(mul(30,fdiv(%0,4)),mul(fdiv(%0,4),3))))]
&PAYOFF_ODDS_ON_COME Craps Parent=[switch(add(%1,%2),4,mul(%0,2),5,trunc(mul(fdiv(%0,2),3)),6,trunc(mul(fdiv(%0,5),6)),8,trunc(mul(fdiv(%0,5),6)),9,trunc(mul(fdiv(%0,2),3)),10,mul(%0,2))]
&PAYOFF_ODDS_ON_DON'T_COME Craps Parent=[switch(extract(grab(v(LIST_CRAPS.Bets),%3 don't_come *,|),4,1),4,trunc(fdiv(%0,2)),5,trunc(mul(fdiv(%0,3),2)),6,trunc(mul(fdiv(%0,6),5)),8,trunc(mul(fdiv(%0,6),5)),9,trunc(mul(fdiv(%0,3),2)),10,trunc(fdiv(%0,2)))]
&PAYOFF_ODDS_ON_PASS Craps Parent=[switch(add(%1,%2),4,mul(%0,2),5,trunc(mul(fdiv(%0,2),3)),6,trunc(mul(fdiv(%0,5),6)),8,trunc(mul(fdiv(%0,5),6)),9,trunc(mul(fdiv(%0,2),3)),10,mul(%0,2))]
&PAYOFF_ANY_SEVEN Craps Parent=[mul(%0,4)]
&PAYOFF_UNDER_SEVEN Craps Parent=%0
&PAYOFF_ODDS_ON_DON'T_PASS Craps Parent=[switch(v(DATA_POINT),4,trunc(fdiv(%0,2)),5,trunc(mul(fdiv(%0,3),2)),6,trunc(mul(fdiv(%0,6),5)),8,trunc(mul(fdiv(%0,6),5)),9,trunc(mul(fdiv(%0,3),2)),10,trunc(fdiv(%0,2)))]
think [ansi(hm,INSTALL:)] Downloading Craps Timely-Bet-Checks...
&TIME_PASS Craps Parent=[ifelse(v(DATA_POINT),0,1)]
&TIME_DON'T_PASS Craps Parent=[ifelse(v(DATA_POINT),0,1)]
&TIME_COME Craps Parent=[t(v(DATA_POINT))]
&TIME_DON'T_COME Craps Parent=[t(v(DATA_POINT))]
&TIME_ODDS_ON_PASS Craps Parent=[and(match(v(LIST_CRAPS.Bets),%1 pass *,|),v(DATA_POINT))]
&TIME_ODDS_ON_DON'T_PASS Craps Parent=[and(match(v(LIST_CRAPS.Bets),%1 don't_pass *,|),v(DATA_POINT))]
&TIME_ODDS_ON_COME Craps Parent=[and(match(v(LIST_CRAPS.Bets),%1 come *,|),extract(grab(v(LIST_CRAPS.Bets),%1 come *,|),4,1))]
&TIME_ODDS_ON_DON'T_COME Craps Parent=[and(match(v(LIST_CRAPS.Bets),%1 don't_come *,|),extract(grab(v(LIST_CRAPS.Bets),%1 don't_come *,|),4,1))]
think [ansi(hm,INSTALL:)] Downloading Craps Functions...
&FUN_GET.PLR-MONEY Craps Parent=[default(%0/[v(VAR_MONEY)],0)]
&FUN_ENOUGH.MONEY Craps Parent=[gte(trunc(u(FUN_GET.Plr-Money,%0)),trunc(%1))]
&FUN_ENOUGH.ROOM Craps Parent=[lt(words(v(LIST_CRAPS.Playing)),v(DATA_PLAYERS.Max))]
&FUN_PLR.PLAYING Craps Parent=[not(not(member(v(LIST_CRAPS.Playing),%0)))]
&FUN_PLR.BANNED Craps Parent=[not(not(member(v(LIST_CRAPS.Banned),%0)))]
&FUN_PLR.VALID Craps Parent=[hastype(%0,PLAYER)]
&FUN_TYPE.VALID Craps Parent=[t(match(v(LIST_BET.TYPES),edit(%0,%b,_)))]
&FUN_TIME.OK Craps Parent=[udefault(TIME_%0,1,%0,%1,%2)]
&FUN_HAS.TYPE Craps Parent=[t(match(v(LIST_CRAPS.Bets),%0 %1 *,|))]
&FUN_CRAPS.ENOUGH-MONEY Craps Parent=[gte(v(DATA_CRAPS.Money),mul(%0,10))]
&FUN_MONEY.NAME Craps Parent=[ifelse(eq(%0,1),u(DATA_MONEY.Singular),u(DATA_MONEY.Plural))]
&FUN_BET.VALID Craps Parent=[ifelse(match(%0,odds_*),and(gte(%1,v(DATA_BET.Min)),lte(%1,mul(extract(grab(v(LIST_CRAPS.Bets),%2 [after(after(%0,_),_)] *,|),3,1),v(DATA_BET.Odds)))),and(gte(%1,v(DATA_BET.Min)),lte(%1,v(DATA_BET.Max))))]
&FUN_PLR.ENOUGH-MONEY Craps Parent=[gte(xget(%0,v(VAR_MONEY)),%1)]
&FUN_COLOR Craps Parent=[ifelse(match(v(LIST_CRAPS.Bets),%0 %1 *,|),Rw,ifelse(match(v(LIST_CRAPS.Bets),* %1 *,|),Bw,n))]
&FUN_COLOR.COME Craps Parent=[ifelse(trunc(extract(grab(v(LIST_CRAPS.Bets),%0 %1 *,|),4,1)),n,u(FUN_COLOR,%0,%1))]
&FUN_COLOR.COME-POINT Craps Parent=[ifelse(match(v(LIST_CRAPS.Bets),%0 %1 * %2 *,|),Rw,ifelse(match(v(LIST_CRAPS.bets),* %1 * %2 *,|),Bw,n))]
&FUN_PLR.ROLLER Craps Parent=[member(%0,v(DATA_PLR.Roller))]
&FUN_ROLLING Craps Parent=[not(eq(v(FLAG_ROLLING),1))]
&FUN_BUSY2 Craps Parent=[not(eq(v(FLAG_BUSY2),1))]
&FUN_PLR.AUTH Craps Parent=[orflags(%0,Wr)]
think [ansi(hm,INSTALL:)] Downloading Craps Error Messages...
&ERR_PLR_!ROLLER Craps Parent=But you are not the designated roller.
&ERR_!BUSY Craps Parent=But there is no game in progress.
&ERR_BUSY Craps Parent=There is already a game in progress.
&ERR_!ENOUGH_MONEY Craps Parent=You do not have enough money to do that.
&ERR_!ENOUGH_ROOM Craps Parent=There is not enough room at the Craps Table.
&ERR_PLR_PLAYING Craps Parent=But you are already playing at the Craps Table!
&ERR_PLR_BANNED Craps Parent=You are banned from playing Craps.
&ERR_PLR_!VALID Craps Parent=You are not a valid player.
&ERR_OUT_OF_MONEY Craps Parent=The Craps Table does not have enough money to support that bet. Please contact the Casino Owner.
&ERR_PLR_!PLAYING Craps Parent=But you are not playing Craps.
&ERR_TYPE_!VALID Craps Parent=That is not a valid type of bet.
&ERR_BET_!VALID Craps Parent=[ifelse(match(%1,odds_*),Your bet must be between [v(DATA_BET.Min)] and [mul(v(DATA_BET.Odds),extract(grab(v(LIST_CRAPS.Bets),%0 [after(after(%1,_),_)] *,|),3,1))].,Your bet must be between [v(DATA_BET.Min)] and [v(DATA_BET.Max)].)]
&ERR_TIME_!VALID Craps Parent=You cannot make that bet at this time in the game.
&ERR_HAS_BET Craps Parent=You already have that type of bet placed. You must first '[ansi(v(FONT_CRAPS.Cmds),craps/remove <type>)]'.
&ERR_SYS_BUSY Craps Parent=The system is currently busy.
&ERR_ALREADY_ROLLING Craps Parent=A roll is already scheduled.
&ERR_PLR_!IDLEOUT Craps Parent=The current roller has NOT failed to roll in a timely fashion.
&ERR_PLR_ROLLER Craps Parent=But you are the current roller!
&ERR_PLR_!AUTH Craps Parent=You are not authorized to do that.
think [ansi(hm,INSTALL:)] Downloading Craps Game Messages...
&MSG_CRAPS_STARTING Craps Parent=A new game of Craps is beginning! Gather 'round and place your bets.
&MSG_SAME_SHOOTER Craps Parent=Let's use the same shooter as before.
&MSG_DIFFERENT_SHOOTER Craps Parent=The stickman hands [name(%0)] the dice, "You are now the shooter!"
&MSG_PLR_ROLLS Craps Parent=[name(%0)] rolls a %1 and a %2 for a total of [add(%1,%2)].%r[u(DRAW_DICE,%1,%2)]
&MSG_PLR_BET Craps Parent=[name(%0)] makes a bet of %2 [u(FUN_MONEY.Name,%2)] on [ucstr(edit(%1,_,%b))].
&MSG_PLR_PLAYS Craps Parent=[name(%0)]\(%0\) steps toward the edge of the table\, ready to play.
&MSG_PLR_WINS Craps Parent=[name(%0)] <<< WINS >>> %2 [u(FUN_MONEY.Name,%2)] with [poss(%0)] [edit(ucstr(%1),_,%b)] bet!
&MSG_PLR_LOSES Craps Parent=[name(%0)] loses [poss(%0)] [edit(ucstr(%1),_,%b)] bet.
&MSG_MAKE_POINT Craps Parent=The point is now [add(%1,%2)].
&MSG_MAKE_COME-POINT Craps Parent=The come-point is now [add(%1,%2)]
&MSG_RESET_FULL Craps Parent=The Craps Table has been reset. Type '[ansi(v(FONT_CRAPS.Cmds),craps/start)]' to begin a new game.
&MSG_SEPARATOR Craps Parent=[ansi(hg,repeat(=,40))]
&MSG_NEW_ROLLER Craps Parent=The stickman hands the dice to [ansi(hc,name(%0))] and says "Change of rollers!"
&MSG_MAKE_COME_POINT Craps Parent=[name(%0)] now has a [ucstr(edit(%1,_,%b))] point of %2.
&MSG_POINT Craps Parent=The point of [add(%0,%1)] is made.
&MSG_RESET Craps Parent=The rolling sequence has ended. The POINT has been reset.
&MSG_PLR_PUSHES Craps Parent=[name(%0)] PUSHES with [poss(%0)] [edit(ucstr(%1),_,%b)] bet!
&MSG_ROLL_STARTING Craps Parent=The stickman says, "[name(%0)] will roll soon. Finish betting."
&MSG_PLR_BLOWS Craps Parent=[switch(rand(10),1,[name(%0)] blows on the dice\, "[ifelse(match(xget(%0,sex),f*),Mommy,Daddy)] needs a new pair of shoes!",0,[name(%0)] kisses the dice for good luck.,[name(%0)] [ifelse(gte(#$,6),shakes the dice violently in [poss(%0)] hands.,rattles the dice gently in one hand.)])]
&MSG_NEW_ROLLER.REQUEST Craps Parent=The stickman says "Picking a new roller upon [name(%0)]'s request."
&MSG_PLR_SETUP Craps Parent=[name(%0)]\(%0\) has RESET the Craps Table.
think [ansi(hm,INSTALL:)] Downloading Craps Softcode Flags...
&FLAG_BUSY Craps Parent=0
&FLAG_ROLLING Craps Parent=0
&FLAG_BUSY2 Craps Parent=0
think [ansi(hm,INSTALL:)] Downloading Craps Data...
&DATA_CRAPS.Money Craps Parent=1000000
&DATA_PLAYERS.MAX Craps Parent=20
&DATA_BET.MIN Craps Parent=5
&DATA_BET.MAX Craps Parent=500
&DATA_MONEY.SINGULAR Craps Parent=dollar
&DATA_MONEY.PLURAL Craps Parent=dollars
&DATA_DELAY.START Craps Parent=15
&DATA_LAST.ROLL Craps Parent=0
&DATA_TIME.IDLEOUT Craps Parent=180
&DATA_POINT Craps Parent=0
&DATA_BET.ODDS Craps Parent=2
&DATA_VERSION Craps Parent=1.4
think [ansi(hm,INSTALL:)] Downloading Craps Lists...
&LIST_ATTRIBUTES Craps Parent=AENTER ALEAVE CALC CMD DATA DESCRIBE DRAW ENTER ERR FAILURE FLAG FONT FUN LASTPAGED LEAVE LIST LOCK MSG OENTER OLEAVE OXENTER OXLEAVE PAYOFF TIME TRI VAR
&LIST_BET.TYPES Craps Parent=any_craps any_seven under_seven over_seven whirl horn hop_3-5 hop_2-6 hop_4-6 hop_4-4 hop_5-5 hop_3-4 hop_4-5 hop_2-5 hop_3-6 hop_1-6 hop_2-3 hop_2-4 hop_1-4 hop_3-3 hop_2-2 hop_1-5 hop_1-3 hop_6-6 hop_1-1 hop_5-6 hop_1-2 hard_10 hard_8 hard_6 hard_4 big_8 big_6 field place_10 place_9 place_8 place_6 place_5 place_4 lay_10 lay_9 lay_8 lay_6 lay_5 lay_4 pass don't_pass come don't_come odds_on_pass odds_on_don't_pass odds_on_come odds_on_don't_come
think [ansi(hm,INSTALL:)] Downloading Craps Locks...
&LOCK_AT.TABLE Craps Parent=[member(%l,%!)]
think [ansi(hm,INSTALL:)] Downloading Craps Variables...
&VAR_MONEY Craps Parent=Econ_Money
think [ansi(hm,INSTALL:)] Downloading Craps Prefixes...
&DATA_PREFIX.WARN Craps Parent=[ansi(hy,WARN:)]
&DATA_PREFIX.GAME Craps Parent=[ansi(hg,GAME:)]
&DATA_PREFIX.ERROR Craps Parent=[ansi(hr,ERROR:)]
&DATA_PREFIX.SYSERR Craps Parent=[ansi(fhr,SYSERR:)]
think [ansi(hm,INSTALL:)] [ansi(hr,Download is complete! Now you must do the following:)]
think [ansi(hm,INSTALL:)] %b%b%b- @create a craps table and drop it
think [ansi(hm,INSTALL:)] %b%b%b- @parent the created object to the Craps Parent
think [ansi(hm,INSTALL:)] %b%b%b- @set the created object !NO_COMMAND and !HALT
think [ansi(hm,INSTALL:)] %b%b%b- Enter the created object and type craps/setup
think [ansi(hm,INSTALL:)] %b%b%b- Set the object WIZARD if others will be using it.
think [ansi(hm,INSTALL:)] %b%b%b- BE SURE TO SET &VAR_MONEY ON THE CRAPS PARENT. It
think [ansi(hm,INSTALL:)] %b%b%b%b should be set to the name of the variable you use for money.
think [ansi(hm,INSTALL:)]
think [ansi(hm,INSTALL:)] The Copyright must stay with this code. If you have any questions
think [ansi(hm,INSTALL:)] or complaints \(bug reports\) concerning this code\, please contact
think [ansi(hm,INSTALL:)] me at: [ansi(hc,worldwar@bb6.betterbox.net)]. Thank you.
@set me=!quiet