Troll Dice
Instructions
Copy and paste the below code into a compatible MUSH or MUX.
MUSHCode for Troll Dice
@create Troll Dice
@set Troll Dice=COMMANDS
@set Troll Dice=!NO_COMMAND
@lock Troll Dice==me
@Desc Troll Dice=A set of five four-sided dice carved out of bone with a different symbol on each corner. You may read the 'rules' and then 'roll dice' to play the game.%rThe dice look like this: /\\--_%r[space(24)]/[extract(v(symbols),3,1)]\\[extract(v(symbols),2,1)]|%r[space(23)]/%b%b%b%b\\ |%r[space(22)]/[extract(v(symbols),1,1)]%b%b[extract(v(symbols),4,1)]\\|%r[space(21)]'--------`
@set Troll Dice/Desc = no_command
@Aclone Troll Dice=@pemit %#={Please use the 'copy' command to create copies of objects in here, not @clone.}; @destroy/override me
@set Troll Dice/Aclone = no_command
&CMD-RULES Troll Dice=$rules:@pemit %N=The rules are simple. Whoever gets the most dice to come up the same way wins. (Like poker with no numbers.)%rThe rolls are:%r%b%bMother-lode: All five come up alike%r%b%bLode: Four of the five dice come up alike%r%b%bVein: A strike and a pair%r%b%bStrike: Three of the dice come up alike%r%b%bNugget: Two pair of the dice come up alike%r%b%bDirt: Anything else%r
&CMD-ROLL Troll Dice=$roll dice:@emit/room %N rolls the dice.;@wait 2=@emit/room They come up as:%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]
&SYMBOLS Troll Dice=[] () >< ::
@set Troll Dice=COMMANDS
@set Troll Dice=!NO_COMMAND
@lock Troll Dice==me
@Desc Troll Dice=A set of five four-sided dice carved out of bone with a different symbol on each corner. You may read the 'rules' and then 'roll dice' to play the game.%rThe dice look like this: /\\--_%r[space(24)]/[extract(v(symbols),3,1)]\\[extract(v(symbols),2,1)]|%r[space(23)]/%b%b%b%b\\ |%r[space(22)]/[extract(v(symbols),1,1)]%b%b[extract(v(symbols),4,1)]\\|%r[space(21)]'--------`
@set Troll Dice/Desc = no_command
@Aclone Troll Dice=@pemit %#={Please use the 'copy' command to create copies of objects in here, not @clone.}; @destroy/override me
@set Troll Dice/Aclone = no_command
&CMD-RULES Troll Dice=$rules:@pemit %N=The rules are simple. Whoever gets the most dice to come up the same way wins. (Like poker with no numbers.)%rThe rolls are:%r%b%bMother-lode: All five come up alike%r%b%bLode: Four of the five dice come up alike%r%b%bVein: A strike and a pair%r%b%bStrike: Three of the dice come up alike%r%b%bNugget: Two pair of the dice come up alike%r%b%bDirt: Anything else%r
&CMD-ROLL Troll Dice=$roll dice:@emit/room %N rolls the dice.;@wait 2=@emit/room They come up as:%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]%b%b[extract(v(symbols),add(rand(4),1),1)]
&SYMBOLS Troll Dice=[] () >< ::