Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.35 KB | None | 0 0
  1. Module Module1
  2.  
  3. Dim Creatures() As String = {"goblin", "man", "orc", "elf", "creature", "being", "troll", "giant", "bandit", "archer", "swordsman", "ranger", "trekker", "wanderer", "wizard", "adventurer",
  4. "entity", "ghost", "skeleton", "zombie", "spirit", "protegent 360 antivirus software", "demigod", "vampire", "warper", "dragon", "snake", "spider", "beast", "sorcerer", "ant", "B O I"}
  5.  
  6. Dim CreaturesDesc() As String = {"small", "large", "slim", "slimy", "long", "bored-looking", "tired-looking", "colourful", "shiny", "angry", "furious", "ravenous", "insane", "injured", "proud-looking", "strong",
  7. "powerful", "muscular", "incredible", "impressive", "dangerous", "weird-looking", "strange", "shadowy", "shifty", "ridiculous-looking", "crazed", "long-armed", "long-legged", "sickly",
  8. "diseased", "yucky", "vile", "exuberant", "alert", "dirty", "filthy", "depressed", "sophisticated", "suspicious", "confused-looking", "boistrous", "devious", "super"}
  9.  
  10. Function RandomItem(ByVal succarray As Array)
  11. Return succarray(Math.Floor(Rnd() * succarray.Length))
  12. End Function
  13.  
  14. Sub Engagements(ByVal WinChance As Decimal, ByVal FleeChance As Decimal)
  15. Console.WriteLine("What will you do? Fight (1) or flee (2)?")
  16.  
  17. Dim RandomDeathCombatStart() As String = {"How unfortunate!", "Uh Oh!", "Oops!", "Oh dear!", "How could this happen?", "What bad luck!", "How unfair!", "What a cruel twist of fate!", "Luck was not on your side.",
  18. "Fate was not kind to you.", "Looks like you werent skilled enough!", "What a cruel end!", "What an unlucky end!", "Your efforts were in vain!"}
  19.  
  20. Dim RandomKillCombatEnd() As String = {"Wow!", "Amazing!", "Incredible!", "Stunning!", "What a fight!", "What a battle!", "That was intense!", "That was insane!", "What a display of skill!", "What a display of power!",
  21. "How did you do that!?", "Simply epic!", "Awesome work!", "Unbelievable!"}
  22.  
  23. Dim RandomDeathCombat() As String = {RandomItem(RandomDeathCombatStart) & " Your efforts were in vain - your opponent has struck a killing blow!", RandomItem(RandomDeathCombatStart) &
  24. " Your enemy dashes around much faster than you can see and swiftly executes you!", RandomItem(RandomDeathCombatStart) & " Your foe punches dirctly through your heart.",
  25. RandomItem(RandomDeathCombatStart) & " The enemy beats you to the ground and rips your head off.", RandomItem(RandomDeathCombatStart) & " The enemy kills you in a single hit.",
  26. RandomItem(RandomDeathCombatStart) & " The foe defeats you with the agility of a " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & " and the power of a " & (RandomItem(CreaturesDesc)) & (RandomItem(Creatures)) & "!",
  27. RandomItem(RandomDeathCombatStart) & " The foe defeats you as if it were a " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & "."}
  28. Dim userweapon As String
  29. Dim RandomKillCombat() As String = {RandomItem(RandomKillCombatEnd) & " You shred the enemy with brutal speed and efficiency with your " & userweapon & ".",
  30. RandomItem(RandomKillCombatEnd) & " You rip the enemy to pieces in a split second with only a single blow from your " & userweapon & ".",
  31. RandomItem(RandomKillCombatEnd) & " You use a spell to teleport behind the enemy and then thrust your " & userweapon & " into it, ending its life.",
  32. RandomItem(RandomKillCombatEnd) & " You distract the foe with a hologram spell before decapitating it with a swift strike.",
  33. RandomItem(RandomKillCombatEnd) & " You kill it with the speed of a " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & " and the power of a " & " " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & ".",
  34. RandomItem(RandomKillCombatEnd) & " You annihilate its useless defence with an overpowering blow, leaving it dead on the ground.",
  35. RandomItem(RandomKillCombatEnd) & " Using the spirit of the " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & ", you obliterate its molecular structure in a single hit.",
  36. RandomItem(RandomKillCombatEnd) & " You think back to the times when you trained with the " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & ". Newly imbued with power, you send the enemy straight to the eternal void.",
  37. RandomItem(RandomKillCombatEnd) & " Your master, the " & (RandomItem(CreaturesDesc)) & " " & (RandomItem(Creatures)) & ", taught you exactly what to do in this situatuon. You erase the enemys puny existance with a magic empowered critical strike."}
  38.  
  39. Dim userinput = Console.ReadLine
  40. If userinput = "1" Then
  41. If Rnd() < WinChance Then
  42. Console.WriteLine(RandomItem(RandomKillCombat))
  43. Console.ReadLine()
  44. End
  45. Else
  46. Console.WriteLine(RandomItem(RandomDeathCombat))
  47. GameOver()
  48. End If
  49. ElseIf userinput = "2" Then
  50. If Rnd() < FleeChance Then
  51. Console.WriteLine("You left successfully.")
  52. Else
  53. Console.WriteLine("You can not outrun your foe.")
  54. GameOver()
  55. End If
  56. End If
  57. End Sub
  58.  
  59. Sub GameOver()
  60. Console.ForegroundColor = ConsoleColor.Red
  61. Console.WriteLine("YOU ARE DEAD")
  62. Console.ReadLine()
  63. End
  64. End Sub
  65.  
  66. Sub Main()
  67.  
  68. Randomize()
  69.  
  70. Dim RandomDeath() As String = {"You trip on a small stick and break your neck in a comical fashion.",
  71. "You take one step and die from the cancer you never knew you had.",
  72. "Unfortunately, you are ambushed and assasinated by ninja bandits.",
  73. "Unfortunately, you anger a level 999 wizard who strikes you down with a wicked spell.",
  74. "Unfortunately, you anger a paticularly irate creature which ravenously tears you to shreds without giving you a chance.",
  75. "What a twiste of fate! You stumble upon a flesh-eating ants nest. They swarm and consume in only a moment.",
  76. "Oh Dear! You find out you have a fatal fruit allergy by eating some off a nearby tree.",
  77. "Oops! You accidently step on a magical spell, set up to kill adventurers that incinerates you in an instant.",
  78. "H E H A S C O M E .",
  79. "I T S H I M ."}
  80.  
  81. Dim Words() As String = {"putrid", "disgusting", "revolting", "assualting", "horrible", "violating", "sickening", "toxic", "repulsive"}
  82. Dim Followup() As String = {" scent attacks your senses.",
  83. " scent assaults your senses.",
  84. " smell violates your nose.",
  85. " armoa wafts around the air.",
  86. " scent hangs in the air.",
  87. " aroma hangs in the air.",
  88. " scent makes the air thicc.",
  89. " stench makes the air thicc.",
  90. " stench hangs in the air.",
  91. " stench insults your very being.",
  92. " aroma insults your very being."}
  93.  
  94. Dim EncounterANGRY() As String = {"It lunges at you and you just barely evade it.", "It starts yelling as loud as it can.", "It looks primed and ready to fight...", "It assumes a fighting stance.",
  95. "It stares at you with fierce eyes...", "The look it gives you tells you its not mucking about.", "Seems like this could be bad...", "Seems like a fight is ahead of you..."}
  96.  
  97. Dim EncounterFRIENDLY() As String = {"It simply wishes you well on your journey.", "It gives you a friendly nod of greeting", "Wow its cheering and shouting encouragement about how well you are doing.",
  98. "It offers a bowl of food to you. You take it and store it for your journey.", "It asks if you would like to sit by its fire with it. You politely decline and carry on your way.",
  99. "It gives you a friendly wave! How nice!", "Its initially startled by your appearance but quickly realises what you are and flashes you a smile.", "It says hey and passes by you"}
  100.  
  101. Dim EncounterCALM() As String = {"You approach. It doesnt even look up at you...", "It silently passes you...", "It produces no sound at all as it passes by...", "Its eerie nature is visible even from a great distance...",
  102. "You feel a chill pass down your spine as you pass it...", "It observes you silently as you pass...", "It watches you from above as you pass beneath it...", "It just watches...",
  103. "It freezes completely as you approach. Perfectly motionless...", "It creepily chuckles to itself as you walk by...", "It spookily whispers to itself as you pass by..."}
  104.  
  105. Dim Weapon() As String = {"Sword", "Flail", "Crossbow", "Dagger", "Stick", "Claymore", "Halberd", "Katana", "Longsword", "Bow", "Spear", "Scimitar", "War Hammer", "Greatsword", "lance", "Mace", "Glaive", "Pike",
  106. "Protegent 360 antivirus"}
  107.  
  108. Dim EncounterDEAD() As String = {"Most certainly dead. Looks like it was killed by a " & RandomItem(Weapon), "Totally pale and lifeless. You pray whatever killed it isnt still around...",
  109. "Killed by a " & RandomItem(Weapon) & ". Brutal", "Drained of all its blood. You hope never to see the thing that did this...", "Looks like it was killed by a " & RandomItem(Weapon),
  110. "Looks like a " & RandomItem(Weapon) & " killed it. Thank god. You didnt want to deal with it...", "Could have been a" & RandomItem(Weapon) & "? But it also could have been a " & RandomItem(Weapon) & "...",
  111. "A " & RandomItem(Weapon) & "? A " & RandomItem(Weapon) & "? No must have been a " & RandomItem(Weapon)}
  112.  
  113. ' Dim Health As Integer = 10
  114. ' Dim Shield As Integer = 0
  115. ' Dim Attack As Integer = 2
  116.  
  117. Console.WriteLine("Please input your name:")
  118. Dim username As String = Console.ReadLine
  119.  
  120.  
  121. Dim Class1 As String = UCase(RandomItem(Creatures))
  122. Dim Class2 As String = UCase(RandomItem(Creatures))
  123. Dim Class3 As String = UCase(RandomItem(Creatures))
  124.  
  125. Console.ReadLine()
  126. Console.WriteLine("Pick your class: ")
  127. Console.WriteLine(Class1 & " ---> +5 to Attack, -3 to health (1)")
  128. Console.WriteLine(Class2 & " ---> +2 to Attack, -1 to health (2)")
  129. Console.WriteLine(Class3 & " ---> No Change (3)")
  130.  
  131. Dim userinput = Console.ReadLine
  132. Dim userclass As String
  133. If userinput = "1" Then
  134. userclass = Class1
  135. ' Health = 8
  136. ' Attack = 12
  137. ElseIf userinput = "2" Then
  138. userclass = Class2
  139. ' Attack =
  140. ElseIf userinput = "3" Then
  141. userclass = Class3
  142. End If
  143.  
  144. Dim weapon1 As String = UCase(RandomItem(Weapon))
  145. Dim weapon2 As String = UCase(RandomItem(Weapon))
  146. Dim weapon3 As String = UCase(RandomItem(Weapon))
  147.  
  148. Console.WriteLine("Choose your weapon: " & UCase(weapon1) & "(1), " & UCase(weapon2) & "(2), " & UCase(weapon3) & "(3)")
  149.  
  150. userinput = Console.ReadLine
  151. Dim userweapon As String
  152. If userinput = "1" Then
  153. userweapon = weapon1
  154. ElseIf userinput = "2" Then
  155. userweapon = weapon2
  156. ElseIf userinput = "3" Then
  157. userweapon = weapon3
  158. End If
  159.  
  160. Console.WriteLine("YOU ARE: ")
  161. Console.ForegroundColor = ConsoleColor.Yellow
  162. Console.WriteLine((UCase(username) & ", THE " & UCase(RandomItem(CreaturesDesc)) & " " & userclass & " WITH A " & UCase(userweapon)))
  163. Console.ForegroundColor = ConsoleColor.Gray
  164. Console.ReadLine()
  165.  
  166. Console.WriteLine("You are in the middle of nowhere. Which way would you like to go? Forward(1), Back(2), Left(3) or Right(4)?")
  167.  
  168. userinput = Console.ReadLine
  169.  
  170. If userinput = "1" Then
  171.  
  172. If Rnd() < 0.9 Then
  173.  
  174. Dim Random = Rnd()
  175. Dim Creature1 As String = RandomItem(Creatures)
  176. Dim Creature2 As String = RandomItem(Creatures)
  177. Dim Creature3 As String = RandomItem(Creatures)
  178.  
  179. Console.WriteLine("You arrive in a swamp. The " & RandomItem(Words) & RandomItem(Followup))
  180. If Random > 0.9 Then
  181. Console.WriteLine("In front of you is a " & Creature1)
  182. ElseIf Random > 0.7 Then
  183. Console.WriteLine("In front of you is a " & RandomItem(CreaturesDesc) & " " & Creature1)
  184. ElseIf Random > 0.3 Then
  185. Console.WriteLine("In front of you is a " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & Creature1)
  186. Else
  187. Console.WriteLine("In front of you is a " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & Creature1)
  188. End If
  189.  
  190. Dim Random1 = Rnd()
  191.  
  192. If Random1 > 0.9 Then
  193. Console.WriteLine("To your left is a " & Creature2)
  194. ElseIf Random1 > 0.7 Then
  195. Console.WriteLine("To your left is a " & RandomItem(CreaturesDesc) & " " & Creature2)
  196. ElseIf Random1 > 0.3 Then
  197. Console.WriteLine("To your left is a " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & Creature2)
  198. Else
  199. Console.WriteLine("To your left is a " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & Creature2)
  200. End If
  201.  
  202. Dim Random2 = Rnd()
  203.  
  204. If Random2 > 0.9 Then
  205. Console.WriteLine("To your right is a " & Creature3)
  206. ElseIf Random2 > 0.7 Then
  207. Console.WriteLine("To your right is a " & RandomItem(CreaturesDesc) & " " & Creature3)
  208. ElseIf Random2 > 0.3 Then
  209. Console.WriteLine("To your right is a " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & Creature3)
  210. Else
  211. Console.WriteLine("To your left is a " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & RandomItem(CreaturesDesc) & " " & Creature3)
  212. End If
  213. Console.WriteLine("Which way would you like to go? Forward(1), Left(2) or Right(3)?")
  214.  
  215. Else
  216. Console.ForegroundColor = ConsoleColor.Red
  217. Console.WriteLine(RandomItem(RandomDeath) & " YOU ARE DEAD.")
  218. Console.ReadLine()
  219. End
  220.  
  221. End If
  222. '-------------------------------------------------------------------------------------------------------------ROUTE 1
  223.  
  224. userinput = Console.ReadLine
  225. If userinput = "1" Or userinput = "2" Or userinput = "3" Then
  226. Dim Creature1 As String
  227. Dim RandomChar = Rnd()
  228.  
  229. If RandomChar < 0.25 Then
  230. Console.WriteLine("The " & Creature1 & " is aggressive!" & " " & RandomItem(EncounterANGRY)) 'ANGERY BOI
  231. Engagements(0.5, 0.5)
  232.  
  233. ElseIf RandomChar < 0.5 Then
  234. Console.WriteLine("Its very friendly." & " " & RandomItem(EncounterFRIENDLY)) 'FRIENDLY BOI
  235. Engagements(0.6, 1)
  236.  
  237. ElseIf RandomChar < 0.75 Then
  238. Console.WriteLine("Its strangely unphased by your prescence." & " " & RandomItem(EncounterCALM)) 'CALM BOI
  239. Engagements(0.7, 1)
  240.  
  241.  
  242. Else
  243. Console.WriteLine("Upon closer inspection, it seems to be dead." & " " & RandomItem(EncounterDEAD)) 'DEAD BOI
  244. Console.WriteLine("What will you do? Loot(1) or Leave(2)?")
  245. End If
  246. End If
  247.  
  248. userinput = Console.ReadLine
  249. If userinput = "1" Then
  250.  
  251. If Rnd() < 0.75 Then
  252. Console.ForegroundColor = ConsoleColor.Yellow
  253. Console.WriteLine("You looted a " & RandomItem(Weapon) & " from the body.")
  254. Console.ForegroundColor = ConsoleColor.Gray
  255. Console.WriteLine("The dead body is making you uneasy...You should leave(1)...")
  256.  
  257. Else
  258.  
  259. Console.WriteLine("You approach the body to loot but it looks like it still has some life in it yet!")
  260. Engagements(0.7, 0.8)
  261. End If
  262. End If
  263.  
  264.  
  265. ElseIf userinput = "2" Then 'OTHER OPTIONS
  266.  
  267. Console.WriteLine("You arrive in a run down town")
  268.  
  269. ElseIf userinput = "3" Then
  270.  
  271. Console.WriteLine("You arrive in a shadowy forest")
  272.  
  273. ElseIf userinput = "4" Then
  274.  
  275. Console.WriteLine("You arrive at a ruined castle")
  276.  
  277. Else
  278.  
  279. Console.WriteLine("Please enter a valid input")
  280.  
  281. End If
  282.  
  283. Console.ReadLine()
  284.  
  285. End Sub
  286.  
  287. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement