'=========================================================================== ' Subject: LIBERTY YAHTZEE Date: 07-10-96 (20:53) ' Author: Chris Sugden Code: LB ' Origin: csugden@thecafe.co.uk Packet: LIBERTY.ABC '=========================================================================== [Start] print " | | | | | ||||||||||||||| |||||||||| ||||||||| ||||||||||" print " | | | | | | | | | | " print " | | | | | | | | | | " print " | | | | | | | | | | " print " | | | | | | | | | | " print " | | | | |||||||||||| | | ||||||||| ||||||||||" print " | ||||||||||| | | | | | | " print " | | | | | | | | | " print " | | | | | | | | | " print " | | | | | | | | | " print " | | | | | | | | | " print " | | | | | | |||||||||| ||||||||| ||||||||||" print "" print "" input "Do you want to read some brief rules?";readrules$ if instr("YESYesyes",readrules$) > 0 then goto [Rules] print "" input "Press Enter to continue";enter if enter = 0 then goto [RollDice] [RollDice] let Reroll = 0 let Count = Count + 1 let Turns = Count - 1 cls let total = acestotal + twostotal + threestotal + fourstotal + fivestotal + sixestotal + threescore + fourscore + FullScore + LowScore + highScore + Yatzeescore + DiceSum print "After ";Turns;" turns, your score is ";total;"." print "" print "Dice being rolled..." goto [Dice1] [Dice1] let Dice1 = int(rnd(1)*6)+1 goto [Dice2] [Dice2] let Dice2 = int(rnd(1)*6)+1 goto [Dice3] [Dice3] let Dice3 = int(rnd(1)*6)+1 goto [Dice4] [Dice4] let Dice4 = int(rnd(1)*6)+1 goto [Dice5] [Dice5] let Dice5 = int(rnd(1)*6)+1 goto [Choose] [Choose] print "OK. This is how the dice came out:" print "Dice 1 came up as ";Dice1;"." print "Dice 2 came up as ";Dice2;"." print "Dice 3 came up as ";Dice3;"." print "Dice 4 came up as ";Dice4;"." print "Dice 5 came up as ";Dice5;"." print "" input "Do you want to reroll any of the dice?";reroll$ if instr("YESYesyes",reroll$) > 0 then goto [Reroll] goto [Score] [Score] print "You have a choice of how you want to score." print "" print "You can do:" print "Aces, Twos, Threes, Fours, Fives, Sixes," print "3 Of A Kind, 4 Of A Kind, Full House, Low Straight," print "High Straight, Yahtzee or Chance." print "" input "Do you want help on any of the scoring possibilities?";help$ if instr("YESYesyes",help$) > 0 then goto [Help] goto [ChooseScore] [ChooseScore] input "DO YOU WANT TO CONTINUE?";continue$ if instr("NOnoNo",continue$) > 0 then goto [Bonus] print "So how are you going to score?" print "" print "Please type in the first word or number of each scoring" input "possibility, such as '3' for '3 Of A Kind'.";score$ goto [ChooseAces] [ChooseAces] if instr("ACESacesAces",score$) > 0 then goto [Aces] goto [ChooseTwos] [ChooseTwos] if instr("TWOSTwostwos",score$) > 0 then goto [Twos] goto [ChooseThrees] [ChooseThrees] if instr("THREESThreesthrees",score$) > 0 then goto [Threes] goto [ChooseFours] [ChooseFours] if instr("FOURSfoursFours",score$) > 0 then goto [Fours] goto [ChooseFives] [ChooseFives] if instr("FivesfivesFIVES",score$) > 0 then goto [Fives] goto [ChooseSixes] [ChooseSixes] if instr("SIXESsixesSixes",score$) > 0 then goto [Sixes] goto [Choose3OfAKind] [Choose3OfAKind] if instr("3",score$) > 0 then goto [3OfAKind] goto [Choose4OfAKind] [Choose4OfAKind] if instr("4",score$) > 0 then goto [4OfAKind] goto [ChooseFullHouse] [ChooseFullHouse] if instr("FullFullfull",score$) > 0 then goto [FullHouse] goto [ChooseLowStraight] [ChooseLowStraight] if instr("LOWlowLow",score$) > 0 then goto [LowStraight] goto [ChooseHighStraight] [ChooseHighStraight] if instr("HIGHHighhigh",score$) > 0 then goto [HighStraight] goto [ChooseYahtzee] [ChooseYahtzee] if instr("YAHTZEEYahtzeeyahtzee",score$) > 0 then goto [Yahtzee] goto [ChooseChance] [ChooseChance] if instr("CHANCEChancechance",score$) > 0 then goto [Chance] goto [Unknown] [Unknown] cls print "There is no such scoring possibility!" print "Try again." print "" goto [ChooseScore] [Aces] let AcesCount = AcesCount + 1 if AcesCount > 1 then goto [AlreadyChosen] if Dice1 = 1 then let total = total + 1 if Dice2 = 1 then let total = total + 1 if Dice3 = 1 then let total = total + 1 if Dice4 = 1 then let total = total + 1 if Dice5 = 1 then let total = total + 1 if Dice1 = 1 then let acestotal = acestotal + 1 if Dice2 = 1 then let acestotal = acestotal + 1 if Dice3 = 1 then let acestotal = acestotal + 1 if Dice4 = 1 then let acestotal = acestotal + 1 if Dice5 = 1 then let acestotal = acestotal + 1 print "That turn you won ";acestotal;" points." input "Press Enter to continue";enter1 goto [RollDice] [Twos] let TwosCount = TwosCount + 1 if TwosCount > 1 then goto [AlreadyChosen] if Dice1 = 2 then let total = total + 2 if Dice2 = 2 then let total = total + 2 if Dice3 = 2 then let total = total + 2 if Dice4 = 2 then let total = total + 2 if Dice5 = 2 then let total = total + 2 if Dice1 = 2 then let twostotal = twostotal + 2 if Dice2 = 2 then let twostotal = twostotal + 2 if Dice3 = 2 then let twostotal = twostotal + 2 if Dice4 = 2 then let twostotal = twostotal + 2 if Dice5 = 2 then let twostotal = twostotal + 2 print "That turn you won ";twostotal;" points." input "Press Enter to continue";enter2 goto [RollDice] [Threes] let ThreesCount = ThreesCount + 1 if ThreesCount > 1 then goto [AlreadyChosen] if Dice1 = 3 then let total = total + 3 if Dice2 = 3 then let total = total + 3 if Dice3 = 3 then let total = total + 3 if Dice4 = 3 then let total = total + 3 if Dice5 = 3 then let total = total + 3 if Dice1 = 3 then let threestotal = threestotal + 3 if Dice2 = 3 then let threestotal = threestotal + 3 if Dice3 = 3 then let threestotal = threestotal + 3 if Dice4 = 3 then let threestotal = threestotal + 3 if Dice5 = 3 then let threestotal = threestotal + 3 print "That turn you won ";threestotal;" points." input "Press Enter to continue";enter3 goto [RollDice] [Fours] let FoursCount = FoursCount + 1 if FoursCount > 1 then goto [AlreadyChosen] if Dice1 = 4 then let total = total + 4 if Dice2 = 4 then let total = total + 4 if Dice3 = 4 then let total = total + 4 if Dice4 = 4 then let total = total + 4 if Dice5 = 4 then let total = total + 4 if Dice1 = 4 then let fourstotal = fourstotal + 4 if Dice2 = 4 then let fourstotal = fourstotal + 4 if Dice3 = 4 then let fourstotal = fourstotal + 4 if Dice4 = 4 then let fourstotal = fourstotal + 4 if Dice5 = 4 then let fourstotal = fourstotal + 4 print "That turn you won ";fourstotal;" points." input "Press Enter to continue";enter4 goto [RollDice] [Fives] let FivesCount = FivesCount + 1 if FivesCount > 1 then goto [AlreadyChosen] if Dice1 = 5 then let total = total + 5 if Dice2 = 5 then let total = total + 5 if Dice3 = 5 then let total = total + 5 if Dice4 = 5 then let total = total + 5 if Dice5 = 5 then let total = total + 5 if Dice1 = 5 then let fivestotal = fivestotal + 5 if Dice2 = 5 then let fivestotal = fivestotal + 5 if Dice3 = 5 then let fivestotal = fivestotal + 5 if Dice4 = 5 then let fivestotal = fivestotal + 5 if Dice5 = 5 then let fivestotal = fivestotal + 5 print "That turn you won ";fivestotal;" points." input "Press Enter to continue";enter4 goto [RollDice] [Sixes] let SixesCount = SixesCount + 1 if SixesCount > 1 then goto [AlreadyChosen] if Dice1 = 6 then let total = total + 6 if Dice2 = 6 then let total = total + 6 if Dice3 = 6 then let total = total + 6 if Dice4 = 6 then let total = total + 6 if Dice5 = 6 then let total = total + 6 if Dice1 = 6 then let sixestotal = sixestotal + 6 if Dice2 = 6 then let sixestotal = sixestotal + 6 if Dice3 = 6 then let sixestotal = sixestotal + 6 if Dice4 = 6 then let sixestotal = sixestotal + 6 if Dice5 = 6 then let sixestotal = sixestotal + 6 print "That turn you won ";sixestotal;" points." input "Press Enter to continue";enter4 goto [RollDice] [3OfAKind] let threeOfCount = threeOfCount + 1 if threeOfCount > 1 then goto [AlreadyChosen] if Dice1 = Dice2 then goto [3OK12] if Dice1 = Dice3 then goto [3OK13] if Dice1 = Dice4 then goto [3OK14] if Dice1 = Dice5 then goto [3OK15] if Dice2 = Dice3 then goto [3OK23] if Dice2 = Dice4 then goto [3OK24] if Dice2 = Dice5 then goto [3OK25] if Dice3 = Dice4 then goto [3OK34] if Dice3 = Dice5 then goto [3OK35] if Dice4 = Dice5 then goto [3OK45] goto [NO3OF] [NO3OF] print "Sorry, you don't have 3 Of A Kind." print "Try again." print "" goto [Choosescore] [3OK12] if Dice1 = Dice3 then goto [OK3] if Dice1 = Dice4 then goto [OK3] if Dice1 = Dice5 then goto [OK3] goto [NO3OF] [3OK13] if Dice1 = Dice2 then goto [OK3] if Dice1 = Dice4 then goto [OK3] if Dice1 = Dice5 then goto [OK3] goto [NO3OF] [3OK14] if Dice1 = Dice2 then goto [OK3] if Dice1 = Dice3 then goto [OK3] if Dice1 = Dice5 then goto [OK3] goto [NO3OF] [3OK15] if Dice1 = Dice2 then goto [OK3] if Dice1 = Dice3 then goto [OK3] if Dice1 = Dice4 then goto [OK3] goto [NO3OF] [3OK23] if Dice2 = Dice1 then goto [OK3] if Dice2 = Dice4 then goto [OK3] if Dice2 = Dice5 then goto [OK3] goto [NO3OF] [3OK24] if Dice2 = Dice3 then goto [OK3] if Dice2 = Dice1 then goto [OK3] if Dice2 = Dice5 then goto [OK3] goto [NO3OF] [3OK25] if Dice2 = Dice1 then goto [OK3] if Dice2 = Dice3 then goto [OK3] if Dice2 = Dice4 then goto [OK3] goto [NO3OF] [3OK34] if Dice3 = Dice1 then goto [OK3] if Dice3 = Dice2 then goto [OK3] if Dice3 = Dice5 then goto [OK3] goto [NO3OF] [3OK35] if Dice3 = Dice1 then goto [OK3] if Dice3 = Dice2 then goto [OK3] if Dice3 = Dice4 then goto [OK3] goto [NO3OF] [3OK45] if Dice4 = Dice1 then goto [OK3] if Dice4 = Dice2 then goto [OK3] if Dice4 = Dice3 then goto [OK3] goto [NO3OF] [OK3] let threescore = Dice1 + Dice2 + Dice3 + Dice4 + Dice5 print "That turn you won ";threescore;" points." input "Press Enter to continue";enter5 goto [RollDice] [4OfAKind] let fourOfCount = fourOfCount + 1 if fourOfCount > 1 then goto [AlreadyChosen] let AllDice$ = "";Dice1;"";Dice2;"";Dice3;"";Dice4;"";Dice5;"" if instr(AllDice$,"11111") > 0 then goto [OK4] if instr(AllDice$,"21111") > 0 then goto [OK4] if instr(AllDice$,"31111") > 0 then goto [OK4] if instr(AllDice$,"41111") > 0 then goto [OK4] if instr(AllDice$,"51111") > 0 then goto [OK4] if instr(AllDice$,"61111") > 0 then goto [OK4] if instr(AllDice$,"11111") > 0 then goto [OK4] if instr(AllDice$,"12111") > 0 then goto [OK4] if instr(AllDice$,"13111") > 0 then goto [OK4] if instr(AllDice$,"14111") > 0 then goto [OK4] if instr(AllDice$,"15111") > 0 then goto [OK4] if instr(AllDice$,"16111") > 0 then goto [OK4] if instr(AllDice$,"11111") > 0 then goto [OK4] if instr(AllDice$,"11211") > 0 then goto [OK4] if instr(AllDice$,"11311") > 0 then goto [OK4] if instr(AllDice$,"11411") > 0 then goto [OK4] if instr(AllDice$,"11511") > 0 then goto [OK4] if instr(AllDice$,"11611") > 0 then goto [OK4] if instr(AllDice$,"11111") > 0 then goto [OK4] if instr(AllDice$,"11121") > 0 then goto [OK4] if instr(AllDice$,"11131") > 0 then goto [OK4] if instr(AllDice$,"11141") > 0 then goto [OK4] if instr(AllDice$,"11151") > 0 then goto [OK4] if instr(AllDice$,"11161") > 0 then goto [OK4] if instr(AllDice$,"11111") > 0 then goto [OK4] if instr(AllDice$,"11112") > 0 then goto [OK4] if instr(AllDice$,"11113") > 0 then goto [OK4] if instr(AllDice$,"11114") > 0 then goto [OK4] if instr(AllDice$,"11115") > 0 then goto [OK4] if instr(AllDice$,"11116") > 0 then goto [OK4] if instr(AllDice$,"22222") > 0 then goto [OK4] if instr(AllDice$,"32222") > 0 then goto [OK4] if instr(AllDice$,"42222") > 0 then goto [OK4] if instr(AllDice$,"52222") > 0 then goto [OK4] if instr(AllDice$,"62222") > 0 then goto [OK4] if instr(AllDice$,"12222") > 0 then goto [OK4] if instr(AllDice$,"21222") > 0 then goto [OK4] if instr(AllDice$,"22222") > 0 then goto [OK4] if instr(AllDice$,"23222") > 0 then goto [OK4] if instr(AllDice$,"24222") > 0 then goto [OK4] if instr(AllDice$,"25222") > 0 then goto [OK4] if instr(AllDice$,"26222") > 0 then goto [OK4] if instr(AllDice$,"22122") > 0 then goto [OK4] if instr(AllDice$,"22222") > 0 then goto [OK4] if instr(AllDice$,"22322") > 0 then goto [OK4] if instr(AllDice$,"22422") > 0 then goto [OK4] if instr(AllDice$,"22522") > 0 then goto [OK4] if instr(AllDice$,"22622") > 0 then goto [OK4] if instr(AllDice$,"22212") > 0 then goto [OK4] if instr(AllDice$,"22222") > 0 then goto [OK4] if instr(AllDice$,"22232") > 0 then goto [OK4] if instr(AllDice$,"22242") > 0 then goto [OK4] if instr(AllDice$,"22252") > 0 then goto [OK4] if instr(AllDice$,"22262") > 0 then goto [OK4] if instr(AllDice$,"22221") > 0 then goto [OK4] if instr(AllDice$,"22222") > 0 then goto [OK4] if instr(AllDice$,"22223") > 0 then goto [OK4] if instr(AllDice$,"22224") > 0 then goto [OK4] if instr(AllDice$,"22225") > 0 then goto [OK4] if instr(AllDice$,"22226") > 0 then goto [OK4] if instr(AllDice$,"13333") > 0 then goto [OK4] if instr(AllDice$,"23333") > 0 then goto [OK4] if instr(AllDice$,"33333") > 0 then goto [OK4] if instr(AllDice$,"43333") > 0 then goto [OK4] if instr(AllDice$,"53333") > 0 then goto [OK4] if instr(AllDice$,"63333") > 0 then goto [OK4] if instr(AllDice$,"31333") > 0 then goto [OK4] if instr(AllDice$,"32333") > 0 then goto [OK4] if instr(AllDice$,"33333") > 0 then goto [OK4] if instr(AllDice$,"34333") > 0 then goto [OK4] if instr(AllDice$,"35333") > 0 then goto [OK4] if instr(AllDice$,"36333") > 0 then goto [OK4] if instr(AllDice$,"33133") > 0 then goto [OK4] if instr(AllDice$,"33233") > 0 then goto [OK4] if instr(AllDice$,"33333") > 0 then goto [OK4] if instr(AllDice$,"33433") > 0 then goto [OK4] if instr(AllDice$,"33533") > 0 then goto [OK4] if instr(AllDice$,"33633") > 0 then goto [OK4] if instr(AllDice$,"33313") > 0 then goto [OK4] if instr(AllDice$,"33323") > 0 then goto [OK4] if instr(AllDice$,"33333") > 0 then goto [OK4] if instr(AllDice$,"33343") > 0 then goto [OK4] if instr(AllDice$,"33353") > 0 then goto [OK4] if instr(AllDice$,"33363") > 0 then goto [OK4] if instr(AllDice$,"33331") > 0 then goto [OK4] if instr(AllDice$,"33332") > 0 then goto [OK4] if instr(AllDice$,"33333") > 0 then goto [OK4] if instr(AllDice$,"33334") > 0 then goto [OK4] if instr(AllDice$,"33335") > 0 then goto [OK4] if instr(AllDice$,"33336") > 0 then goto [OK4] if instr(AllDice$,"14444") > 0 then goto [OK4] if instr(AllDice$,"24444") > 0 then goto [OK4] if instr(AllDice$,"34444") > 0 then goto [OK4] if instr(AllDice$,"44444") > 0 then goto [OK4] if instr(AllDice$,"54444") > 0 then goto [OK4] if instr(AllDice$,"64444") > 0 then goto [OK4] if instr(AllDice$,"41444") > 0 then goto [OK4] if instr(AllDice$,"42444") > 0 then goto [OK4] if instr(AllDice$,"43444") > 0 then goto [OK4] if instr(AllDice$,"44444") > 0 then goto [OK4] if instr(AllDice$,"45444") > 0 then goto [OK4] if instr(AllDice$,"46444") > 0 then goto [OK4] if instr(AllDice$,"44144") > 0 then goto [OK4] if instr(AllDice$,"44244") > 0 then goto [OK4] if instr(AllDice$,"44344") > 0 then goto [OK4] if instr(AllDice$,"44444") > 0 then goto [OK4] if instr(AllDice$,"44544") > 0 then goto [OK4] if instr(AllDice$,"44644") > 0 then goto [OK4] if instr(AllDice$,"44414") > 0 then goto [OK4] if instr(AllDice$,"44424") > 0 then goto [OK4] if instr(AllDice$,"44434") > 0 then goto [OK4] if instr(AllDice$,"44444") > 0 then goto [OK4] if instr(AllDice$,"44454") > 0 then goto [OK4] if instr(AllDice$,"44464") > 0 then goto [OK4] if instr(AllDice$,"44441") > 0 then goto [OK4] if instr(AllDice$,"44442") > 0 then goto [OK4] if instr(AllDice$,"44443") > 0 then goto [OK4] if instr(AllDice$,"44444") > 0 then goto [OK4] if instr(AllDice$,"44445") > 0 then goto [OK4] if instr(AllDice$,"44446") > 0 then goto [OK4] if instr(AllDice$,"15555") > 0 then goto [OK4] if instr(AllDice$,"25555") > 0 then goto [OK4] if instr(AllDice$,"35555") > 0 then goto [OK4] if instr(AllDice$,"45555") > 0 then goto [OK4] if instr(AllDice$,"55555") > 0 then goto [OK4] if instr(AllDice$,"65555") > 0 then goto [OK4] if instr(AllDice$,"51555") > 0 then goto [OK4] if instr(AllDice$,"52555") > 0 then goto [OK4] if instr(AllDice$,"53555") > 0 then goto [OK4] if instr(AllDice$,"54555") > 0 then goto [OK4] if instr(AllDice$,"55555") > 0 then goto [OK4] if instr(AllDice$,"56555") > 0 then goto [OK4] if instr(AllDice$,"55155") > 0 then goto [OK4] if instr(AllDice$,"55255") > 0 then goto [OK4] if instr(AllDice$,"55355") > 0 then goto [OK4] if instr(AllDice$,"55455") > 0 then goto [OK4] if instr(AllDice$,"55555") > 0 then goto [OK4] if instr(AllDice$,"55655") > 0 then goto [OK4] if instr(AllDice$,"55515") > 0 then goto [OK4] if instr(AllDice$,"55525") > 0 then goto [OK4] if instr(AllDice$,"55535") > 0 then goto [OK4] if instr(AllDice$,"55545") > 0 then goto [OK4] if instr(AllDice$,"55555") > 0 then goto [OK4] if instr(AllDice$,"55565") > 0 then goto [OK4] if instr(AllDice$,"55551") > 0 then goto [OK4] if instr(AllDice$,"55552") > 0 then goto [OK4] if instr(AllDice$,"55553") > 0 then goto [OK4] if instr(AllDice$,"55554") > 0 then goto [OK4] if instr(AllDice$,"55555") > 0 then goto [OK4] if instr(AllDice$,"55556") > 0 then goto [OK4] if instr(AllDice$,"16666") > 0 then goto [OK4] if instr(AllDice$,"26666") > 0 then goto [OK4] if instr(AllDice$,"36666") > 0 then goto [OK4] if instr(AllDice$,"46666") > 0 then goto [OK4] if instr(AllDice$,"56666") > 0 then goto [OK4] if instr(AllDice$,"66666") > 0 then goto [OK4] if instr(AllDice$,"61666") > 0 then goto [OK4] if instr(AllDice$,"62666") > 0 then goto [OK4] if instr(AllDice$,"63666") > 0 then goto [OK4] if instr(AllDice$,"64666") > 0 then goto [OK4] if instr(AllDice$,"65666") > 0 then goto [OK4] if instr(AllDice$,"66666") > 0 then goto [OK4] if instr(AllDice$,"66166") > 0 then goto [OK4] if instr(AllDice$,"66266") > 0 then goto [OK4] if instr(AllDice$,"66366") > 0 then goto [OK4] if instr(AllDice$,"66466") > 0 then goto [OK4] if instr(AllDice$,"66566") > 0 then goto [OK4] if instr(AllDice$,"66666") > 0 then goto [OK4] if instr(AllDice$,"66616") > 0 then goto [OK4] if instr(AllDice$,"66626") > 0 then goto [OK4] if instr(AllDice$,"66636") > 0 then goto [OK4] if instr(AllDice$,"66646") > 0 then goto [OK4] if instr(AllDice$,"66656") > 0 then goto [OK4] if instr(AllDice$,"66666") > 0 then goto [OK4] if instr(AllDice$,"66661") > 0 then goto [OK4] if instr(AllDice$,"66662") > 0 then goto [OK4] if instr(AllDice$,"66663") > 0 then goto [OK4] if instr(AllDice$,"66664") > 0 then goto [OK4] if instr(AllDice$,"66665") > 0 then goto [OK4] if instr(AllDice$,"66666") > 0 then goto [OK4] print "Sorry, you don't have 4 Of A Kind." print "Try again." print "" goto [ChooseScore] [OK4] let fourscore = Dice1 + Dice2 + Dice3 + Dice4 + Dice5 print "That turn you won ";fourscore;" points." input "Press Enter to continue";enter6 goto [RollDice] [FullHouse] let fullHousecount = fullHouseCount + 1 if fullHouseCount > 1 then goto [AlreadyChosen] let FullScore = 0 if Dice1 = Dice2 then goto [Full12] if Dice1 = Dice3 then goto [Full13] if Dice1 = Dice4 then goto [Full14] if Dice1 = Dice5 then goto [Full15] if Dice2 = Dice3 then goto [Full23] if Dice2 = Dice4 then goto [Full24] if Dice2 = Dice5 then goto [Full25] if Dice3 = Dice4 then goto [Full34] if Dice3 = Dice5 then goto [Full35] if Dice4 = Dice5 then goto [Full45] goto [NoFull] [NoFull] print "Sorry, you don't have a Full House." print "Try again." print "" goto [ChooseScore] [Full12] if Dice1 = Dice3 then goto [Full123] if Dice1 = Dice4 then goto [Full124] if Dice1 = Dice5 then goto [Full125] goto [Full345] [Full13] if Dice1 = Dice2 then goto [Full123] if Dice1 = Dice4 then goto [Full134] if Dice1 = Dice5 then goto [Full135] goto [Full245] [Full14] if Dice1 = Dice2 then goto [Full124] if Dice1 = Dice3 then goto [Full134] if Dice1 = Dice5 then goto [Full145] goto [Full235] [Full15] if Dice1 = Dice2 then goto [Full125] if Dice1 = Dice3 then goto [Full135] if Dice1 = Dice4 then goto [Full145] goto [Full234] [Full23] if Dice2 = Dice4 then goto [Full234] if Dice2 = Dice1 then goto [Full123] if Dice2 = Dice5 then goto [Full235] goto [Full145] [Full24] if Dice2 = Dice1 then goto [Full124] if Dice2 = Dice3 then goto [Full234] if Dice2 = Dice5 then goto [Full245] goto [Full135] [Full25] if Dice2 = Dice1 then goto [Full125] if Dice2 = Dice3 then goto [Full235] if Dice2 = Dice4 then goto [Full245] goto [Full134] [Full34] if Dice3 = Dice1 then goto [Full134] if Dice3 = Dice2 then goto [Full234] if Dice3 = Dice5 then goto [Full345] goto [Full125] [Full35] if Dice3 = Dice1 then goto [Full135] if Dice3 = Dice2 then goto [Full235] if Dice3 = Dice4 then goto [Full345] goto [Full124] [Full45] if Dice4 = Dice1 then goto [Full145] if Dice4 = Dice2 then goto [Full245] if Dice4 = Dice3 then goto [Full345] goto [Full123] [Full123] if Dice1 <> Dice2 then goto [NoFull] if Dice1 <> Dice3 then goto [NoFull] goto [OKFull] [Full124] if Dice1 <> Dice2 then goto [NoFull] if Dice1 <> Dice4 then goto [NoFull] goto [OKFull] [Full125] if Dice1 <> Dice2 then goto [NoFull] if Dice1 <> Dice5 then goto [NoFull] goto [OKFull] [Full134] if Dice1 <> Dice3 then goto [NoFull] if Dice1 <> Dice4 then goto [NoFull] goto [OKFull] [Full135] if Dice1 <> Dice3 then goto [NoFull] if Dice1 <> Dice5 then goto [NoFull] goto [OKFull] [Full145] if Dice1 <> Dice4 then goto [NoFull] if Dice1 <> Dice5 then goto [NoFull] goto [OKFull] [Full234] if Dice2 <> Dice3 then goto [NoFull] if Dice2 <> Dice4 then goto [NoFull] goto [OKFull] [Full235] if Dice2 <> Dice3 then goto [NoFull] if Dice2 <> Dice5 then goto [NoFull] goto [OKFull] [Full245] if Dice2 <> Dice4 then goto [NoFull] if Dice2 <> Dice5 then goto [NoFull] goto [OKFull] [Full345] if Dice3 <> Dice4 then goto [NoFull] if Dice3 <> Dice5 then goto [NoFull] goto [OKFull] [OKFull] let FullScore = FullScore + 25 print "That turn you won ";FullScore;" points." input "Press Enter to continue";enter7 goto [RollDice] [LowStraight] let LowCount = LowCount + 1 if LowCount > 1 then goto [AlreadyChosen] let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice3;"";Dice4;"";Dice5;"" if Dice1 = Dice2 then let Dicenumbers$ = "";Dice1;"";Dice3;"";Dice4;"";Dice5;"" if Dice1 = Dice3 then let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice4;"";Dice5;"" if Dice1 = Dice4 then let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice3;"";Dice5;"" if Dice1 = Dice5 then let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice3;"";Dice4;"" if Dice2 = Dice3 then let Dicenumbers$ = "";Dice1;"";Dice3;"";Dice4;"";Dice5;"" if Dice2 = Dice4 then let Dicenumbers$ = "";Dice1;"";Dice3;"";Dice4;"";Dice5;"" if Dice2 = Dice5 then let Dicenumbers$ = "";Dice1;"";Dice3;"";Dice4;"";Dice5;"" if Dice3 = Dice4 then let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice4;"";Dice5;"" if Dice3 = Dice5 then let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice4;"";Dice5;"" if Dice4 = Dice5 then let Dicenumbers$ = "";Dice1;"";Dice2;"";Dice3;"";Dice5;"" if instr(Dicenumbers$,"1234") > 0 then goto [OKLow] if instr(Dicenumbers$,"1243") > 0 then goto [OKLow] if instr(Dicenumbers$,"1324") > 0 then goto [OKLow] if instr(Dicenumbers$,"1342") > 0 then goto [OKLow] if instr(Dicenumbers$,"1432") > 0 then goto [OKLow] if instr(Dicenumbers$,"1423") > 0 then goto [OKLow] if instr(Dicenumbers$,"2341") > 0 then goto [OKLow] if instr(Dicenumbers$,"2314") > 0 then goto [OKLow] if instr(Dicenumbers$,"2413") > 0 then goto [OKLow] if instr(Dicenumbers$,"2431") > 0 then goto [OKLow] if instr(Dicenumbers$,"2134") > 0 then goto [OKLow] if instr(Dicenumbers$,"2143") > 0 then goto [OKLow] if instr(Dicenumbers$,"3412") > 0 then goto [OKLow] if instr(Dicenumbers$,"3421") > 0 then goto [OKLow] if instr(Dicenumbers$,"3214") > 0 then goto [OKLow] if instr(Dicenumbers$,"3241") > 0 then goto [OKLow] if instr(Dicenumbers$,"3142") > 0 then goto [OKLow] if instr(Dicenumbers$,"3124") > 0 then goto [OKLow] if instr(Dicenumbers$,"4123") > 0 then goto [OKLow] if instr(Dicenumbers$,"4132") > 0 then goto [OKLow] if instr(Dicenumbers$,"4321") > 0 then goto [OKLow] if instr(Dicenumbers$,"4312") > 0 then goto [OKLow] if instr(Dicenumbers$,"4231") > 0 then goto [OKLow] if instr(Dicenumbers$,"4213") > 0 then goto [OKLow] if instr(Dicenumbers$,"2345") > 0 then goto [OKLow] if instr(Dicenumbers$,"2354") > 0 then goto [OKLow] if instr(Dicenumbers$,"2453") > 0 then goto [OKLow] if instr(Dicenumbers$,"2435") > 0 then goto [OKLow] if instr(Dicenumbers$,"2543") > 0 then goto [OKLow] if instr(Dicenumbers$,"2534") > 0 then goto [OKLow] if instr(Dicenumbers$,"3452") > 0 then goto [OKLow] if instr(Dicenumbers$,"3425") > 0 then goto [OKLow] if instr(Dicenumbers$,"3254") > 0 then goto [OKLow] if instr(Dicenumbers$,"3245") > 0 then goto [OKLow] if instr(Dicenumbers$,"3542") > 0 then goto [OKLow] if instr(Dicenumbers$,"3524") > 0 then goto [OKLow] if instr(Dicenumbers$,"4523") > 0 then goto [OKLow] if instr(Dicenumbers$,"4532") > 0 then goto [OKLow] if instr(Dicenumbers$,"4235") > 0 then goto [OKLow] if instr(Dicenumbers$,"4253") > 0 then goto [OKLow] if instr(Dicenumbers$,"4325") > 0 then goto [OKLow] if instr(Dicenumbers$,"4352") > 0 then goto [OKLow] if instr(Dicenumbers$,"5234") > 0 then goto [OKLow] if instr(Dicenumbers$,"5243") > 0 then goto [OKLow] if instr(Dicenumbers$,"5342") > 0 then goto [OKLow] if instr(Dicenumbers$,"5324") > 0 then goto [OKLow] if instr(Dicenumbers$,"5423") > 0 then goto [OKLow] if instr(Dicenumbers$,"5432") > 0 then goto [OKLow] if instr(Dicenumbers$,"3456") > 0 then goto [OKLow] if instr(Dicenumbers$,"3465") > 0 then goto [OKLow] if instr(Dicenumbers$,"3564") > 0 then goto [OKLow] if instr(Dicenumbers$,"3546") > 0 then goto [OKLow] if instr(Dicenumbers$,"3645") > 0 then goto [OKLow] if instr(Dicenumbers$,"3654") > 0 then goto [OKLow] if instr(Dicenumbers$,"4563") > 0 then goto [OKLow] if instr(Dicenumbers$,"4536") > 0 then goto [OKLow] if instr(Dicenumbers$,"4365") > 0 then goto [OKLow] if instr(Dicenumbers$,"4356") > 0 then goto [OKLow] if instr(Dicenumbers$,"4653") > 0 then goto [OKLow] if instr(Dicenumbers$,"4635") > 0 then goto [OKLow] if instr(Dicenumbers$,"5634") > 0 then goto [OKLow] if instr(Dicenumbers$,"5643") > 0 then goto [OKLow] if instr(Dicenumbers$,"5436") > 0 then goto [OKLow] if instr(Dicenumbers$,"5463") > 0 then goto [OKLow] if instr(Dicenumbers$,"5364") > 0 then goto [OKLow] if instr(Dicenumbers$,"5346") > 0 then goto [OKLow] if instr(Dicenumbers$,"6345") > 0 then goto [OKLow] if instr(Dicenumbers$,"6354") > 0 then goto [OKLow] if instr(Dicenumbers$,"6453") > 0 then goto [OKLow] if instr(Dicenumbers$,"6435") > 0 then goto [OKLow] if instr(Dicenumbers$,"6543") > 0 then goto [OKLow] if instr(Dicenumbers$,"6534") > 0 then goto [OKLow] [NoLow] print "Sorry, you don't have a Low Straight." print "Try again." print "" goto [ChooseScore] [OKLow] let LowScore = LowScore + 30 print "OK. That turn you won ";LowScore;" points." input "Press Enter to continue";enter8 goto [RollDice] [HighStraight] let HighCount = HighCount + 1 let highScore = 0 if HighCount > 1 then goto [AlreadyChosen] if Dice1 = Dice2 then goto [NoHigh] if Dice1 = Dice3 then goto [NoHigh] if Dice1 = Dice4 then goto [NoHigh] if Dice1 = Dice5 then goto [NoHigh] if Dice2 = Dice3 then goto [NoHigh] if Dice2 = Dice4 then goto [NoHigh] if Dice2 = Dice5 then goto [NoHigh] if Dice3 = Dice4 then goto [NoHigh] if Dice3 = Dice5 then goto [NoHigh] if Dice4 = Dice5 then goto [NoHigh] goto [OKHigh] [NoHigh] print "Sorry, you don't have a High Straight." print "Try again." goto [ChooseScore] [OKHigh] let highScore = highScore + 40 print "OK. that turn you won ";highScore;" points." input "Press Enter to continue";enter9 goto [RollDice] [Yahtzee] if instr("11111",Dicenumbers$) > 0 then goto [OKYahtzee] if instr("22222",Dicenumbers$) > 0 then goto [OKYahtzee] if instr("33333",Dicenumbers$) > 0 then goto [OKYahtzee] if instr("44444",Dicenumbers$) > 0 then goto [OKYahtzee] if instr("55555",Dicenumbers$) > 0 then goto [OKYahtzee] if instr("66666",Dicenumbers$) > 0 then goto [OKYahtzee] goto [NoYahtzee] [NoYahtzee] print "Sorry, you don't have a Yahtzee." print "Try again." goto [ChooseScore] [OKYahtzee] let YahtzeeCount = YahtzeeCount + 1 let Yahtzeescore = 0 if YahtzeeCount = 1 then let Yahtzeescore = Yahtzeescore + 50 if YahtzeeCount = 2 then let Yahtzeescore = Yahtzeescore + 50 if YahtzeeCount = 3 then let Yahtzeescore = Yahtzeescore + 100 if YahtzeeCount = 4 then let Yahtzeescore = Yahtzeescore + 100 print "Congratulations, you got a Yahtzee!" print "You've just won yourself 50 points!" input "Press Enter to continue";enter10 goto [RollDice] [Chance] let ChanceCount = ChanceCount + 1 if ChanceCount > 1 then goto [AlreadyChosen] let DiceSum = Dice1 + Dice2 + Dice3 + Dice4 + Dice5 print "OK. You've just won yourself ";DiceSum;" points." input "Press Enter to continue";enter11 goto [RollDice] [AlreadyChosen] print "Sorry, you've already used that score possibilty." print "Try again." goto [ChooseScore] [Reroll] let Reroll = Reroll + 1 if Reroll > 2 then goto [TooManyRerolls] input "Do you want to reroll Dice 1?";redo1$ input "Do you want to reroll Dice 2?";redo2$ input "Do you want to reroll Dice 3?";redo3$ input "Do you want to reroll Dice 4?";redo4$ input "Do you want to reroll Dice 5?";redo5$ if instr("YESyesYes",redo1$) > 0 then let Dice1 = int(rnd(1)*6)+1 if instr("YESyesYes",redo2$) > 0 then let Dice2 = int(rnd(1)*6)+1 if instr("YESyesYes",redo3$) > 0 then let Dice3 = int(rnd(1)*6)+1 if instr("YESyesYes",redo4$) > 0 then let Dice4 = int(rnd(1)*6)+1 if instr("YESyesYes",redo5$) > 0 then let Dice5 = int(rnd(1)*6)+1 goto [Choose] [TooManyRerolls] print "Sorry, you've already had two rerolls." input "Press Enter to continue.";enter12 goto [Choose] [Help] print "OK. This is a list of all the scoring possibilities and how many" print "points each one gives you:" print "" print "'Aces' counts how many ones there are, and gives you that number in points." print "" print "'Twos' counts how many twos there are, and gives you double that number in points." print "" print "'Threes' counts how many threes there are, and gives you three times that number in points." print "" print "'Fours' counts how many fours there are, and gives you four times that number in points." print "" print "'Fives' counts how many fives there are, and gives you five times that number in points." print "" print "'Sixes' counts how many sixes there are, and gives you six times that number in points." print "" print "'3 Of A Kind' checks to see if you have 3 (or more) of one number, and then gives you" print "the total of all the dice in points." print "" print "'4 Of A Kind' checks to see if you have 4 (or more) of one number, and then gives you" print "the total of all the dice in points." print "" print "'Full House' checks to see if you have a '3 Of A Kind' and a pair, and then gives you" print "25 points" print "" print "Low Straight' checks to see if you have a run, or straight, of at least 4, and then gives" print "you 30 points." print "" print "'High Straight' checks to see if you have a run, or straight, of 5, and then gives" print "you 40 points." print "" print "'Yahtzee' checks to see if all dice are the same, and then gives you 50 points" print "(for each Yahtzee after the first, you get twice as much as the last, until your 4th)." print "" print "'Chance' gives you the sum of all the dice in points." print "" input "Press Enter to continue.";enter13 goto [ChooseScore] [Bonus] let uptotal = acestotal + twostotal + threestotal + fourstotal + fivestotal + sixestotal if uptotal < 63 then goto [Totals] print "Since you have over 62 points in the Upper Section (Aces+Twos+Threes+Fours+Fives+Sixes), " print "you get a bonus of 35 points!" let bonus = bonus + 35 goto [Totals] [Totals] let gtotal = bonus + acestotal + twostotal + threestotal + fourstotal + fivestotal + sixestotal + threescore + fourscore + FullScore + LowScore + highScore + Yatzeescore + DiceSum cls print "Your Grand Total is ";gtotal;"!" input "Press Enter to continue.";enter99 goto [End] [End] cls print "BYE!" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "" print "Liberty Yahtzee - 1996 SugdenSoft" end [Rules] cls print "OK, this is how it works:" print "5 dice are rolled, and you get a choice for how you want to use them." print "The more difficult to get, the more points it's worth." print "You also get two rerolls if you want to reroll some or all of your dice." print "" print "The best score possible is to get a Yahtzee. It requires all of your dice to " print "be the same, such as having 5 sixes." print "It is very difficult to get, and you get 50 points if you can get one." print "A Yahtzee is the only scoring possibility that you are allowed to use more than once." print "" print "If you want more help, say yes when you are asked later on if you want help." print "" input "Press Enter to continue.";enter17 goto [RollDice]