Instructions

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

MUSHCode for Golden Ducat Casino

@@ Project javGoldenDucat
@@ Version 18
@@
@@ Description:
@@ Javelin's Golden Ducat Casino, including Baccarat, Craps and
@@ Roulette.
@@
@@ Version log:
@@ Author: Walker <Mush>
@@ Date: Tue Jul 27 21:04:18 2010 -0700
@@ v18v
@@
@@ Lock changes in svc recognize "changes" :D.
@@
@@ Readme:
@@ This uses listen patterns, and has been known to break on
@@ some @hook'd say commands. null_eq_zero needs to be set to
@@ "yes" for Golden Ducat.
@@
@@ Language: MushCode
@@ Installer file created by RubySVC (Softcode Version Control)
@@
@@
@@
@@ Creating Rooms, Things and Exits.
@@
@@
@set me=SVC`Rf32175928c437fc65afe:[default(SVC`Rf32175928c437fc65afe,dig(Rf32175928c437fc65afe))]
@set me=SVC`Rb45f2571a5f61ff1ff17:[default(SVC`Rb45f2571a5f61ff1ff17,dig(Rb45f2571a5f61ff1ff17))]
@set me=SVC`R49a17f78a873806adbd2:[default(SVC`R49a17f78a873806adbd2,dig(R49a17f78a873806adbd2))]
@set me=SVC`R5ecd4f8f12f9dbd63587:[default(SVC`R5ecd4f8f12f9dbd63587,dig(R5ecd4f8f12f9dbd63587))]
@set me=SVC`T3c763130274d176cd116:[default(SVC`T3c763130274d176cd116,create(T3c763130274d176cd116))]
@set me=SVC`Te8c003561ba7f45b57ab:[default(SVC`Te8c003561ba7f45b57ab,create(Te8c003561ba7f45b57ab))]
@set me=SVC`T7d1c9a0b66f718acf350:[default(SVC`T7d1c9a0b66f718acf350,create(T7d1c9a0b66f718acf350))]
@set me=SVC`Te39a2b653594afcd9d6c:[default(SVC`Te39a2b653594afcd9d6c,create(Te39a2b653594afcd9d6c))]
@set me=SVC`T5c94cea68131e6d41e19:[default(SVC`T5c94cea68131e6d41e19,create(T5c94cea68131e6d41e19))]
@set me=SVC`Tf48885245b94665626fd:[default(SVC`Tf48885245b94665626fd,create(Tf48885245b94665626fd))]
@set me=SVC`Tf9e5b23fc74a8983baab:[default(SVC`Tf9e5b23fc74a8983baab,create(Tf9e5b23fc74a8983baab))]
@tel v(SVC`Rf32175928c437fc65afe)
@set me=SVC`Ec3a2491940c92070eba7:[default(SVC`Ec3a2491940c92070eba7,open(Ec3a2491940c92070eba7,R5ecd4f8f12f9dbd63587))]
@tel v(SVC`R5ecd4f8f12f9dbd63587)
@set me=SVC`E770b34b26e3ae276c915:[default(SVC`E770b34b26e3ae276c915,open(E770b34b26e3ae276c915,Rf32175928c437fc65afe))]
@tel v(SVC`R49a17f78a873806adbd2)
@set me=SVC`Ea642e1931111475a8a09:[default(SVC`Ea642e1931111475a8a09,open(Ea642e1931111475a8a09,Rb45f2571a5f61ff1ff17))]
@tel v(SVC`Rb45f2571a5f61ff1ff17)
@set me=SVC`E59272e58ec62a4881bf0:[default(SVC`E59272e58ec62a4881bf0,open(E59272e58ec62a4881bf0,R49a17f78a873806adbd2))]
@tel v(SVC`R5ecd4f8f12f9dbd63587)
@set me=SVC`E592c7eaffb85b23299e0:[default(SVC`E592c7eaffb85b23299e0,open(E592c7eaffb85b23299e0,Rb45f2571a5f61ff1ff17))]
@tel v(SVC`Rb45f2571a5f61ff1ff17)
@set me=SVC`Efd3767dd926934d25bb7:[default(SVC`Efd3767dd926934d25bb7,open(Efd3767dd926934d25bb7,R5ecd4f8f12f9dbd63587))]
@tel v(SVC`Rb45f2571a5f61ff1ff17)
@set me=SVC`E69ea522b635f59fded38:[default(SVC`E69ea522b635f59fded38,open(E69ea522b635f59fded38,Rf32175928c437fc65afe))]
@tel v(SVC`Rf32175928c437fc65afe)
@set me=SVC`E4f11cb844f4b875b2a89:[default(SVC`E4f11cb844f4b875b2a89,open(E4f11cb844f4b875b2a89,Rb45f2571a5f61ff1ff17))]
@@
@@
@@ Objects created, now setting attributes, locks, etc.
@@
@@
@@
@@ Filling out Craps Pit <CP>\;craps\;cp\;pit
@@
@name [v(SVC`Ec3a2491940c92070eba7)]=Craps Pit <CP>;craps;cp;pit
@link [v(SVC`Ec3a2491940c92070eba7)]=v(SVC`R5ecd4f8f12f9dbd63587)
@tel [v(SVC`Ec3a2491940c92070eba7)]=v(SVC`Rf32175928c437fc65afe)
@set [v(SVC`Ec3a2491940c92070eba7)]=iter(setdiff(lflags([v(SVC`Ec3a2491940c92070eba7)]),),!##) [setdiff(,lflags([v(SVC`Ec3a2491940c92070eba7)]))]
&SUCCESS [v(SVC`Ec3a2491940c92070eba7)]=You wander into the craps pit.
&OSUCCESS [v(SVC`Ec3a2491940c92070eba7)]=wanders into the craps pit.
&ODROP [v(SVC`Ec3a2491940c92070eba7)]=wanders in from the roulette parlor.
@set [v(SVC`Ec3a2491940c92070eba7)]/SUCCESS=no_command
@set [v(SVC`Ec3a2491940c92070eba7)]/OSUCCESS=no_command
@set [v(SVC`Ec3a2491940c92070eba7)]/ODROP=no_command
@@
@@ Filling out Roulette Parlor <RP>\;rp\;roulette\;parlor
@@
@name [v(SVC`E770b34b26e3ae276c915)]=Roulette Parlor <RP>;rp;roulette;parlor
@link [v(SVC`E770b34b26e3ae276c915)]=v(SVC`Rf32175928c437fc65afe)
@tel [v(SVC`E770b34b26e3ae276c915)]=v(SVC`R5ecd4f8f12f9dbd63587)
@set [v(SVC`E770b34b26e3ae276c915)]=iter(setdiff(lflags([v(SVC`E770b34b26e3ae276c915)]),),!##) [setdiff(,lflags([v(SVC`E770b34b26e3ae276c915)]))]
&SUCCESS [v(SVC`E770b34b26e3ae276c915)]=You wander into the roulette parlor.
&OSUCCESS [v(SVC`E770b34b26e3ae276c915)]=wanders into the roulette parlor.
&ODROP [v(SVC`E770b34b26e3ae276c915)]=wanders in from the craps pit.
@set [v(SVC`E770b34b26e3ae276c915)]/SUCCESS=no_command
@set [v(SVC`E770b34b26e3ae276c915)]/OSUCCESS=no_command
@set [v(SVC`E770b34b26e3ae276c915)]/ODROP=no_command
@@
@@ Filling out Roulette Parlor
@@
@chzone [v(SVC`Rf32175928c437fc65afe)]=v(SVC`T3c763130274d176cd116)
@name [v(SVC`Rf32175928c437fc65afe)]=Roulette Parlor
@set [v(SVC`Rf32175928c437fc65afe)]=iter(setdiff(lflags([v(SVC`Rf32175928c437fc65afe)]),NO_COMMAND),!##) [setdiff(NO_COMMAND,lflags([v(SVC`Rf32175928c437fc65afe)]))]
&DESCRIBE [v(SVC`Rf32175928c437fc65afe)]=The roulette parlor of the Golden Ducat is decorated in vibrant colors. The sound of the spinning wheel and bouncing ball are clearly audible. Guests line the tables, placing their wagers and hoping to win big.
@set [v(SVC`Rf32175928c437fc65afe)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Lobby of the Golden Ducat
@@
@chzone [v(SVC`Rb45f2571a5f61ff1ff17)]=v(SVC`T3c763130274d176cd116)
@name [v(SVC`Rb45f2571a5f61ff1ff17)]=Lobby of the Golden Ducat
@set [v(SVC`Rb45f2571a5f61ff1ff17)]=iter(setdiff(lflags([v(SVC`Rb45f2571a5f61ff1ff17)]),NO_COMMAND),!##) [setdiff(NO_COMMAND,lflags([v(SVC`Rb45f2571a5f61ff1ff17)]))]
&FIL_SEX [v(SVC`Rb45f2571a5f61ff1ff17)]=[regmatch(xget(%0,sex),^\[WwMmFf\])]
&DESCRIBE [v(SVC`Rb45f2571a5f61ff1ff17)]=The lobby of the Golden Ducat Casino is opulently furnished with massive glass chandeliers, plush carpet, and paintings of famous visitors, including [name(first(shuffle(filter(FIL_SEX,mwho()))))]. The cashier's desk is the primary feature here, and the casino stretches away from the entrance doors.
@set [v(SVC`Rb45f2571a5f61ff1ff17)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Lobby <O>\;lobby\;lo\;lob\;o\;out\;back\;leave
@@
@name [v(SVC`Ea642e1931111475a8a09)]=Lobby <O>;lobby;lo;lob;o;out;back;leave
@link [v(SVC`Ea642e1931111475a8a09)]=v(SVC`Rb45f2571a5f61ff1ff17)
@tel [v(SVC`Ea642e1931111475a8a09)]=v(SVC`R49a17f78a873806adbd2)
@set [v(SVC`Ea642e1931111475a8a09)]=iter(setdiff(lflags([v(SVC`Ea642e1931111475a8a09)]),),!##) [setdiff(,lflags([v(SVC`Ea642e1931111475a8a09)]))]
&SUCCESS [v(SVC`Ea642e1931111475a8a09)]=You pass through the rope and return to the lobby.
&OSUCCESS [v(SVC`Ea642e1931111475a8a09)]=returns to the lobby.
&ODROP [v(SVC`Ea642e1931111475a8a09)]=enters from the baccarat area.
@set [v(SVC`Ea642e1931111475a8a09)]/SUCCESS=no_command
@set [v(SVC`Ea642e1931111475a8a09)]/OSUCCESS=no_command
@set [v(SVC`Ea642e1931111475a8a09)]/ODROP=no_command
@@
@@ Filling out Baccarat Area
@@
@chzone [v(SVC`R49a17f78a873806adbd2)]=v(SVC`T3c763130274d176cd116)
@name [v(SVC`R49a17f78a873806adbd2)]=Baccarat Area
@lock/Zone [v(SVC`R49a17f78a873806adbd2)]==[v(SVC`R49a17f78a873806adbd2)]
@lock/USER:Zone [v(SVC`R49a17f78a873806adbd2)]==[v(SVC`R49a17f78a873806adbd2)]
@set [v(SVC`R49a17f78a873806adbd2)]=iter(setdiff(lflags([v(SVC`R49a17f78a873806adbd2)]),NO_COMMAND),!##) [setdiff(NO_COMMAND,lflags([v(SVC`R49a17f78a873806adbd2)]))]
&DESCRIBE [v(SVC`R49a17f78a873806adbd2)]=The baccarat area is separated from the rest of the casino by a thick velvet rope. The atmosphere here is more hushed, and more elegant.
@set [v(SVC`R49a17f78a873806adbd2)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Casino ZMO
@@
@name [v(SVC`T3c763130274d176cd116)]=Casino ZMO
@lock/USER:Zone [v(SVC`T3c763130274d176cd116)]==%!|=#3817
@link [v(SVC`T3c763130274d176cd116)]=v(SVC`Rb45f2571a5f61ff1ff17)
@set [v(SVC`T3c763130274d176cd116)]=iter(setdiff(lflags([v(SVC`T3c763130274d176cd116)]),),!##) [setdiff(,lflags([v(SVC`T3c763130274d176cd116)]))]
&CMD_CHIPS [v(SVC`T3c763130274d176cd116)]=$chips: @pemit %#=[switch(setr(0,default([v(bank)]/%#,0)),0,You have no chips.,1,You have one chip.,You have %q0 chips.)]
@set [v(SVC`T3c763130274d176cd116)]=BANK:[v(SVC`T7d1c9a0b66f718acf350)]
@@
@@ Filling out Craps Pit
@@
@chzone [v(SVC`R5ecd4f8f12f9dbd63587)]=v(SVC`T3c763130274d176cd116)
@name [v(SVC`R5ecd4f8f12f9dbd63587)]=Craps Pit
@set [v(SVC`R5ecd4f8f12f9dbd63587)]=iter(setdiff(lflags([v(SVC`R5ecd4f8f12f9dbd63587)]),NO_COMMAND),!##) [setdiff(NO_COMMAND,lflags([v(SVC`R5ecd4f8f12f9dbd63587)]))]
&DESCRIBE [v(SVC`R5ecd4f8f12f9dbd63587)]=The craps pit is a noisy, even frantic, place. The sounds of the croupiers mingle with the excited exclamations from the players as the dice are thrown again and again.
@set [v(SVC`R5ecd4f8f12f9dbd63587)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Baccarat Area <BA>\;baccarat\;ba
@@
@name [v(SVC`E59272e58ec62a4881bf0)]=Baccarat Area <BA>;baccarat;ba
@lock/Basic [v(SVC`E59272e58ec62a4881bf0)]=HASCHIPS/1
@link [v(SVC`E59272e58ec62a4881bf0)]=v(SVC`R49a17f78a873806adbd2)
@tel [v(SVC`E59272e58ec62a4881bf0)]=v(SVC`Rb45f2571a5f61ff1ff17)
@set [v(SVC`E59272e58ec62a4881bf0)]=iter(setdiff(lflags([v(SVC`E59272e58ec62a4881bf0)]),),!##) [setdiff(,lflags([v(SVC`E59272e58ec62a4881bf0)]))]
&SUCCESS [v(SVC`E59272e58ec62a4881bf0)]=You pass through the velvet rope and into the baccarat area.
&OSUCCESS [v(SVC`E59272e58ec62a4881bf0)]=passes through the the velvet rope and into the baccarat area.
&OFAILURE [v(SVC`E59272e58ec62a4881bf0)]=attempts to pass through the velvet rope to the baccarat area but is turned away by a casino manager.
&ODROP [v(SVC`E59272e58ec62a4881bf0)]=enters from the lobby.
&HASCHIPS [v(SVC`E59272e58ec62a4881bf0)]=[gt(xget(v(bank),%#),249)]
&FAILURE [v(SVC`E59272e58ec62a4881bf0)]=You are stopped by the manager of the area. "I'm sorry, but you must have more chips to play here."
&DESCRIBE [v(SVC`E59272e58ec62a4881bf0)]=The baccarat area is cordoned off with a velvet rope.
@set [v(SVC`E59272e58ec62a4881bf0)]=BANK:[v(SVC`T7d1c9a0b66f718acf350)]
@set [v(SVC`E59272e58ec62a4881bf0)]/SUCCESS=no_command
@set [v(SVC`E59272e58ec62a4881bf0)]/OSUCCESS=no_command
@set [v(SVC`E59272e58ec62a4881bf0)]/OFAILURE=no_command
@set [v(SVC`E59272e58ec62a4881bf0)]/ODROP=no_command
@set [v(SVC`E59272e58ec62a4881bf0)]/FAILURE=no_command
@set [v(SVC`E59272e58ec62a4881bf0)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Roulette table
@@
@name [v(SVC`Te8c003561ba7f45b57ab)]=Roulette table
@lock/USER:Basic [v(SVC`Te8c003561ba7f45b57ab)]=%!
@lock/Basic [v(SVC`Te8c003561ba7f45b57ab)]=%!
@tel [v(SVC`Te8c003561ba7f45b57ab)]=v(SVC`Rf32175928c437fc65afe)
@link [v(SVC`Te8c003561ba7f45b57ab)]=v(SVC`Rf32175928c437fc65afe)
@set [v(SVC`Te8c003561ba7f45b57ab)]=iter(setdiff(lflags([v(SVC`Te8c003561ba7f45b57ab)]),),!##) [setdiff(,lflags([v(SVC`Te8c003561ba7f45b57ab)]))]
&WINNERS [v(SVC`Te8c003561ba7f45b57ab)]=[iter(lattr(me/bet_*),if(u(fil_winners,[v(##)] %0),##))]
&WHEEL [v(SVC`Te8c003561ba7f45b57ab)]=0 32 15 19 4 21 2 25 17 34 6 27 13 36 11 30 8 23 10 5 24 16 33 1 20 14 31 9 22 18 29 7 28 12 35 3 26
&USE [v(SVC`Te8c003561ba7f45b57ab)]=ROULETTE by Javelin%r[wrap([space(2)]Roulette is played by laying a bet on one or more numbers. If the wheel lands on a number you've bet on\, you win. The amount you win depends on the bet (betting more numbers at once results in smaller winnings).,72,72,%r[space(2)])]%rBET COMMAND:%r%b%bbet <amount> on <type of bet>%rTYPES OF BET:%r%b%b"Straight up": A single number, pays 35:1 (bet 10 on 3)%r%b%b"Split bet": Two adjacent (horiz or vert) numbers, pays 17:1 (bet 10 on 1-4)%r%b%b"Street bet": Three numbers in a vertical row, pays 11:1 (bet 10 on 1-2-3)%r%b%b"Corner bet": Four numbers in a square, pays 8:1 (bet 10 on 1-2-4-5)%r%b%b"Line bet": Six numbers (two adjacent streets), pays 5:1 (bet 10 on 1-2-3-4-5-6)%r%b%b"Column bet": Twelve numbers in a horiz column, pays 2:1 (bet 10 on col1)%r%b%b"Dozen bet": Twelve numbers in a group, pays 2:1 (bet 10 on 1st)%r%b%b"Even money bets": (bet 10 on \[high|low|red|black|even|odd\]%rNote: 0 loses on all bets except a bet specifically on 0.
&TABLE [v(SVC`Te8c003561ba7f45b57ab)]=[space(4)][iter(lnum(12),[center(u(betmark,[setr(9,add(1,mul(##,3)))]-[inc(%q9)]-[add(2,%q9)],%#,%b),4)][u(betmark,lnum(%q9,add(5,%q9),-),%#,%b)],%b,)]%r[space(4)][iter(lnum(12),[ljust(u(blank,add(1,mul(##,3))),4)])] \\%r[space(4)][iter(lnum(12),[ljust(u(number,setr(9,add(1,mul(##,3)))),4)][u(betmark,%q9-[add(%q9,3)],%#,%b)],%b,)] |-col1 [u(betmark,col1,%#)]%r[space(4)][iter(lnum(12),ljust(u(blank,add(1,mul(##,3))),4))] /%r[space(4)][iter(lnum(12),[center(%b[u(betmark,[setr(9,add(1,mul(##,3)))]-[inc(%q9)],%#)],4)][u(betmark,%q9-[inc(%q9)]-[add(%q9,3)]-[add(%q9,4)],%#,%b)],%b,)]%r[u(blank,0)]%b[iter(lnum(12),[ljust(u(blank,add(2,mul(##,3))),4)])] \\%r[u(number,0)]%b[iter(lnum(12),[ljust(u(number,setr(9,add(2,mul(##,3)))),4)][u(betmark,%q9-[add(%q9,3)],%#,%b)],%b,)] |-col2 [u(betmark,col2,%#)]%r[u(blank,0)]%b[iter(lnum(12),[ljust(u(blank,add(2,mul(##,3))),4)])] /%r[space(4)][iter(lnum(12),[center(%b[u(betmark,[setr(9,add(2,mul(##,3)))]-[inc(%q9)],%#)],4)][u(betmark,%q9-[inc(%q9)]-[add(%q9,3)]-[add(%q9,4)],%#,%b)],%b,)]%r[space(4)][iter(lnum(12),[ljust(u(blank,add(3,mul(##,3))),4)])] \\%r[space(4)][iter(lnum(12),[ljust(u(number,setr(9,add(3,mul(##,3)))),4)][u(betmark,%q9-[add(%q9,3)],%#,%b)],%b,)] |-col3 [u(betmark,col3,%#)]%r[space(4)][iter(lnum(12),[ljust(u(blank,add(3,mul(##,3))),4)])] /%r%b%b%b|--[center(1st 12,15,-)][u(betmark,1st,%#,-)]-|--[center(2nd 12,15,-)][u(betmark,2nd,%#,-)]-|--[center(3rd 12,15,-)][u(betmark,3rd,%#,-)]-|%r%b%b%b|---Low-[u(betmark,low,%#,-)]-|--Even-[u(betmark,even,%#,-)]-|---[ansi(r,Red)]-[u(betmark,red,%#,-)]-|--Black[u(betmark,black,%#,-)]-|---Odd-[u(betmark,odd,%#,-)]-|--High-[u(betmark,high,%#,-)]-|
&SUBJ [v(SVC`Te8c003561ba7f45b57ab)]=She
&STARTUP [v(SVC`Te8c003561ba7f45b57ab)]=@drain me; @wipe me/bet_*; &nextbet me=1
&SPIN [v(SVC`Te8c003561ba7f45b57ab)]=@drain me; @wait 1 = { @emit [v(subj)] spins the roulette wheel and drops the ball onto the wheel.;@wait 2 = { @emit The wheel slows.;@wait me = { @wipe me/bet_*; @emit The croupier says, "Place your bets."; &ok_to_bet me = 1 };@tr me/result2 }}
&SORT_RESULT_ONCE [v(SVC`Te8c003561ba7f45b57ab)]=[switch(1,cand(regmatch(%0,\[a-z\]),not(regmatch(%1,\[a-z\]))),1,regmatch(%0,\[a-z\]),comp(%0,%1),not(regmatch(%1,\[a-z\])),comp(%0,%1),-1)]
&SORT_RESULT [v(SVC`Te8c003561ba7f45b57ab)]=[sortby(SORT_RESULT_ONCE,%0)]
&RESULT2 [v(SVC`Te8c003561ba7f45b57ab)]=@emit The ball bounces into a slot: [setq(0,first(shuffle(v(wheel))))][u(plainnum,%q0)], [u(colname,%q0)]; @dol/notify [setr(3,u(winners,%q0))] = { @emit The croupier looks at [name(setr(1,extract(v(##),4,1)))]. "[ulocal(fullname,first(v(##)))], winner." [v(subj)] passes [obj(%q1)] [u(count,setr(2,ulocal(compute_result,%q0,v(##))))].;&%q1 [v(bank)] = [add(xget(v(bank),%q1),%q2)]};@emit [setq(5,u(listformat,setunion(iter(munge(sort_result,iter(setr(4,setdiff(lattr(me/bet_*),%q3)),first(v(itext(0)))),%q4),ulocal(fullname,first(v(itext(0)))), ,|),,|),and,|))][switch(%q5,,,"%q5\, no good\," the croupier announces.)]
&PLAINNUM [v(SVC`Te8c003561ba7f45b57ab)]=[ansi(u(colattr,%0),[switch(%0,0,,<10,%b)]%b%0%b)]
&OK_TO_BET [v(SVC`Te8c003561ba7f45b57ab)]=1
&OKGROUP [v(SVC`Te8c003561ba7f45b57ab)]=[iter(%0,setq(#@,##),-,)][switch(words(%0,-),1,cand(gte(%0,0),lte(%0,36)),2,cor(cand(gte(%q1,1),lte(%q1,33),eq(%q2,add(%q1,3))),cand(gte(%q1,1),lte(%q1,35),gt(mod(%q1,3),0),eq(%q2,inc(%q1)))),3,cand(gte(%q1,1),lte(%q1,34),eq(mod(%q1,3),1),eq(%q2,inc(%q1)),eq(%q3,inc(%q2))),4,cand(gte(%q1,1),lte(%q1,32),gt(mod(%q1,3),0),eq(%q2,inc(%q1)),eq(%q3,add(%q1,3)),eq(%q4,inc(%q3))),6,cand(gte(%q1,1),lte(%q1,31),eq(mod(%q1,3),1),eq(%q2,inc(%q1)),eq(%q3,inc(%q2)),eq(%q4,inc(%q3)),eq(%q5,inc(%q4)),eq(%q6,inc(%q5))),0)]
&NUMBER [v(SVC`Te8c003561ba7f45b57ab)]=[ansi(u(colattr,%0),[switch(%0,0,,<10,%b)][switch(u(isbet,%0),>1,$,%b)]%0[switch(u(isbet,%0),>0,$,%b)])]
&NEXTBET [v(SVC`Te8c003561ba7f45b57ab)]=1
&MONEY [v(SVC`Te8c003561ba7f45b57ab)]=[default([v(bank)]/%0,0)]
&MINIMUM [v(SVC`Te8c003561ba7f45b57ab)]=1
&LISTFORMAT [v(SVC`Te8c003561ba7f45b57ab)]=switch(words(%0,%2),0,,1,,2,first(%0,%2) %1%b,edit(extract(%0,1,dec(#$),%2),%2,\,%b)\, %1%b)[last(%0,%2)]
&ISYOURBET [v(SVC`Te8c003561ba7f45b57ab)]=[words(regrep(me,BET_*,^%0\\s+\\d+\\s+\\d+\\s+%1$))]
&ISBET [v(SVC`Te8c003561ba7f45b57ab)]=[words(regrep(me,BET_*,^%0\\s))]
&FULLNAME [v(SVC`Te8c003561ba7f45b57ab)]=[switch(%0,col*,edit(%0,col,Column%b),1st,1st dozen,2nd,2nd dozen,3rd,3rd dozen,capstr(%0))]
&FIL_WINNERS [v(SVC`Te8c003561ba7f45b57ab)]=[gt(ulocal(compute_result2,%0),0)]
&DESCRIBE [v(SVC`Te8c003561ba7f45b57ab)]=You glance from the well-coiffed croupier down to the felt of the table.%r[u(table)]%rType 'use table' for play instructions.
&COUNT [v(SVC`Te8c003561ba7f45b57ab)]=[switch(%0,1,a chip,%0 chips)]
&COMPUTE_RESULT2 [v(SVC`Te8c003561ba7f45b57ab)]=[setq(1,last(%0))][setq(0,first(%0))][setq(9,extract(%0,3,1))][switch(1,eq(%q0,%q1),%q9,eq(%q1,0),0,regmatch(%q0,^%q1-|-%q1-|-%q1$),%q9,cand(regmatch(%q0,col(\\d),-1 2),eq(mod(%q1,3),mod(%q2,3))),%q9,cand(regmatch(%q0,(\\d)\[snr\],-1 2),gt(%q1,mul(dec(%q2),12)),lte(%q1,mul(%q2,12))),%q9,cand(strmatch(%q0,odd),eq(mod(%q1,2),1)),%q9,cand(strmatch(%q0,even),eq(mod(%q1,2),0)),%q9,cand(strmatch(%q0,high),gt(%q1,18)),%q9,cand(strmatch(%q0,low),lte(%q1,18)),%q9,cand(strmatch(%q0,red),strmatch(u(colname,%q1),red)),%q9,cand(strmatch(%q0,black),strmatch(u(colname,%q1),black)),%q9,0)]
&COMPUTE_RESULT [v(SVC`Te8c003561ba7f45b57ab)]=[setq(0,first(%1))][setq(9,extract(%1,3,1))][switch(1,eq(%q0,%0),%q9,eq(%0,0),0,regmatch(%q0,^%0-|-%0-|-%0$),%q9,cand(regmatch(%q0,col(\\d),-1 1),eq(mod(%0,3),mod(%q1,3))),%q9,cand(regmatch(%q0,(\\d)\[snr\],-1 1),gt(%0,mul(dec(%q1),12)),lte(%0,mul(%q1,12))),%q9,cand(strmatch(%q0,odd),eq(mod(%0,2),1)),%q9,cand(strmatch(%q0,even),eq(mod(%0,2),0)),%q9,cand(strmatch(%q0,high),gt(%0,18)),%q9,cand(strmatch(%q0,low),lte(%0,18)),%q9,cand(strmatch(%q0,red),strmatch(u(colname,%0),red)),%q9,cand(strmatch(%q0,black),strmatch(u(colname,%0),black)),%q9,0)]
&COLORS [v(SVC`Te8c003561ba7f45b57ab)]=GRXRXRXRXRXXRXRXRXRRXRXRXRXRXXRXRXRXR
&COLNAME [v(SVC`Te8c003561ba7f45b57ab)]=[switch(mid(v(colors),%0,1),G,green,R,red,X,black)]
&COLATTR [v(SVC`Te8c003561ba7f45b57ab)]=[switch(%0,0,G,[mid(v(colors),%0,1)]w)]
&CMD_BET_NUMS [v(SVC`Te8c003561ba7f45b57ab)]=$^bet (\d+) on ((\d+)(-\d+)*)$:@break [switch(0,lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)], [setq(0,sort(%2,n,-,-))][ulocal(okgroup,%q0)],1[pemit(%#,You can't bet on that.)], v(ok_to_bet),1[pemit(%#,Your bet is too late for this spin.)],gte(u(money,%#),%1),1[pemit(%#,You can not afford that bet.)],0)]; @emit %N places [u(count,%1)] on %q0.;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet_[v(nextbet)] me = %q0 %1 [mul(div(36,words(%q0,-)),%1)] %#;&nextbet me = [inc(v(nextbet))];@drain me;@wait me/10={@emit "No more bets, please," says the croupier. "Les joues sont fait."; &ok_to_bet me=0; @tr me/spin}
&CMD_BET_HALF [v(SVC`Te8c003561ba7f45b57ab)]=$^bet (\d+) on (red|black|odd|even|high|low):@break [switch(0,lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)], v(ok_to_bet),1[pemit(%#,Your bet is too late for this spin.)],gte(u(money,%#),%1),1[pemit(%#,You can not afford that bet.)],0)];@emit %N places [u(count,%1)] on %2.;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet_[v(nextbet)] me = %2 %1 [mul(2,%1)] %#;&nextbet me = [inc(v(nextbet))];@drain me;@wait me/10={@emit "No more bets, please," says the croupier. "Les joues sont fait."; &ok_to_bet me=0; @tr me/spin}
&CMD_BET_DOZEN [v(SVC`Te8c003561ba7f45b57ab)]=$^bet (\d+) on (1st|2nd|3rd):@break [switch(0,lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)], v(ok_to_bet),1[pemit(%#,Your bet is too late for this spin.)],gte(u(money,%#),%1),1[pemit(%#,You can not afford that bet.)],0)];@emit %N places [u(count,%1)] on the %2 dozen.;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet_[v(nextbet)] me = %2 %1 [mul(3,%1)] %#;&nextbet me = [inc(v(nextbet))];@drain me;@wait me/10={@emit "No more bets, please," says the croupier. "Les joues sont fait."; &ok_to_bet me=0; @tr me/spin}
&CMD_BET_COLS [v(SVC`Te8c003561ba7f45b57ab)]=$^bet (\d+) on col([123]):@break [switch(0,lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)], v(ok_to_bet),1[pemit(%#,Your bet is too late for this spin.)],gte(u(money,%#),%1),1[pemit(%#,You can not afford that bet.)],0)];@emit %N places [u(count,%1)] on column %2.;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet_[v(nextbet)] me = col%2 %1 [mul(3,%1)] %#;&nextbet me = [inc(v(nextbet))];@drain me;@wait me/10={@emit "No more bets, please," says the croupier. "Les joues sont fait."; &ok_to_bet me=0; @tr me/spin}
&BLANK [v(SVC`Te8c003561ba7f45b57ab)]=[ansi(u(colattr,%0),[switch(%0,0,,<10,%b)]%b%b[switch(%0,>9,%b)]%b)]
&BETMARK [v(SVC`Te8c003561ba7f45b57ab)]=[switch(0,u(isbet,%0),%2,u(isyourbet,%0,%1),$,ansi(hg,$))]
@set [v(SVC`Te8c003561ba7f45b57ab)]=BANK:[v(SVC`T7d1c9a0b66f718acf350)]
@set [v(SVC`Te8c003561ba7f45b57ab)]/USE=no_command
@set [v(SVC`Te8c003561ba7f45b57ab)]/STARTUP=no_command
@set [v(SVC`Te8c003561ba7f45b57ab)]/DESCRIBE=no_command visual public nearby
@set [v(SVC`Te8c003561ba7f45b57ab)]/CMD_BET_NUMS=regexp
@set [v(SVC`Te8c003561ba7f45b57ab)]/CMD_BET_HALF=regexp
@set [v(SVC`Te8c003561ba7f45b57ab)]/CMD_BET_DOZEN=regexp
@set [v(SVC`Te8c003561ba7f45b57ab)]/CMD_BET_COLS=regexp
@@
@@ Filling out Lobby <O>\;out\;lobby\;o\;back
@@
@name [v(SVC`E592c7eaffb85b23299e0)]=Lobby <O>;out;lobby;o;back
@link [v(SVC`E592c7eaffb85b23299e0)]=v(SVC`Rb45f2571a5f61ff1ff17)
@tel [v(SVC`E592c7eaffb85b23299e0)]=v(SVC`R5ecd4f8f12f9dbd63587)
@set [v(SVC`E592c7eaffb85b23299e0)]=iter(setdiff(lflags([v(SVC`E592c7eaffb85b23299e0)]),),!##) [setdiff(,lflags([v(SVC`E592c7eaffb85b23299e0)]))]
&SUCCESS [v(SVC`E592c7eaffb85b23299e0)]=You leave the craps pit and return to the lobby.
&OSUCCESS [v(SVC`E592c7eaffb85b23299e0)]=returns to the lobby.
&ODROP [v(SVC`E592c7eaffb85b23299e0)]=enters from the craps pit.
@set [v(SVC`E592c7eaffb85b23299e0)]/SUCCESS=no_command
@set [v(SVC`E592c7eaffb85b23299e0)]/OSUCCESS=no_command
@set [v(SVC`E592c7eaffb85b23299e0)]/ODROP=no_command
@@
@@ Filling out bank
@@
@chzone [v(SVC`T7d1c9a0b66f718acf350)]=v(SVC`T3c763130274d176cd116)
@name [v(SVC`T7d1c9a0b66f718acf350)]=bank
@lock/USER:Basic [v(SVC`T7d1c9a0b66f718acf350)]=[v(SVC`Te39a2b653594afcd9d6c)]
@lock/Basic [v(SVC`T7d1c9a0b66f718acf350)]=[v(SVC`Te39a2b653594afcd9d6c)]
@tel [v(SVC`T7d1c9a0b66f718acf350)]=v(SVC`Te39a2b653594afcd9d6c)
@link [v(SVC`T7d1c9a0b66f718acf350)]=v(SVC`Te39a2b653594afcd9d6c)
@set [v(SVC`T7d1c9a0b66f718acf350)]=iter(setdiff(lflags([v(SVC`T7d1c9a0b66f718acf350)]),NO_COMMAND),!##) [setdiff(NO_COMMAND,lflags([v(SVC`T7d1c9a0b66f718acf350)]))]
&SVC`IGNORE [v(SVC`T7d1c9a0b66f718acf350)]=#* INFLOW OUTFLOW
&SVC [v(SVC`T7d1c9a0b66f718acf350)]=
&FV_SET_CREDITS [v(SVC`T7d1c9a0b66f718acf350)]=[set(me,%0:%1)]
&FV_REMOVE_CREDITS [v(SVC`T7d1c9a0b66f718acf350)]=[set(me,%0:[sub(v(%0),%1)])]
&FV_HAS_CREDITS [v(SVC`T7d1c9a0b66f718acf350)]=[gte(v(%0),%1)]
&FV_CLEAR_CREDITS [v(SVC`T7d1c9a0b66f718acf350)]=[set(me,%0:0)]
&FV_ADD_CREDITS [v(SVC`T7d1c9a0b66f718acf350)]=[set(me,%0:[add(v(%0),%1)])]
&FN_CREDITS [v(SVC`T7d1c9a0b66f718acf350)]=[default(%0,0)]
&2D [v(SVC`T7d1c9a0b66f718acf350)]=2
@set [v(SVC`T7d1c9a0b66f718acf350)]/2D=no_command
@@
@@ Filling out Cashier
@@
@name [v(SVC`Te39a2b653594afcd9d6c)]=Cashier
@lock/USER:Basic [v(SVC`Te39a2b653594afcd9d6c)]=%!
@lock/Basic [v(SVC`Te39a2b653594afcd9d6c)]=%!
@tel [v(SVC`Te39a2b653594afcd9d6c)]=v(SVC`Rb45f2571a5f61ff1ff17)
@link [v(SVC`Te39a2b653594afcd9d6c)]=v(SVC`Rb45f2571a5f61ff1ff17)
@set [v(SVC`Te39a2b653594afcd9d6c)]=iter(setdiff(lflags([v(SVC`Te39a2b653594afcd9d6c)]),MONITOR NO_COMMAND OPAQUE),!##) [setdiff(MONITOR NO_COMMAND OPAQUE,lflags([v(SVC`Te39a2b653594afcd9d6c)]))]
&TOURNAMENT [v(SVC`Te39a2b653594afcd9d6c)]=^^(.*) says, "I'm in[.!]?": @select 0=[hastype(%#,player)], {@emit The cashier looks sternly at %N. "Players only, bub." }, [strmatch(%1,%N)], {@emit The cashier looks sternly at %N. "Nice try." }, [hasattr(#7377,%#)], {@emit The cashier nods to %N and hands %o a stack of tournament chips. "Good luck!"; &%# #7377=250 }, {@emit The cashier shakes %p head at %N. "You've already entered."}
&SVC`ONUPDATE [v(SVC`Te39a2b653594afcd9d6c)]=@force me=@edit me/chips2ducs=Ducat|Ducats,[money(1)]|[money(2)]
&SVC`NOTE [v(SVC`Te39a2b653594afcd9d6c)]=if(not(cor(haspower(me,debit),hasflag(me,wizard))), needs debit power.)
&SVC [v(SVC`Te39a2b653594afcd9d6c)]=
&STATUS [v(SVC`Te39a2b653594afcd9d6c)]=^* says, "How we doing?": @assert strmatch(owner(%#),owner(%!)) ; "Well, we've taken in [setr(1,xget(v(bank),inflow))] ducats and paid out [setr(2,xget(V(bank),outflow))] ducats, and there's [setr(0,lmath(add,iter(lattr([v(bank)]/#*),switch(1,orflags(%i0,Wr),0,haspower(%i0,no_pay),0,xget(v(bank),%i0)))))] out in chips. So we're at [sub(%q1,add(%q0,%q2))].
&STARTUP [v(SVC`Te39a2b653594afcd9d6c)]=@drain me; @notify me
&DUCS2CHIPS [v(SVC`Te39a2b653594afcd9d6c)]=^^(.*) says, "(\d+) chips?,? please[.!?]?": @wait me=@select/notify 0=[hastype(%#,player)], {@emit The cashier looks sternly at %N. "Only players may buy chips." }, [strmatch(stripaccents(%1),%N)], {@emit The cashier looks sternly at %N. "What are you trying to pull?" She motions to the guards, and %N is ejected from the casino.; @tel %#=out }, [gt(%2,0)], {@emit The cashier frowns at %N. "Maybe where you come from, but not here."}, [lte(%2,dec(money(%#)))], { @emit The cashier smirks at %N. "Come back when you've got a bigger roll." }, { @emit The cashier nods to %N. "Changing %2."; give %#=-%2; &%# [v(bank)]=[add(default([v(bank)]/%#,0),%2)]; wh %N=Type 'chips' to see your current number of chips.; &inflow [switch(1,orflags(%#,Wr),#-1,haspower(%#,no_pay),#-1,v(bank))]=[add(xget(v(bank),inflow),%2)] }
&DESCRIBE [v(SVC`Te39a2b653594afcd9d6c)]=The woman behind the desk looks up at you from beneath a green visor.%r"[switch(0,default([v(bank)]/%#,0),I see you don't have any chips. You can purchase them here for ducats by saying '20 chips\, please' (or however many you'd like),You can purchase chips by saying '20 chips\, please'\, or cash out by saying '20 ducats\, please')]," she says.
&CHIPS2DUCS [v(SVC`Te39a2b653594afcd9d6c)]=^^(.*) says, "(\d+) (Ducat|Ducats),? please[.?!]?": @wait me=@select/notify 0=[strmatch(stripaccents(%1),%N)], {@emit The cashier looks sternly at %N and motions to the guards. %N is ejected from the casino.; @tel %#=out }, [gt(%2,0)], {@emit The cashier frowns at %N. "Maybe where you come from, but not here."}, [lte(%2,default([v(bank)]/%#,0))], { @emit The cashier laughs at %N. "What is this, a holdup?" }, { @emit The cashier nods to %N. "Cashing out %2."; give %#=%2; &%# [v(bank)]=[sub(xget(v(bank),%#),%2)]; &outflow [switch(1,orflags(%#,Wr),#-1,haspower(%#,no_pay),#-1,v(bank))]=[add(xget(v(bank),outflow),%2)] }
@set [v(SVC`Te39a2b653594afcd9d6c)]=BANK:[v(SVC`T7d1c9a0b66f718acf350)]
@set [v(SVC`Te39a2b653594afcd9d6c)]/TOURNAMENT=regexp
@set [v(SVC`Te39a2b653594afcd9d6c)]/STARTUP=no_command
@set [v(SVC`Te39a2b653594afcd9d6c)]/SEMAPHORE=no_inherit no_clone locked
@set [v(SVC`Te39a2b653594afcd9d6c)]/DUCS2CHIPS=regexp
@set [v(SVC`Te39a2b653594afcd9d6c)]/DESCRIBE=no_command visual public nearby
@set [v(SVC`Te39a2b653594afcd9d6c)]/CHIPS2DUCS=regexp
@@
@@ Filling out Craps Pit <CP>\;cp\;craps\;pit
@@
@name [v(SVC`Efd3767dd926934d25bb7)]=Craps Pit <CP>;cp;craps;pit
@link [v(SVC`Efd3767dd926934d25bb7)]=v(SVC`R5ecd4f8f12f9dbd63587)
@tel [v(SVC`Efd3767dd926934d25bb7)]=v(SVC`Rb45f2571a5f61ff1ff17)
@set [v(SVC`Efd3767dd926934d25bb7)]=iter(setdiff(lflags([v(SVC`Efd3767dd926934d25bb7)]),),!##) [setdiff(,lflags([v(SVC`Efd3767dd926934d25bb7)]))]
&SUCCESS [v(SVC`Efd3767dd926934d25bb7)]=You wander toward the craps pit.
&OSUCCESS [v(SVC`Efd3767dd926934d25bb7)]=wanders toward the craps pit.
&ODROP [v(SVC`Efd3767dd926934d25bb7)]=comes in from the lobby.
&DESCRIBE [v(SVC`Efd3767dd926934d25bb7)]=The craps pit is loud, almost frantic.
@set [v(SVC`Efd3767dd926934d25bb7)]/SUCCESS=no_command
@set [v(SVC`Efd3767dd926934d25bb7)]/OSUCCESS=no_command
@set [v(SVC`Efd3767dd926934d25bb7)]/ODROP=no_command
@set [v(SVC`Efd3767dd926934d25bb7)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Craps table
@@
@name [v(SVC`T5c94cea68131e6d41e19)]=Craps table
@lock/USER:Basic [v(SVC`T5c94cea68131e6d41e19)]==%!
@lock/Basic [v(SVC`T5c94cea68131e6d41e19)]==%!
@tel [v(SVC`T5c94cea68131e6d41e19)]=v(SVC`R5ecd4f8f12f9dbd63587)
@link [v(SVC`T5c94cea68131e6d41e19)]=v(SVC`R5ecd4f8f12f9dbd63587)
@set [v(SVC`T5c94cea68131e6d41e19)]=iter(setdiff(lflags([v(SVC`T5c94cea68131e6d41e19)]),MONITOR),!##) [setdiff(MONITOR,lflags([v(SVC`T5c94cea68131e6d41e19)]))]
&WINNINGS [v(SVC`T5c94cea68131e6d41e19)]=[round(mul(ulocal(getodds,extract(%0,3,1,-),%1),first(v(%0))),0)]
&USE [v(SVC`T5c94cea68131e6d41e19)]=CRAPS by Javelin%r[wrap([space(2)]Craps is a game of dice that takes place in rounds.The first roll of the round is the "come out". If the come outroll is a 2\, 3\, 7\, 11\, or 12\, the round is over. Otherwise\,the number rolls is the "point" and the player continues toroll the dice until the point is rolled again or a 7 is rolled.,76,76,%r[space(2)])]%rCOMMANDS:%r* bet <amount> on <type of bet>%r* bet odds on \[pass, dontpass, come<#>, or dontcome<#>\]%r* roll dice%r* pass dice%r* pick up dice%rBET TYPES: (type 'what is <betname>' for an explanation)%r* On a comeout roll: pass, dontpass%r* After comeout: come, dontcome, 4, 5, 6, 8, 9, 10, big6, big8, hard4, hard6, hard 8, hard10%r* Any time: field, crap2, crap3, crap12, anycraps, seven, eleven, horn
&TABLE [v(SVC`T5c94cea68131e6d41e19)]=%b/--+---+[repeat(-,6)][iter(4 5 6 8 9 10,+-----, ,)]+%b%b.-----.[space(4)]____%b%b%b%r| %b | D | DONT [iter(4 5 6 8 9 10,|[center(u(betmarks,dontcome##,4,%0),5)], ,)]|%b/%b%bo%b%b/|%b%b%b/\\%b%b%b\\%b%b%r| P | O | COME |[iter(4 5 6 8 9 10,center(u(pointon,##),5), ,|)]|/_____/o|%b%b/o%b\\%bo%b\\%b%r| A | N | [u(betmarks,dontcome,4,%0)] |[iter(4 5 6 8 9 10,center(## [u(betmark,##,%0)],5), , |)]||%bo%b%b%b|%b|%b/o%bo%b\\___\\%r| S | T | %b[u(oddsmark,dontcome,%0)] %b |[iter(4 5 6 8 9 10,center(u(betmarks,come##,4,%0),5), ,|)]||%b%bo%b%b|o/%b\\%bo%b%b/o%b%b/%r| S | P |[repeat(_,6)][iter(4 5 6 8 9 10,|[center(u(oddsmarks,come##,4,%0,_),5,_)], ,)]||%b%b%bo%b|/%b%b%b\\%b%b/%bo%b/%b%r| %b | A |[space(40)]|%b%b'-----'%bjgs%b\\/__o/%b%b%r| L | S |[space(14)]C O M E[space(19)]+-------+-------+[space(6)]%r| I | S |[center(trim(u(betmarks,come,30,%0)),40)]|%b%b%b[center(Seven,9)]%b[u(betmark,seven,%0)]%b|[space(6)]%r| N |___|[repeat(_,40)]+-------+-------+[space(6)]%r| E | %b%b \\[space(4)][iter(2 3 4 9 10 11 12,center(##,4), ,*)] | 3-3 [u(betmark,hard6,%0)] | 5-5 [u(betmark,hard10,%0)] |[space(6)]%r| %b | %b[u(betmark,big6,%0)]%b \\[space(3)][center(FIELD,34)] | 4-4 [u(betmark,hard8,%0)] | 2-2 [u(betmark,hard4,%0)] |[space(6)]%r| %b | %b6%bB \\[space(3)][center(trim(u(betmarks,field,20,%0)),33)] | 1-1 [u(betmark,crap2,%0)] | 6-6 [u(betmark,crap12,%0)] |[space(6)]%r| %b | %b%bI%b%b \\[repeat(_,36)]|[center(\[[u(betmark,horn,%0)]\],15)]|[space(6)]%r| %b \\ %bG%b8%b[u(betmark,big8,%0)] |[space(10)]Don't Pass Box%b%b[u(betmarks,dontpass,7,%0)][space(2)]| 1-2 [u(betmark,crap3,%0)] | 6-5 [u(betmark,eleven,%0)] |[space(6)]%r\\ %b%b \\[repeat(_,7)]|[repeat(_,26)][u(oddsmarks,dontpass,7,%0,_)][repeat(_,2)]+-------+-------+[space(6)]%r%b\\[space(18)]PASS LINE%b%b[u(betmarks,pass,12,%0)][space(6)]|%b%b%b[center(Any Craps,9)]%b[u(betmark,anycraps,%0)]%b|[space(6)]%r%b%b\\[repeat(_,28)][u(oddsmarks,pass,12,%0,_)][repeat(_,6)]|_______________|[space(6)]
&SVC`IGNORE [v(SVC`T5c94cea68131e6d41e19)]=BET-#* POINT STATUS WINPAT
&SVC [v(SVC`T5c94cea68131e6d41e19)]=
&SUBJ [v(SVC`T5c94cea68131e6d41e19)]=He
&STARTUP [v(SVC`T5c94cea68131e6d41e19)]=@drain me; @notify me; @drain me/RESOLVE; @tr me/reset
&ROLL [v(SVC`T5c94cea68131e6d41e19)]=[die(1,6)] [die(1,6)]
&RESOLVE [v(SVC`T5c94cea68131e6d41e19)]=
&RESET [v(SVC`T5c94cea68131e6d41e19)]=$+clear: @wipe me/bet-*; &status me=comeout; &point me
&PRETTYNAME [v(SVC`T5c94cea68131e6d41e19)]=[switch(%0,ANYCRAPS,any craps,lcstr(regedit(edit(%0,DONT,don't%b,ODDS,%bODDS),(\\D)(\\d),$1 $2)))]
&POINTON [v(SVC`T5c94cea68131e6d41e19)]=[switch(v(point),%0,ON)]
&OLDPOINT [v(SVC`T5c94cea68131e6d41e19)]=4
&OK_TO_BET [v(SVC`T5c94cea68131e6d41e19)]=1
&ODDSMARKS [v(SVC`T5c94cea68131e6d41e19)]=[u(betmarks,%0ODDS,%1,%2,%3)]
&ODDSMARK [v(SVC`T5c94cea68131e6d41e19)]=[u(betmark,%0ODDS,%1,%2)]
&ODDS-SEVEN [v(SVC`T5c94cea68131e6d41e19)]=5
&ODDS-PASSODDS-9 [v(SVC`T5c94cea68131e6d41e19)]=2.5
&ODDS-PASSODDS-8 [v(SVC`T5c94cea68131e6d41e19)]=2.2
&ODDS-PASSODDS-6 [v(SVC`T5c94cea68131e6d41e19)]=2.2
&ODDS-PASSODDS-5 [v(SVC`T5c94cea68131e6d41e19)]=2.5
&ODDS-PASSODDS-4 [v(SVC`T5c94cea68131e6d41e19)]=3
&ODDS-PASSODDS-10 [v(SVC`T5c94cea68131e6d41e19)]=3
&ODDS-PASS [v(SVC`T5c94cea68131e6d41e19)]=2
&ODDS-HORN-2 [v(SVC`T5c94cea68131e6d41e19)]=7.75
&ODDS-HORN-12 [v(SVC`T5c94cea68131e6d41e19)]=7.75
&ODDS-HORN [v(SVC`T5c94cea68131e6d41e19)]=4
&ODDS-HARD8 [v(SVC`T5c94cea68131e6d41e19)]=10
&ODDS-HARD6 [v(SVC`T5c94cea68131e6d41e19)]=10
&ODDS-HARD4 [v(SVC`T5c94cea68131e6d41e19)]=8
&ODDS-HARD10 [v(SVC`T5c94cea68131e6d41e19)]=8
&ODDS-FIELD-2 [v(SVC`T5c94cea68131e6d41e19)]=3
&ODDS-FIELD-12 [v(SVC`T5c94cea68131e6d41e19)]=3
&ODDS-FIELD [v(SVC`T5c94cea68131e6d41e19)]=2
&ODDS-ELEVEN [v(SVC`T5c94cea68131e6d41e19)]=16
&ODDS-DONTPASSODDS-9 [v(SVC`T5c94cea68131e6d41e19)]=1.6667
&ODDS-DONTPASSODDS-8 [v(SVC`T5c94cea68131e6d41e19)]=1.8333
&ODDS-DONTPASSODDS-6 [v(SVC`T5c94cea68131e6d41e19)]=1.8333
&ODDS-DONTPASSODDS-5 [v(SVC`T5c94cea68131e6d41e19)]=1.6667
&ODDS-DONTPASSODDS-4 [v(SVC`T5c94cea68131e6d41e19)]=1.5
&ODDS-DONTPASSODDS-10 [v(SVC`T5c94cea68131e6d41e19)]=1.5
&ODDS-DONTPASS-12 [v(SVC`T5c94cea68131e6d41e19)]=1
&ODDS-DONTPASS [v(SVC`T5c94cea68131e6d41e19)]=2
&ODDS-DONTCOMEODDS-9 [v(SVC`T5c94cea68131e6d41e19)]=1.6667
&ODDS-DONTCOMEODDS-8 [v(SVC`T5c94cea68131e6d41e19)]=1.8333
&ODDS-DONTCOMEODDS-6 [v(SVC`T5c94cea68131e6d41e19)]=1.8333
&ODDS-DONTCOMEODDS-5 [v(SVC`T5c94cea68131e6d41e19)]=1.6667
&ODDS-DONTCOMEODDS-4 [v(SVC`T5c94cea68131e6d41e19)]=1.5
&ODDS-DONTCOMEODDS-10 [v(SVC`T5c94cea68131e6d41e19)]=1.5
&ODDS-DONTCOME-12 [v(SVC`T5c94cea68131e6d41e19)]=1
&ODDS-DONTCOME [v(SVC`T5c94cea68131e6d41e19)]=2
&ODDS-CRAP3 [v(SVC`T5c94cea68131e6d41e19)]=16
&ODDS-CRAP2 [v(SVC`T5c94cea68131e6d41e19)]=31
&ODDS-CRAP12 [v(SVC`T5c94cea68131e6d41e19)]=31
&ODDS-COMEODDS-9 [v(SVC`T5c94cea68131e6d41e19)]=2.5
&ODDS-COMEODDS-8 [v(SVC`T5c94cea68131e6d41e19)]=2.2
&ODDS-COMEODDS-6 [v(SVC`T5c94cea68131e6d41e19)]=2.2
&ODDS-COMEODDS-5 [v(SVC`T5c94cea68131e6d41e19)]=2.5
&ODDS-COMEODDS-4 [v(SVC`T5c94cea68131e6d41e19)]=3
&ODDS-COMEODDS-10 [v(SVC`T5c94cea68131e6d41e19)]=3
&ODDS-COME [v(SVC`T5c94cea68131e6d41e19)]=2
&ODDS-BIG6 [v(SVC`T5c94cea68131e6d41e19)]=2
&ODDS-ANYCRAPS [v(SVC`T5c94cea68131e6d41e19)]=8
&ODDS-9 [v(SVC`T5c94cea68131e6d41e19)]=2.4
&ODDS-8 [v(SVC`T5c94cea68131e6d41e19)]=2.16667
&ODDS-6 [v(SVC`T5c94cea68131e6d41e19)]=2.16667
&ODDS-5 [v(SVC`T5c94cea68131e6d41e19)]=2.4
&ODDS-4 [v(SVC`T5c94cea68131e6d41e19)]=2.8
&ODDS-10 [v(SVC`T5c94cea68131e6d41e19)]=2.8
&NAME-6-6 [v(SVC`T5c94cea68131e6d41e19)]=a hobo's delight on a cold and rainy night|boxcars|midnight|atomic craps|all the spots we got|outstanding in your field|triple dipple, in the lucky ducky|double saw on boxcars
&NAME-5-6 [v(SVC`T5c94cea68131e6d41e19)]=Yo|Yo 'leven|Yo Levine the dancing queen|six five, no jive
&NAME-5-5 [v(SVC`T5c94cea68131e6d41e19)]=the hard way|puppy paws|pair o'roses|pair of sunflowers
&NAME-4-6 [v(SVC`T5c94cea68131e6d41e19)]=big one on the end
&NAME-4-5 [v(SVC`T5c94cea68131e6d41e19)]=Jesse James|ocean liner niner
&NAME-4-4 [v(SVC`T5c94cea68131e6d41e19)]=the hard way|square pair|a square pair, like mother and dad|the windows
&NAME-3-6 [v(SVC`T5c94cea68131e6d41e19)]=Nina from Pasadena|Nina at the Marina|center field
&NAME-3-5 [v(SVC`T5c94cea68131e6d41e19)]=eighter from decatur
&NAME-3-4 [v(SVC`T5c94cea68131e6d41e19)]=seven's a bruiser, the front line's a loser
&NAME-3-3 [v(SVC`T5c94cea68131e6d41e19)]=the hard way|a Brooklyn forest|pair o'treys, waiter's roll
&NAME-2-6 [v(SVC`T5c94cea68131e6d41e19)]=catching eight and feeling great
&NAME-2-5 [v(SVC`T5c94cea68131e6d41e19)]=five two, you're all through|up pops the devil
&NAME-2-4 [v(SVC`T5c94cea68131e6d41e19)]=Jimmie Hicks
&NAME-2-3 [v(SVC`T5c94cea68131e6d41e19)]=after five, the field's alive|fiver, fiver, racetrack driver
&NAME-2-2 [v(SVC`T5c94cea68131e6d41e19)]=a ballerina special|the hard way
&NAME-1-6 [v(SVC`T5c94cea68131e6d41e19)]=six ace, end of the race|front line winner, back line skinner|six one, you're all done
&NAME-1-5 [v(SVC`T5c94cea68131e6d41e19)]=sixie from Dixie
&NAME-1-4 [v(SVC`T5c94cea68131e6d41e19)]=little Phoebe|we got the fever|handy Andy
&NAME-1-3 [v(SVC`T5c94cea68131e6d41e19)]=Little Joe|ace trey, the country way
&NAME-1-2 [v(SVC`T5c94cea68131e6d41e19)]=an ace caught a loose deuce|craps|ace-deuce|small ace deuce, can't produce
&NAME-1-1 [v(SVC`T5c94cea68131e6d41e19)]=a pair of aces in the wrong places|snake eyes|craps|double in the bubble|twice in the rice|eleven in a shoe store|two bad boys from Illinois|aces|to me, they look like mice
&MONEY [v(SVC`T5c94cea68131e6d41e19)]=[default([v(bank)]/%0,0)]
&MINIMUM [v(SVC`T5c94cea68131e6d41e19)]=4
&ISYOURBET [v(SVC`T5c94cea68131e6d41e19)]=[words(lattr(me/BET-%1-%0))]
&ISBET [v(SVC`T5c94cea68131e6d41e19)]=[words(lattr(me/BET-*-%0))]
&GETODDS [v(SVC`T5c94cea68131e6d41e19)]=[setq(0,regediti(%0,come\\d+,come))][switch(%q0,dont*odds,v(ODDS-%q0-[v(oldpoint)]),first([v(ODDS-%q0-%1)] [v(ODDS-%q0)]))]
&DESCRIBE [v(SVC`T5c94cea68131e6d41e19)]=You glance from the well-coiffed croupier down to the felt of the table.%r[u(table,%#)]%r[switch(v(shooter),,No one has the dice. Type 'pick up dice' to pick them up.%r,[name(v(shooter))] has the dice.%b)]Type 'bet <amount> on <type of bet>' to bet.%rType 'use table' for full instructions.
&COUNT [v(SVC`T5c94cea68131e6d41e19)]=[switch(%0,1,a chip,%0 chips)]
&CMD_WHATIS [v(SVC`T5c94cea68131e6d41e19)]=$what is *:@pemit %#=[setq(0,lcstr(%0))][switch(1,t(member(pass dontpass,%q0)),A pass bet is made before a comeout roll. It pays 1:1 if the comeout is a 7 or 11\, or if shooter makes the point later.%rA dontpass bet is the opposite. It pays 1:1 if the comeout is a 2 or 3\, or if a 7 is rolled before a point is made. If the comeout is a 12\, your money is returned.,t(member(come dontcome,%q0)),A come bet is the same as a pass bet\, but is made after a comeout roll. It either pays off on a 7 or 11\, loses on a 2\, 3\, or 12\, or establishes a "come-point" that must be made before the next 7is rolled.%rA dontcome bet is the "come" version of a dontpass bet.,t(member(4 5 6 8 9 10,%q0)),A "place bet" is a bet on a number (4\, 5\, 6\, 8\, 9\, or 10) made after a comeout roll. It wins if the number is rolled before a 7. It pays 9:5 if the bet is on 4 or 10\, 7:5 if it's on 5 or 9\, and7:6 if it's on 6 or 8.,strmatch(%q0,big*),The big6 pays 1:1 if a 6 is rolled before a 7.%rThe big8 pays 1:1 if an 8 is rolled before a 7.,strmatch(%q0,hard*),The "hard ways" bets (hard4, hard6, hard8, and hard10) win when the given number is rolled as a pair of dice of equal value (i.e.\, a hard6 is a roll of two 3's) before either a 7 is rolledor the given number is rolled any other way. It pays 7:1 if the bet is on hard4 or hard10\, and 9:1 on hard6 or hard8.,not(comp(%q0,field)),The field bet wins if a 2\, 3\, 4\, 9\, 10\, 11\, or 12 is rolled on the next roll. It pays 2:1 if a 2 or 12 is rolled on the next roll\, and 1:1 if one of the other field numbers is rolled.,strmatch(%q0,*crap*),The crap2\, crap3\, and crap12 bets win if a 2\, 3\, or 12\, respectively\, is rolled on the next roll. It pays 30:1 for bets on crap2 and crap12\, and 15:1 for bets on crap3.%rThe anycraps bet wins if any of those numbers are rolled on the next roll\, and pays 7:1.,strmatch(%q0,*even),The seven bet wins if a 7 is rolled on the next roll\, and pays4:1.%rThe eleven bet wins if an 11 is rolled on the next roll\, and pays 15:1.,not(comp(%q0,horn)),The horn bet wins if 2\, 3\, 11\, or 12 is rolled on the next roll. If the roll is a 2 or 12\, this bet pays 6:1. If it's a 3 or 11\, this bet pays 3:1.,not(comp(%q0,odds)),An odds bet is an additional wager of the same amount as an existing pass\, dontpass\, come\, or dontcome bet\, made once a point (or come-point) has been established. They win or lose with their corresponding bet. Pass and come odds bets pay 6:5 if the point is 6 or 8\, 3:2 if the point is 5 or 9\, and 2:1 if the point is 4 or 10.%rDontpass and dontcome odds bets pay 5:6 if the point is 6 or 8\, 2:3 if the point is 5 or 9\, and 1:2 if the point is 4 or 10.,I'm sorry but I've never heard of that bet.)]
&CMD_SHOOTERLEFT [v(SVC`T5c94cea68131e6d41e19)]=^^.* has (left|disconnected)\.$:@switch %#=[v(shooter)], {&SHOOTER me;@emit The croupier notes %N's departure and waits for someone else to pick up the dice.}
&CMD_ROLL [v(SVC`T5c94cea68131e6d41e19)]=$roll dice:@break [switch(0,not(comp(%#,v(SHOOTER))),1[pemit(%#,You don't have the dice now.)],hasattr(me,BET-%#-PASS), 1[pemit(%#,You must bet on the pass line before you can roll the dice.)],0)];@wait me={@emit %N rolls the dice: [setr(0,die(1,6))] [setr(1,die(1,6))];@emit The croupier announces, "[setr(2,add(%q0,%q1))], [first(shuffle(v(NAME-[min(%q0,%q1)]-[max(%q0,%q1)]),|),|)].";@switch/first [v(status)]:%q2=comeout:2, {&WINPAT me=DONTPASS|CRAP2|FIELD|ANYCRAPS|HORN;@emit The croupier collects the dice and waits for someone else to pick them up.;&shooter me},comeout:3, {&WINPAT me=DONTPASS|CRAP3|FIELD|ANYCRAPS|HORN;@emit The croupier collects the dice and waits for someone else to pick them up.;&shooter me},comeout:7, {&WINPAT me=PASS|SEVEN|DONTCOME\\\\d+},comeout:11, {&WINPAT me=PASS|ELEVEN|HORN|FIELD},comeout:12, {&WINPAT me=DONTPASS|CRAP12|ANYCRAPS|HORN|FIELD;@emit The croupier collects the dice and waits for someone else to pick them up.;&shooter me},comeout:*, {&WINPAT me=[switch(member(4 9 10,%q2),0,,FIELD|)]COME%q2;@emit The croupier flips the puck onto the %q2 point.;&point craps table=%q2;&status craps table=point},point:7, { &WINPAT me=DONTPASS(ODDS)?|SEVEN|DONTCOME\\\d+|COME;@wipe me/BET-*-DONTCOME;@wipe me/BET-*-COME4*;@wipe me/BET-*-COME5*;@wipe me/BET-*-COME6*;@wipe me/BET-*-COME8*;@wipe me/BET-*-COME9*;@wipe me/BET-*-COME10*;&OLDPOINT me=[v(point)];@emit The croupier says, "Seven out, line in." [v(subj)] collects the dice and waits for someone else to pick them up.;&status me=comeout;&shooter me;&point me},point:11, { &WINPAT me=COME|ELEVEN|HORN|FIELD;@wipe me/BET-*-DONTCOME},point:2, { &WINPAT me=DONTCOME|CRAP2|HORN|FIELD|ANYCRAPS;@wipe me/BET-*-COME},point:3, { &WINPAT me=DONTCOME|CRAP3|HORN|FIELD|ANYCRAPS;@wipe me/BET-*-COME},point:12, { &WINPAT me=DONTCOME|CRAP12|HORN|FIELD|ANYCRAPS;@wipe me/BET-*-COME},point:*, {@emit [switch(%q2,v(point),The croupier says\, "Point made.")];&status [switch(%q2,v(point),me,#-1)]=comeout;&WINPAT me=%q2|COME%q2[switch(member(4 9 10,%q2),0,,|FIELD)][switch(%q2,v(point),|PASS|PASSODDS)][if(eq(%q0,%q1),|HARD%q2|BIG%q2)][switch(%q2,2,|ANYCRAPS|CRAP2|HORN,3,|ANYCRAPS|CRAP3|HORN,11,|ELEVEN|HORN,12,|ANYCRAPS|CRAP12|HORN)];&point [switch(%q2,v(point),me,#-1)];@wipe [if(eq(%q0,%q1),#-1,me)]/BET-*-HARD%q2;@wipe me/BET-*-DONTCOME*%q2};@wait 0={@dol [regraball(sortby(BETNAME,lattr(me/BET-*)),-([s(\[v(WINPAT)\])])(ODDS)?$)]= { @emit [v(subj)] glances at [name(setr(4,extract(##,2,1,-)))], and slides over [u(count,u(winnings,##,%q2))]. "[capstr(u(prettyname,extract(##,3,1,-)))] wins.";&%q4 [v(bank)] = [add(u(money,%q4),u(winnings,##,%q2))];&## me};@dol [lattr(me/BET-*-COME)]={&##%q2 [switch(member(4 5 6 8 9 10,%q2),0,#-1,me)]=[add(default(me/##%q2,0),v(##))]; &## me};@dol [lattr(me/BET-*-DONTCOME)]={&##%q2 me=[add(default(me/##%q2,0),v(##))]; &## me};@wait 0={@switch [v(status)]=comeout, {@wipe me/BET-*-HORN; @wipe me/BET-*-FIELD; @wipe me/BET-*-*CRAP*; @wipe me/BET-*-*EVEN; @wipe me/BET-*-PASS*; @wipe me/BET-*-DONTPASS*; @wipe me/BET-*-BIG*; @wipe me/BET-*-HARD*; @wipe me/BET-*-4; @wipe me/BET-*-5; @wipe me/BET-*-6; @wipe me/BET-*-8; @wipe me/BET-*-9; @wipe me/BET-*-10},{@wipe me/BET-*-HORN; @wipe me/BET-*-FIELD; @wipe me/BET-*-*CRAP*; @wipe me/BET-*-*EVEN};@notify me}}}
&CMD_PICK_UP [v(SVC`T5c94cea68131e6d41e19)]=$pick up dice:@break [switch(1,nearby(me,v(SHOOTER)),1[pemit(%#,Someone else has the dice.)],0)];&SHOOTER me=%#;@emit %N picks up the dice. "New shooter," announces the croupier.
&CMD_PASS [v(SVC`T5c94cea68131e6d41e19)]=$pass dice:@break [switch(0,not(comp(%#,v(SHOOTER))),1[pemit(%#,You don't have the dice now.)],not(comp(v(status),comeout)),1[pemit(%#,Don't pass the dice until the end of a round.)],0)];&SHOOTER me;@emit %N puts down the dice. The croupier waits for someone to pick them up.
&CMD_BET_ODDS [v(SVC`T5c94cea68131e6d41e19)]=$^bet odds on (pass|dontpass|come\d+|dontcome\d+):@break [switch(0,not(and(strmatch(%1,*pass),not(comp(v(status),comeout)))),1[pemit(%#,That bet can only be made after a come-out roll.)],hasattr(me,BET-%#-%1),1[pemit(%#,You must have a bet on %1 before you can bet odds.)],[setq(1,sub(v(BET-%#-%1),v(BET-%#-%1ODDS)))][gt(%q1,0)],1[pemit(%#,You've already placed odds on that bet.)],gte(u(money,%#),%q1), 1[pemit(%#,You can not afford that bet.)],lte(v(minimum),%q1),1[pemit(%#,The table minimum is [v(minimum)].)],0)];@emit %N places [u(count,%q1)] as an odds bet on [switch(%1,pass,the pass line,dontpass,the don't pass box,u(prettyname,%1))].;&%# [v(bank)] = [sub(u(money,%#),%q1)];&bet-%#-%1ODDS me=[v(BET-%#-%1)]
&CMD_BET_NOTCOMEOUT [v(SVC`T5c94cea68131e6d41e19)]=$^bet (\d+) on ([45689]|10|big[68]|hard[468]|hard10):@break [null(regmatch(%2,\\d+,1))][switch(0,comp(v(status),comeout),1[pemit(%#,That bet can only be made after a come-out roll.)],gte(u(money,%#),%1), 1[pemit(%#,You can not afford that bet.)],lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)],0)]; @emit %N places [u(count,%1)] on [switch(%2,big*,the big %q1,hard*,%q1 the hard way,%q1)].;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet-%#-%2 me=[add(default(me/bet-%#-%2,0),%1)]
&CMD_BET_COMEOUT [v(SVC`T5c94cea68131e6d41e19)]=$^bet (\d+) on (pass|dontpass):@break [switch(0,not(comp(v(status),comeout)),1[pemit(%#,That bet can only be made on a come-out roll.)],gte(u(money,%#),%1), 1[pemit(%#,You can not afford that bet.)],lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)],0)]; @emit %N places [u(count,%1)] on [switch(%2,pass,the pass line,the don't pass box)].;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet-%#-%2 me=[add(default(me/bet-%#-%2,0),%1)]
&CMD_BET_COME [v(SVC`T5c94cea68131e6d41e19)]=$^bet (\d+) on (come|dontcome):@break [switch(0,comp(v(status),comeout),1[pemit(%#,That bet can only be made after a come-out roll.)],gte(u(money,%#),%1), 1[pemit(%#,You can not afford that bet.)],lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)],0)]; @emit %N places [u(count,%1)] on [switch(%2,come,come,dontcome,don't come)].;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet-%#-%2 me=[add(default(me/bet-%#-%2,0),%1)]
&CMD_BET_ANY [v(SVC`T5c94cea68131e6d41e19)]=$^bet (\d+) on (field|crap[23]|crap12|anycraps|seven|eleven|horn):@break [null(regmatch(%2,\\d+,1))][switch(0,gte(u(money,%#),%1), 1[pemit(%#,You can not afford that bet.)],lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)],0)]; @emit %N places [u(count,%1)] on [switch(%2,field,the field,crap*,craps %q1,anycraps,any craps,seven,seven,eleven,eleven,horn,the horn)];&%# [v(bank)] = [sub(u(money,%#),%1)];&bet-%#-%2 me=[add(default(me/bet-%#-%2,0),%1)]
&BETNAME [v(SVC`T5c94cea68131e6d41e19)]=[comp(last(%0,-),last(%1,-))]
&BETMARKS [v(SVC`T5c94cea68131e6d41e19)]=[ljust([switch(1,t(u(isyourbet,%0,%2)),ansi(hg,$),t(u(isbet,%0)),$)][repeat($,min(dec(%1),max(0,dec(u(isbet,%0)))))],%1,mid(%3%b,0,1))]
&BETMARK [v(SVC`T5c94cea68131e6d41e19)]=[switch(1,t(u(isyourbet,%0,%1)),ansi(hg,$),t(u(isbet,%0)),$,mid(%2%b,0,1))]
@set [v(SVC`T5c94cea68131e6d41e19)]=BANK:[v(SVC`T7d1c9a0b66f718acf350)]
@set [v(SVC`T5c94cea68131e6d41e19)]/WINPAT=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/WINNINGS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/USE=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/TABLE=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/SUBJ=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/STATUS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/STARTUP=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/SEMAPHORE=no_inherit no_clone locked
@set [v(SVC`T5c94cea68131e6d41e19)]/ROLL=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/RESET=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/PRETTYNAME=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/POINTON=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/OLDPOINT=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/OK_TO_BET=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDSMARKS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDSMARK=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-SEVEN=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASSODDS-9=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASSODDS-8=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASSODDS-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASSODDS-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASSODDS-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASSODDS-10=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-PASS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HORN-2=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HORN-12=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HORN=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HARD8=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HARD6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HARD4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-HARD10=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-FIELD-2=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-FIELD-12=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-FIELD=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-ELEVEN=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASSODDS-9=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASSODDS-8=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASSODDS-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASSODDS-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASSODDS-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASSODDS-10=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASS-12=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTPASS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOMEODDS-9=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOMEODDS-8=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOMEODDS-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOMEODDS-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOMEODDS-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOMEODDS-10=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOME-12=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-DONTCOME=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-CRAP3=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-CRAP2=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-CRAP12=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COMEODDS-9=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COMEODDS-8=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COMEODDS-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COMEODDS-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COMEODDS-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COMEODDS-10=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-COME=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-BIG6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-ANYCRAPS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-9=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-8=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ODDS-10=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-6-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-5-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-5-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-4-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-4-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-4-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-3-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-3-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-3-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-3-3=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-2-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-2-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-2-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-2-3=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-2-2=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-1-6=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-1-5=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-1-4=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-1-3=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-1-2=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/NAME-1-1=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/MONEY=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/MINIMUM=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ISYOURBET=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/ISBET=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/GETODDS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/DESCRIBE=no_command visual public nearby
@set [v(SVC`T5c94cea68131e6d41e19)]/COUNT=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/CMD_SHOOTERLEFT=regexp
@set [v(SVC`T5c94cea68131e6d41e19)]/CMD_BET_ODDS=regexp
@set [v(SVC`T5c94cea68131e6d41e19)]/CMD_BET_NOTCOMEOUT=regexp
@set [v(SVC`T5c94cea68131e6d41e19)]/CMD_BET_COMEOUT=regexp
@set [v(SVC`T5c94cea68131e6d41e19)]/CMD_BET_COME=regexp
@set [v(SVC`T5c94cea68131e6d41e19)]/CMD_BET_ANY=regexp
@set [v(SVC`T5c94cea68131e6d41e19)]/BETNAME=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/BETMARKS=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/BETMARK=no_command
@set [v(SVC`T5c94cea68131e6d41e19)]/BANK=no_command
@@
@@ Filling out Roulette Parlor <RP>\;rp\;roulette\;parlor
@@
@name [v(SVC`E69ea522b635f59fded38)]=Roulette Parlor <RP>;rp;roulette;parlor
@link [v(SVC`E69ea522b635f59fded38)]=v(SVC`Rf32175928c437fc65afe)
@tel [v(SVC`E69ea522b635f59fded38)]=v(SVC`Rb45f2571a5f61ff1ff17)
@set [v(SVC`E69ea522b635f59fded38)]=iter(setdiff(lflags([v(SVC`E69ea522b635f59fded38)]),),!##) [setdiff(,lflags([v(SVC`E69ea522b635f59fded38)]))]
&SUCCESS [v(SVC`E69ea522b635f59fded38)]=You enter the roulette parlor
&OSUCCESS [v(SVC`E69ea522b635f59fded38)]=enters the roulette parlor.
&ODROP [v(SVC`E69ea522b635f59fded38)]=comes in from the lobby.
&DESCRIBE [v(SVC`E69ea522b635f59fded38)]=In that direction, you can see players huddled over roulette tables.
@set [v(SVC`E69ea522b635f59fded38)]/SUCCESS=no_command
@set [v(SVC`E69ea522b635f59fded38)]/OSUCCESS=no_command
@set [v(SVC`E69ea522b635f59fded38)]/ODROP=no_command
@set [v(SVC`E69ea522b635f59fded38)]/DESCRIBE=no_command visual public nearby
@@
@@ Filling out Baccarat table
@@
@name [v(SVC`Tf48885245b94665626fd)]=Baccarat table
@lock/USER:Basic [v(SVC`Tf48885245b94665626fd)]=%!
@lock/Basic [v(SVC`Tf48885245b94665626fd)]=%!
@tel [v(SVC`Tf48885245b94665626fd)]=v(SVC`R49a17f78a873806adbd2)
@link [v(SVC`Tf48885245b94665626fd)]=v(SVC`R49a17f78a873806adbd2)
@set [v(SVC`Tf48885245b94665626fd)]=iter(setdiff(lflags([v(SVC`Tf48885245b94665626fd)]),MONITOR),!##) [setdiff(MONITOR,lflags([v(SVC`Tf48885245b94665626fd)]))]
&WINNINGS [v(SVC`Tf48885245b94665626fd)]=[round(mul(v(ODDS-[extract(%0,3,1,-)]),v(%0)),0)]
&USE [v(SVC`Tf48885245b94665626fd)]=BACCARAT by Javelin%r[wrap([space(2)]Baccarat is a card game played with 8 decks. Everyone bets on either "player"\, "banker"\, or "tie". The player with the highest bet on "player" represents the player; another player represents the banker and deals the cards (until banker loses). Each gets two cards\, and the score is the last digit of the sum of the cards (so from 0-9). Face cards and tens count as 0; aces count as 1. Sometimes the croupier will instruct a third card to be dealt to player or banker. The higher-scoring hand wins for all those who have bet on that hand; in the event of a tie\, tie bettors win. Bets on "player" pay 1:1\, on "banker" pay 19:20\, and on "tie" pay 8:1.,76,76,%r[space(2)])]%rCOMMANDS:%r* bet <amount> on \[banker, player, or tie\]%r* deal cards%r* pass deck%r* pick up deck%rTHIRD CARD RULES:%r1. If either player or banker are dealt 8 or 9, no third cards are dealt.%r2. If player has 5 or less, player receives a third card.%r3. If player didn't get a third card, banker receives a third card if banker's total is 5 or less.%r4. If player received a third card, banker receives a third card based on banker's total and what player's third card was.%rThe croupier will instruct the dealer when to deal third cards.
&TABLE [v(SVC`Tf48885245b94665626fd)]=[setq(0,min(12,max(7,words(lattr(me/BET-*)))))][setq(1,center(BANKERS,%q0))][setq(2,center(PLAYERS,%q0))][setq(3,iter(filter(NOTYOURBET,lattr(me/BET-*)),extract(##,3,1,-)))][setq(5,words(lattr(me/BET-*-TIE)))][center(TIE%b%b8 for 1%b%b%b[u(betmarks,TIE,%#,12)],mul(6,%q0))]%r[iter(lnum(1,%q0),center(##,6), ,)]%r[repeat(+-----,%q0)]+%r[iter(lnum(%q0),|%b[ljust([mid(%q1,##,1)] [u(betmark,BANKER,%#,##,%q3)],4)], ,)]|%r[repeat(+-----,%q0)]+%r[iter(lnum(%q0),|%b[ljust([mid(%q2,##,1)] [u(betmark,PLAYER,%#,##,%q3)],4)], ,)]|%r[repeat(+-----,%q0)]+%r[repeat(|[space(5)],%q0)]|%r[repeat(|[space(5)],%q0)]|%r[repeat(|[space(5)],%q0)]|
&SVC`IGNORE [v(SVC`Tf48885245b94665626fd)]=deck
&SVC [v(SVC`Tf48885245b94665626fd)]=
&SUBJ [v(SVC`Tf48885245b94665626fd)]=He
&STATUS [v(SVC`Tf48885245b94665626fd)]=bet
&STARTUP [v(SVC`Tf48885245b94665626fd)]=@wipe me/bet-*; &status me=bet; &fulldecks me=[iter(lnum(8),iter([lnum(2,10)] J Q K A,iter(h c d s,[itext(1)][itext(0)])))]; &deck me=[shuffle(v(fulldecks))]; @drain me; @notify me
&PLAYER_THIRD [v(SVC`Tf48885245b94665626fd)]=@emit At the croupier's nod, %2 deals %0 another card: [setr(0,u(draw))].;&PCARDS me=[v(PCARDS)] %q0;@emit The croupier looks at %0's cards, and announces, "Player, [setr(1,u(handvalue,v(PCARDS)))].";@tr me/[switch(u(bankerhit,%3,%q0),H,banker_third,finish)]=%0,%q1,%2,%3
&PLAYER [v(SVC`Tf48885245b94665626fd)]=[setq(0,lattr(me/BET-*-PLAYER))][setq(1,lattr(me/BET-*-TIE))][setq(2,lattr(me/BET-*-BANKER))][extract(first([munge(mng_player, iter(%q0,v(##)), %q0)] [munge(mng_player, iter(%q1,v(##)), %q1)] [munge(mng_player, iter(%q2,v(##)), %q2)]),2,1,-)]
&PCARDS [v(SVC`Tf48885245b94665626fd)]=9h 7s
&ODDS-TIE [v(SVC`Tf48885245b94665626fd)]=9
&ODDS-PLAYER [v(SVC`Tf48885245b94665626fd)]=2
&ODDS-BANKER [v(SVC`Tf48885245b94665626fd)]=1.95
&NOTYOURBET [v(SVC`Tf48885245b94665626fd)]=[switch(%0,*-TIE,0,*-%#-*,0,1)]
&MONEY [v(SVC`Tf48885245b94665626fd)]=[default([v(bank)]/%0,0)]
&MNG_PLAYER [v(SVC`Tf48885245b94665626fd)]=[revwords(sort(%0,n))]
&MINIMUM [v(SVC`Tf48885245b94665626fd)]=50
&ISYOURBET [v(SVC`Tf48885245b94665626fd)]=[words(lattr(me/BET-%1-%0))]
&ISBET [v(SVC`Tf48885245b94665626fd)]=[words(lattr(me/BET-*-%0))]
&HITTABLE [v(SVC`Tf48885245b94665626fd)]=H H H H H H H H S H S S H H H H H H S S S S S S H H H H S S S S S S S S H H S S
&HANDVALUE [v(SVC`Tf48885245b94665626fd)]=[mod(lmath(add,edit(iter(%0,mid(##,0,1)),1,0,J,0,Q,0,K,0,A,1)),10)]
&FULLDECKS [v(SVC`Tf48885245b94665626fd)]=2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As 2h 2c 2d 2s 3h 3c 3d 3s 4h 4c 4d 4s 5h 5c 5d 5s 6h 6c 6d 6s 7h 7c 7d 7s 8h 8c 8d 8s 9h 9c 9d 9s 10h 10c 10d 10s Jh Jc Jd Js Qh Qc Qd Qs Kh Kc Kd Ks Ah Ac Ad As
&FINISH [v(SVC`Tf48885245b94665626fd)]=@switch 1= [gt(%1,%3)],{ @emit The croupier says, "Player wins," and retrieves the deck.;&dealer me;@dol [lattr(me/BET-*-PLAYER)] = {@emit [capstr(v(subj))] hands [name(extract(##,2,1,-))] [u(count,u(winnings,##))].; &[extract(##,2,1,-)] [v(bank)] = [add(u(money,extract(##,2,1,-)),u(winnings,##))];&## me};@wait 0 = { @wipe me/BET-*-BANKER; @wipe me/BET-*-TIE;@wait 0 = @notify me }},[gt(%3,%1)],{ @emit The croupier says, "Banker wins.";@dol [lattr(me/BET-*-BANKER)] = {@emit [capstr(v(subj))] hands [name(extract(##,2,1,-))] [u(count,u(winnings,##))].; &[extract(##,2,1,-)] [v(bank)] = [add(u(money,extract(##,2,1,-)),u(winnings,##))];&## me};@wait 0 = { @wipe me/BET-*-PLAYER; @wipe me/BET-*-TIE;@wait 0 = @notify me }},[eq(%3,%1)],{ @emit The croupier says, "Tie bettors win.";@dol [lattr(me/BET-*-TIE)] = {@emit [capstr(v(subj))] hands [name(extract(##,2,1,-))] [u(count,u(winnings,##))].; &[extract(##,2,1,-)] [v(bank)] = [add(u(money,extract(##,2,1,-)),u(winnings,##))];&## me};@wait 0 = { @wipe me/BET-*-PLAYER; @wipe me/BET-*-BANKER;@wait 0 = @notify me }},[lt(words(v(deck)),10)],{ @emit The croupier looks at the shoe. "New shuffle." [capstr(v(subj))] shuffles the cards before returning them.;&deck me = [shuffle(v(fulldecks))]}
&DRAW [v(SVC`Tf48885245b94665626fd)]=[first(v(deck))][set(me,DECK:[rest(v(deck))])]
&DESCRIBE [v(SVC`Tf48885245b94665626fd)]=You glance from the well-coiffed croupier down to the felt of the table.%r[u(table,%#)]%r[switch(v(dealer),,No one is dealing. Type 'pick up deck' to be the dealer.%r,[name(v(dealer))] is dealing.%b)]Type 'bet <amount> on <type of bet>' to bet.%rType 'use table' for full instructions.
&COUNT [v(SVC`Tf48885245b94665626fd)]=[switch(%0,1,a chip,%0 chips)]
&CMD_PICK_UP [v(SVC`Tf48885245b94665626fd)]=$pick up deck:@break [switch(1,nearby(me,v(dealer)),1[pemit(%#,Someone else has the deck.)],0)];&dealer me=%#;@emit %N picks up the deck. "New dealer," announces the croupier.
&CMD_PASS [v(SVC`Tf48885245b94665626fd)]=$pass deck:@break [switch(0,not(comp(%#,v(dealer))),1[pemit(%#,You don't have the deck now.)],0)];&dealer me;@emit %N puts down the deck. The croupier waits for someone to pick them up.
&CMD_DEALERLEFT [v(SVC`Tf48885245b94665626fd)]=^^.* has (left|disconnected)\.$:@wipe me/bet-%#-*; @break [comp(%#,v(dealer))];&dealer me; @select 0=[words(lattr(me/BET-*))],{ @emit The croupier notes %N's departure and waits for someone else to pick up the cards.;&dealer me},{ @emit The croupier notes %N's departure and takes over the deal.;@emit [capstr(v(subj))] deals two cards to [setr(0,name(ulocal(player)))]: [set(me,PCARDS:[u(draw)] [u(draw)])][v(PCARDS)];@emit [capstr(v(subj))] deals two cards to [switch(v(subj),he,him,her)]self: [set(me,BCARDS:[u(draw)] [u(draw)])][v(BCARDS)];@emit The croupier looks at %q0's cards, and announces, "Player, [setr(1,u(handvalue,v(PCARDS)))][switch(%q1,>7,\, natural)]."%r[capstr(v(subj))] looks at [switch(v(subj),he,his,hers)], and announces, "Banker, [setr(2,u(handvalue,v(BCARDS)))][switch(%q2,>7,\, natural)].";@wait me={@tr me/[switch(1,or(gt(%q1,7),gt(%q2,7)),finish,lt(%q1,6),player_third,lt(%q2,6),banker_third,finish)] = %q0,%q1,The croupier,%q2}}
&CMD_DEAL [v(SVC`Tf48885245b94665626fd)]=$deal cards:@break [switch(0,not(comp(%#,v(dealer))),1[pemit(%#,You don't have the deck now.)],words(lattr(me/BET-%#-*)),1[pemit(%#,You must bet before you deal.)], words(remove(ulocal(player),%#)),1[pemit(%#,Someone else must bet first.)],0)];@emit %N deals two cards to [setr(0,name(ulocal(player)))]: [set(me,PCARDS:[u(draw)] [u(draw)])][v(PCARDS)];@emit %N deals two cards to %oself: [set(me,BCARDS:[u(draw)] [u(draw)])][v(BCARDS)];@emit The croupier looks at %q0's cards, and announces, "Player, [setr(1,u(handvalue,v(PCARDS)))][switch(%q1,>7,\, natural)]."%r[capstr(v(subj))] looks at %N's, and announces, "Banker, [setr(2,u(handvalue,v(BCARDS)))][switch(%q2,>7,\, natural)].";@wait me={@tr me/[switch(1,or(gt(%q1,7),gt(%q2,7)),finish,lt(%q1,6),player_third,lt(%q2,6),banker_third,finish)] = %q0,%q1,%N,%q2}}
&CMD_BET [v(SVC`Tf48885245b94665626fd)]=$^bet (\d+) on (banker|banco|punto|player|tie|standoff):@break [setq(0,switch(%2,banco,banker,punto,player,standoff,tie,%2))][switch(0,or(comp(%#,v(dealer)),not(comp(%q0,banker))),1[pemit(%#,As dealer, you must bet on 'banker'.)],gte(u(money,%#),%1), 1[pemit(%#,You can not afford that bet.)], lte(v(minimum),%1),1[pemit(%#,The table minimum is [v(minimum)].)], not(words(setdiff(lattr(me/BET-%#-*),lattr(me/BET-%#-%q0)))),1[pemit(%#,You've already made a different bet for this round.)], 0)];@wait me = {@emit %N bets [u(count,%1)] on %q0;&%# [v(bank)] = [sub(u(money,%#),%1)];&bet-%#-%q0 me=[add(default(me/bet-%#-%q0,0),%1)];@notify me}
&BETMARKS [v(SVC`Tf48885245b94665626fd)]=[switch(1,t(u(isyourbet,%0,%1)),ansi(hg,$),t(u(isbet,%0)),$)][repeat($,min(dec(%2),max(0,dec(u(isbet,%0)))))]
&BETMARK [v(SVC`Tf48885245b94665626fd)]=[switch(1,and(eq(%2,0),u(isyourbet,%0,%1)),ansi(hg,$),eq(%2,0),%b,not(comp(%0,extract(%3,%2,1))),$,%b)]
&BCARDS [v(SVC`Tf48885245b94665626fd)]=10d Kc 6h
&BANKER_THIRD [v(SVC`Tf48885245b94665626fd)]=@emit At the croupier's nod, %2 deals another card: [setr(0,u(draw))].;&BCARDS me=[v(BCARDS)] %q0;@emit The croupier looks at %0's cards, and announces, "Banker, [setr(1,u(handvalue,v(BCARDS)))].";@tr me/finish=%0,%1,%2,%q1
&BANKERHIT [v(SVC`Tf48885245b94665626fd)]=[switch(%0,<3,H,>6,S,extract(v(hittable),add(mul(sub(%0,3),10),%1,1),1))]
@set [v(SVC`Tf48885245b94665626fd)]=BANK:[v(SVC`T7d1c9a0b66f718acf350)]
@set [v(SVC`Tf48885245b94665626fd)]/USE=no_command
@set [v(SVC`Tf48885245b94665626fd)]/STATUS=no_command
@set [v(SVC`Tf48885245b94665626fd)]/STARTUP=no_command
@set [v(SVC`Tf48885245b94665626fd)]/SEMAPHORE=no_inherit no_clone locked
@set [v(SVC`Tf48885245b94665626fd)]/FULLDECKS=no_command
@set [v(SVC`Tf48885245b94665626fd)]/DESCRIBE=no_command visual public nearby
@set [v(SVC`Tf48885245b94665626fd)]/DECK=no_command
@set [v(SVC`Tf48885245b94665626fd)]/CMD_DEALERLEFT=regexp
@set [v(SVC`Tf48885245b94665626fd)]/CMD_BET=regexp
@@
@@ Filling out Bond
@@
@name [v(SVC`Tf9e5b23fc74a8983baab)]=Bond
@lock/USER:Basic [v(SVC`Tf9e5b23fc74a8983baab)]=%!
@lock/Basic [v(SVC`Tf9e5b23fc74a8983baab)]=%!
@tel [v(SVC`Tf9e5b23fc74a8983baab)]=v(SVC`R49a17f78a873806adbd2)
@link [v(SVC`Tf9e5b23fc74a8983baab)]=v(SVC`R49a17f78a873806adbd2)
@set [v(SVC`Tf9e5b23fc74a8983baab)]=iter(setdiff(lflags([v(SVC`Tf9e5b23fc74a8983baab)]),MONITOR NO_COMMAND),!##) [setdiff(MONITOR NO_COMMAND,lflags([v(SVC`Tf9e5b23fc74a8983baab)]))]
&WIN [v(SVC`Tf9e5b23fc74a8983baab)]=^He hands Bond * chips.: @switch %#=[v(table)], {:chuckles and winks.}
@set [v(SVC`Tf9e5b23fc74a8983baab)]=TABLE:[v(SVC`Tf48885245b94665626fd)]
@set [v(SVC`Tf9e5b23fc74a8983baab)]=STARTUP:&\[num\(me\)\] [v(SVC`T7d1c9a0b66f718acf350)]=10000
&SEX [v(SVC`Tf9e5b23fc74a8983baab)]=male
&PASS [v(SVC`Tf9e5b23fc74a8983baab)]=^The croupier says, "*win*"*: @switch %#=[v(table)], { pass deck }
&NEEDED [v(SVC`Tf9e5b23fc74a8983baab)]=[setdiff(PLAYER BANKER,iter(lattr([v(TABLE)]/BET-*),extract(##,3,1,-)))]
&JOIN [v(SVC`Tf9e5b23fc74a8983baab)]=^.* says, "Fancy a game,? Mr\.? Bond\??": @break [switch(1,words(lattr([v(table)]/BET-[num(me)]-*)),1[emit(Bond shakes his head. "It appears I'm already playing one.")],0)]; :looks up at %N, and replies, "Very well."; bet [mul(50,inc(rand(10)))] on [lcstr(setr(0,u(needed)))]; @break [not(comp(%q0,PLAYER))]; pick up deck; @wait 2=deal cards
&DESCRIBE [v(SVC`Tf9e5b23fc74a8983baab)]=A sauve-looking Englishman dressed in a dapper dinner jacket and black tie. If you're in need of someone to play baccarat with, make your bet [ansi(h,first)] and then say, "Fancy a game, Mr. Bond?" and he'll join in. If he's holding the deck but hasn't dealt (usually because you asked him to join before you made your bet), and you want him to, say "Your deal, Mr. Bond."
&DEAL [v(SVC`Tf9e5b23fc74a8983baab)]=^.* says, "Your deal,? Mr\.? Bond.?": deal cards
@set [v(SVC`Tf9e5b23fc74a8983baab)]/STARTUP=no_command
@set [v(SVC`Tf9e5b23fc74a8983baab)]/SEX=no_command visual
@set [v(SVC`Tf9e5b23fc74a8983baab)]/JOIN=regexp
@set [v(SVC`Tf9e5b23fc74a8983baab)]/DESCRIBE=no_command visual public nearby
@set [v(SVC`Tf9e5b23fc74a8983baab)]/DEAL=regexp
@@
@@ Filling out Lobby <O>\;lobby\;out\;o\;back\;leave
@@
@name [v(SVC`E4f11cb844f4b875b2a89)]=Lobby <O>;lobby;out;o;back;leave
@link [v(SVC`E4f11cb844f4b875b2a89)]=v(SVC`Rb45f2571a5f61ff1ff17)
@tel [v(SVC`E4f11cb844f4b875b2a89)]=v(SVC`Rf32175928c437fc65afe)
@set [v(SVC`E4f11cb844f4b875b2a89)]=iter(setdiff(lflags([v(SVC`E4f11cb844f4b875b2a89)]),),!##) [setdiff(,lflags([v(SVC`E4f11cb844f4b875b2a89)]))]
&SUCCESS [v(SVC`E4f11cb844f4b875b2a89)]=You return to the lobby.
&OSUCCESS [v(SVC`E4f11cb844f4b875b2a89)]=returns to the lobby.
&ODROP [v(SVC`E4f11cb844f4b875b2a89)]=enters from the roulette parlor.
@set [v(SVC`E4f11cb844f4b875b2a89)]/SUCCESS=no_command
@set [v(SVC`E4f11cb844f4b875b2a89)]/OSUCCESS=no_command
@set [v(SVC`E4f11cb844f4b875b2a89)]/ODROP=no_command
@@
@@ Triggering all startups, oncreates, onupdates.
@@
@trigger [v(SVC`Te8c003561ba7f45b57ab)]/STARTUP
@trigger [v(SVC`Te39a2b653594afcd9d6c)]/SVC`ONUPDATE
@trigger [v(SVC`Te39a2b653594afcd9d6c)]/STARTUP
@trigger [v(SVC`T5c94cea68131e6d41e19)]/STARTUP
@trigger [v(SVC`Tf48885245b94665626fd)]/STARTUP
@trigger [v(SVC`Tf9e5b23fc74a8983baab)]/STARTUP