"I learned this game called Pig. Wanna play?" <hr> [[Next]]"You roll this cube and count the dots or pips on the top face." "Pips?" you ask. "Well that's because they look like little seeds." Oh, makes sense. <img src="https://upload.wikimedia.org/wikipedia/commons/2/28/D6_5.svg" alt="die" class="right"> "Whatever you roll, you add to your total for the turn. You can stop and add that total to your total for the game. First to 50 wins. Ah, I see that you're wondering why you don't just keep rolling? Because if you roll a six, that means you were too greedy and you lose all your points for your turn." <hr> [[Next|next2]] (set: $yourTotal to 0, $myTotal to 0, $yourTurn to 0, $myTurn to 0) "Okay, I'll start ..." <hr> [[Next|myDecide]]"I rolled a (print: $myRoll)" "ooh, bad luck!" My total: (print: $myTotal) Your total: (print: $yourTotal) "Your turn." (set: $myTurn to 0) <hr> [[Next|yourGo]](set: $yourTotal to $yourTotal + $yourTurn) My total: (print: $myTotal) Your total: (print: $yourTotal) "My turn." (set: $yourTurn to 0) <hr> [[Next|myDecide]]"I rolled a (print: $myRoll)" My turn total so far: (print: $myTurn) <hr> [[Next|myDecide]]"I rolled a (print: $myRoll)" "Okay, I'll stop there." (set: $myTotal to $myTotal + $myTurn) My total: (print: $myTotal) Your total: (print: $yourTotal) "Your turn." (set: $myTurn to 0) <hr> [[Next|yourGo]]"You rolled a (print: $yourRoll)" Your turn total so far: (print: $yourTurn) <hr> [[Roll again|yourDecide]] or [[stop|yourStop]]"I rolled a (print: $myRoll)" "I win!" My total: (print: $myTotal) Your total: (print: $yourTotal) <hr> "Play [[again|next2]] or [[not]]?""Okay, see you around."(set: $myRoll to (random: 1, 6)) (set: $myTurn to $myTurn + $myRoll) (set: $temp to $myTotal + $myTurn) (if: $myRoll is 6) [(goto: "myBust")] (else-if: $temp > 49) [(set: $myTotal to $temp)(goto: "myWin")] (else-if: $myTurn < 10 + (sqrt:$yourTotal)) [(goto: "myRoll")] (else:) [(goto: "myStop")](set: $yourRoll to (random: 1, 6)) (set: $yourTurn to $yourTurn + $yourRoll) (set: $temp to $yourTotal + $yourTurn) (if: $yourRoll is 6) [(goto: "yourBust")] (else-if: $temp > 49) [(set: $yourTotal to $temp)(goto: "yourWin")] (else:) [(goto: "yourRoll")]"Okay, your turn. Good luck." <hr> [[Next|yourDecide]]"You rolled a (print: $yourRoll)" "ooh, bad luck!" My total: (print: $myTotal) Your total: (print: $yourTotal) "My turn." (set: $yourTurn to 0) <hr> [[Next|myDecide]]"You rolled a (print: $yourRoll)" "You win!" My total: (print: $myTotal) Your total: (print: $yourTotal) <hr> (set: $code to (random: 50, 350) * 23 + 7) Confirmation code: (print: $code)