Guest User

Dungeon Quest (Microsoft Smallbasic)

a guest
May 21st, 2020
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.26 KB | None | 0 0
  1. start:
  2. TextWindow.Clear()
  3. TextWindow.Title = ("Dungeon Quest")
  4. TextWindow.ForegroundColor = "white"
  5. TextWindow.WriteLine("Dungeon Quest")
  6. havekey = 0
  7. TextWindow.WriteLine("While walking through the woods, you stumble across a strange door in a rock face.")
  8. TextWindow.WriteLine("What do you do? 1-Leave it alone 2-Enter")
  9. response1 = TextWindow.ReadNumber()
  10. If (response1 = 1) Then
  11. TextWindow.WriteLine("You continue along on your journey. A very boring adventure if you ask me...")
  12. TextWindow.WriteLine("Would you like to play again? 1-Play Again 2-Exit")
  13. response2 = TextWindow.ReadNumber()
  14. If (response2 = 1) Then
  15. Goto start
  16. Else
  17. Program.End()
  18. EndIf
  19.  
  20. Else
  21. doors:
  22. TextWindow.WriteLine("You enter a dimly lit room with two doors.")
  23. TextWindow.WriteLine("Which door do you enter? 1-Left Door 2-Right Door")
  24. response3 = TextWindow.ReadNumber()
  25. If (response3 = 1) Then
  26. TextWindow.WriteLine("You enter into a large room with a grand chest on the far wall, and a chained prisoner on the right.")
  27. TextWindow.WriteLine("The prisoner is gagged, but seems to be trying to tell you something.")
  28. TextWindow.WriteLine("What do you do? 1-Open Chest 2-Free Prisoner")
  29. response4 = TextWindow.ReadNumber()
  30. If (response4 = 1) Then
  31. TextWindow.WriteLine("You quickly rush across the room and open the chest.")
  32. TextWindow.WriteLine("You only have a second to notice the crossbow in the chest before an arrow flys into you.")
  33. TextWindow.WriteLine("Would you like to play again? 1-Play Again 2-Exit")
  34. response5 = TextWindow.ReadNumber()
  35. If (response5 = 1) Then
  36. Goto start
  37. Else
  38. Program.End()
  39. EndIf
  40. Else
  41. TextWindow.WriteLine("You free the prisoner and untie him.")
  42. TextWindow.WriteLine("He thanks you and informs you that the chest was a trap. He then quickly runs out of the dungeon.")
  43. TextWindow.WriteLine("Dissappointed but relieved, you walk quickly out of the room.")
  44. Goto doors
  45. EndIf
  46. Else
  47. cyclops:
  48. TextWindow.WriteLine("You enter into a narrow hallway with a cyclops guarding the only other door.")
  49. TextWindow.WriteLine("There is a large chandelier hanging on the ceiling, and a rope tied to the wall next to you.")
  50. TextWindow.WriteLine("What do you do? 1-Charge Cyclops 2-Cut Rope")
  51. response6 = TextWindow.ReadNumber()
  52. If (response6 = 1) Then
  53. TextWindow.WriteLine("You charge bravely at the cyclops, who then casually crushes you with his club.")
  54. TextWindow.WriteLine("Would you like to play again? 1-Play Again 2-Exit")
  55. response7 = TextWindow.ReadNumber()
  56. If (response7 = 1) Then
  57. Goto cyclops
  58. Else
  59. Program.End()
  60. EndIf
  61. Else
  62. TextWindow.WriteLine("You quickly cut the rope.")
  63. TextWindow.WriteLine("Just before the cyclops charges at you, the chandelier falls down and crushes him.")
  64. TextWindow.WriteLine("With the door now unguarded, you cautiously enter the strange door.")
  65. hall:
  66. TextWindow.WriteLine("You enter into a grand hall with three doors. An old hag greets you.")
  67. TextWindow.WriteLine("What do you do? 1-Enter First Door 2-Enter Second Door 3-Enter Third Door 4-Try to Rob the Old Hag.")
  68. response8 = TextWindow.ReadNumber()
  69. EndIf
  70. If (response8 = 1) Then
  71. fountain:
  72. TextWindow.WriteLine("You enter into a small room with a fountain in it.")
  73. TextWindow.WriteLine("What do you do? 1-Drink 2-Go Back to the Hall.")
  74. response9 = TextWindow.ReadNumber()
  75. If (response9 = 1) Then
  76. TextWindow.Write("What a refreshing drink! ")
  77. Goto fountain
  78. Else
  79. Goto hall
  80. EndIf
  81. Else
  82. If (response8 = 2) Then
  83. corridor:
  84. TextWindow.WriteLine("You enter into a long corridor.")
  85. TextWindow.WriteLine("There are two doors at the end of the corridor.")
  86. TextWindow.WriteLine("What do you do? 1-Go Back 2-Enter Left Door 3-Enter Right Door")
  87. response12 = TextWindow.ReadNumber()
  88. If (response12 = 1) Then
  89. Goto hall
  90. Else
  91. If (response12 = 2) Then
  92. TextWindow.WriteLine("You enter into a small room with crossbows lined up along the walls.")
  93. TextWindow.WriteLine("As you move closer to investigate, you hear a sharp *click*")
  94. TextWindow.WriteLine("You have only a moment to realize that you stepped on a pressure plate before you are hit with a dozen arrows.")
  95. TextWindow.WriteLine("Would you like to play again? 1-Play Again 2-Exit")
  96. response13 = TextWindow.ReadNumber()
  97. If (response13 = 1) Then
  98. Goto corridor
  99. Else
  100. Program.End()
  101. EndIf
  102. Else
  103. If (response12 = 3) Then
  104. tresureroom:
  105. TextWindow.WriteLine("You find yourself in a well-lit, well-decorated room.")
  106. TextWindow.WriteLine("At the end of the room, you find an ogre guarding a golden door.")
  107. TextWindow.WriteLine("What do you do? 1-Go Back 2-Fight Ogre")
  108. response14 = TextWindow.ReadNumber()
  109. If (response14 = 1) Then
  110. Goto corridor
  111. Else
  112. TextWindow.WriteLine("You take out your sword and begin to fight the ogre.")
  113. TextWindow.WriteLine("You quickly realize that you cannot physically overpower him, and he throws you on the ground.")
  114. TextWindow.WriteLine("Just before the ogre cleaves you in two with his axe, you reach for a nearby torch and crack him over the head with it.")
  115. TextWindow.WriteLine("The ogre falls to the ground, and appears to be unconscious.")
  116. TextWindow.WriteLine("You quickly rush towards the door.")
  117. TextWindow.WriteLine("What do you do? 1-Open Door 2-Go Back")
  118. response16 =TextWindow.ReadNumber()
  119. If (response16 = 1) Then
  120. If (havekey = 1) Then
  121. TextWindow.WriteLine("You eagerly reach for the key in your pocket and stick it into the door.")
  122. TextWindow.WriteLine("When you enter the room, you find a grand golden treasure chest.")
  123. TextWindow.WriteLine("Cautiously you open the chest...")
  124. TextWindow.WriteLine("Inside the chest is a mountain of gold coins.")
  125. TextWindow.WriteLine("You immediately stuff the contents of the chest into your bag, and run out of the dungeon as quickly as you can.")
  126. TextWindow.WriteLine("Congratulations, YOU WIN!")
  127. TextWindow.WriteLine("Would you like to play again? 1-Play Again 2-Exit")
  128. response15 = TextWindow.ReadNumber()
  129. If (response15 = 1) Then
  130. Goto start
  131. Else
  132. Program.End()
  133. EndIf
  134. Else
  135. If (havekey = 0) Then
  136. TextWindow.WriteLine("This door appears to need a key.")
  137. TextWindow.WriteLine("Fearful that the ogre might wake up, you run out of the room to retrace your steps.")
  138. Goto corridor
  139. EndIf
  140. EndIf
  141. Else
  142. Goto corridor
  143. EndIf
  144. EndIf
  145. EndIf
  146. EndIf
  147. EndIf
  148. Else
  149. If (response8 = 3) Then
  150. TextWindow.WriteLine("You find yourself inside of a small, empty room.")
  151. TextWindow.WriteLine("There appear to be a few small, strange-looking rocks in the corner.")
  152. TextWindow.WriteLine("What do you do? 1-Leave Room 2-Investigate Rocks")
  153. response11 = TextWindow.ReadNumber()
  154. If (response11 = 1) Then
  155. Goto hall
  156. Else
  157. TextWindow.WriteLine("Upon futher investigation of these strange rocks, you find that they are loose.")
  158. TextWindow.WriteLine("You pull away the rocks, and under the rocks is a small bag.")
  159. TextWindow.WriteLine("You cautiously open the bag to find a small gold key.")
  160. TextWindow.WriteLine("Seeing that there is nothing of value left in the room, you go back to the hall.")
  161. havekey = 1
  162. Goto hall
  163. EndIf
  164. Else
  165. If (response8 = 4) Then
  166. TextWindow.WriteLine("Seeing that you are trying to rob her, the old hag throws a strange powder in your face.")
  167. TextWindow.WriteLine("You immediately fall asleep. When you awake, you find yourself outside the dungeon.")
  168. TextWindow.WriteLine("Looking around you, you see that the door has disappeared; as has all the gold in your purse.")
  169. TextWindow.WriteLine("Would you like to play again? 1-Play Again 2-Exit")
  170. response10 = TextWindow.ReadNumber()
  171. If (response10 = 1) Then
  172. Goto hall
  173. Else
  174. Program.End()
  175. EndIf
  176. EndIf
  177. EndIf
  178. EndIf
  179. EndIf
  180. EndIf
  181. EndIf
Advertisement
Add Comment
Please, Sign In to add comment