Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module Module1
- Declare Sub Sleep Lib "kernel32.dll" (ByVal Milliseconds As Integer)
- 'Dim NL = VBCr
- Sub Main()
- Dim age As Integer
- Dim name As String
- Dim wish As String
- Dim msg As String
- Console.WriteLine("How old are you?")
- age = Console.ReadLine()
- If age < 13 Then
- Console.WriteLine("Please Exit the game")
- Console.WriteLine("Sorry you have to be 13 or older to play this game.")
- Goodbye("")
- End If
- Console.WriteLine("What is your name?")
- name = Console.ReadLine()
- Console.WriteLine("Hello " + name)
- 'Console.WriteLine("Do you wish to continue?")
- If doAction("Do you wish to continue?", {"Yes", "No"}) = 2 Then Goodbye(name)
- 'Start Game
- wish = doAction("You are asked to visit the Mayor, do you accept his invitation or not?", {"Yes", "no"})
- If wish = 2 Then Console.WriteLine("Your wife manages to convince you to visit the mayor.")
- wish = doAction("You are given a quest to kill the Sea Dragon, do you wish to accept it or not?", {"Yes", "no"})
- If wish = 2 Then Goodbye("You are exiled to the mountain for cowardness.")
- RoadFork(name)
- 'End of Game
- Console.WriteLine("Thanks for playing " + name)
- End Sub
- Private Function RoadFork(name As String)
- Dim wish As String
- wish = doAction("You meet a fork in the fork in the road." & vbCrLf & " Do you go left or right?", {"left", "right"})
- 'LeftRight("You meet a fork in the fork in the road. ")
- If wish = 1 Then ' do left
- ' Console.WriteLine()
- If doAction("You get ambushed by a Horde of Kobolds. What do you do?" & vbCrLf +
- "Run, fight or hide.", {"Run", "Fight", "Hide"}) = 3 Then
- Console.WriteLine("Good choice " + name)
- Console.WriteLine("They walk past without detecting you.")
- Else Goodbye(name)
- End If
- wish = doAction("You are in hiding," & vbCrLf +
- "Do you want to make a run for it now to get away fast Or wait till midday " +
- "when the kobolds have slightly lower stats?", {"now", "run", "wait"})
- If wish = 1 Or wish = 2 Then
- Goodbye("One of the kobolds spots you out of the corner of his eye and cuts your stomach open.")
- ElseIf wish = 3 Then
- Console.WriteLine("Patience is a virtue my friend, You manage to escape the kobolds territory leaving them snarling and hungry.")
- End If
- wish = doAction("You have just escaped a horde of Kobolds," & vbCrLf +
- "Do you wish to continue to the Fjord to kill the Sea Dragon like a soldier " +
- "or return to your village to rejuvenate and save the dragon for tommorow?", {"Rest", "Continue"})
- If wish = 1 Then
- Console.WriteLine("You tell the Mayor of your day and he allows you to rest and deal with the dragon tommorow.")
- Dim a As Integer
- For a = 1 To 5
- Console.Write(".")
- Sleep(1750)
- Next
- Console.WriteLine(". A day has passed")
- RoadFork(name)
- ElseIf wish = 2 Then
- Console.WriteLine("All of this trouble only to get mauled by a sill polar bear, Patience is a virtue fool")
- Goodbye(name)
- End If
- Else
- ' do right
- RightPath(name)
- End If
- End Function
- Private Sub Goodbye(msg As String)
- Console.WriteLine(msg)
- Dead()
- Console.WriteLine("Press <Enter> to quit")
- Console.ReadLine()
- End Sub
- Private Function doAction(msg As String, ByRef choice() As String)
- Dim myoption As String
- Dim wish As String
- Dim count As Integer
- For Each myoption In choice
- Console.Write(myoption + "/ ")
- Next
- Console.WriteLine(vbBack + vbBack + ".")
- count = 0
- Console.WriteLine(msg)
- wish = Left(Console.ReadLine().ToLower.Trim(), 1)
- For Each myoption In choice
- count = count + 1
- 'Console.WriteLine("Your wish is:" & wish & " Option:" & myoption & " count:" & count)
- If wish = Left(myoption.ToLower.Trim(), 1) Then Return count
- Next
- Console.WriteLine("I don't know what " + wish + " means")
- Console.WriteLine("please choose either")
- Return doAction(msg, choice)
- End Function
- Private Function LeftRight(msg As String)
- Console.WriteLine(msg + "Do you go Left or Right?")
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "l" Then Return 1
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "r" Then Return 2
- Console.WriteLine("its a simple choice.")
- Return 0
- End Function
- Private Function RunFightHide()
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "r" Then Return 1
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "f" Then Return 2
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "h" Then Return 3
- End Function
- Private Function NowWait()
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "n" Then Return 1
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "w" Then Return 2
- End Function
- Private Function RestContinue()
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "r" Then Return 1
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "c" Then Return 2
- End Function
- Private Function RightPath(name As String)
- Dim wish As String
- wish = doAction("You arrive at the Fjord", {"Call", "Go"})
- If wish = 1 Then
- wish = doAction("The dragon lunges out of the water", {"Attack", "Run"})
- If wish = 1 Then
- wish = doAction("Choose the weapon you would like to fight the dragon with", {"Crossbow", "Tommohawks", "Flail"})
- If wish = 1 Then
- Goodbye("The arrow fails to penetrate his scales and he melts you with boiling water")
- ElseIf wish = 2 Then
- wish = doAction("You manage to beach the dragon and it is severely injured, do you want to finnish the dragon or wait for it to die?", {"Finnish", "wait"})
- If wish = 1 Then
- Goodbye("The dragon uses its last bit of life to burn you with a blast of boiling water.")
- Else
- Console.WriteLine("Patience is a virtue, you have succesfully defeated the sea dragon")
- Console.WriteLine("The dragon has breathed its last breath, your job is done")
- wish = doAction("Do you take home some of the dragons flesh to show the Mayor or do you run home in victory and maybe get extra reward for your rapid time", {"Flesh", "home"})
- If wish = 1 Then
- Console.WriteLine("The Mayor commends you on your valiance, You are now free to leave the city when you please.")
- Console.WriteLine("Thankyou for playing my game and CONGRATULATIONS!")
- Else
- Console.WriteLine("You need proof")
- wish = doAction("You return to the dragon corpse to see it is being ravished by two gnolls, do you fight them or run away.", {"Fight", "Run"})
- If wish = 1 Then
- Console.WriteLine("You manage to grab and tie up both gnolls in some hemp cloth.")
- wish = doAction("Do you leave them to rot or take them back with the dragon meat", {"Rot", "take"})
- If wish = 1 Then
- Console.WriteLine("They are discovered by other unlawfuls and there is now a bounty on your head")
- wish = doAction("Bounty hunters arrive at your village do you barter with them, Run away, Fight them, or hide from them", {"Barter", "Run", "Fight", "Hide"})
- If wish = 1 Then
- Console.WriteLine("You must give them 105 gold each")
- wish = doAction("Do you give them the money or not", {"Yes", "No"})
- If wish = 1 Then
- Console.WriteLine("They leave you alone but you are now bankrupt, However you are free to leave the city and expand your buisness.")
- Console.WriteLine("You need money and fast.")
- wish = doAction("Do you beg for money or turn to theft.", {"Beg", "Theft"})
- If wish = 1 Then
- Console.WriteLine("A Half Orc wearing a suit suit and tie beats you up and leaves you for dead for being so petty as to beg for money.")
- wish = doAction("Do you scream loudly for help or wait for someone to walk by.", {"Scream", "Wait"})
- If wish = 1 Then
- Goodbye("You attract a pack of wild wolves which feast on your guts, YOU DIE.")
- Else
- Goodbye("No One passes and you eventually freeze to death, YOU DIE.")
- End If
- End If
- End If
- ElseIf wish = 2 Then
- Console.WriteLine("They catch up with you and bring you to the sheriff who locks you up in an underground prison with NO escape.
- ")
- Console.WriteLine("(@@@@@@@@ @@@&.@@@# @@@@@@* @@@@@@% @@@( %@@% @@@@@@@@.
- .@@@% @@@&.@@@# @@@@ @@@@ @@@@ %@@% @@@@ @@@@
- .@@@% @@@&*@@@# @@@@ @@@@ @@@@@%@@% @@@@ @@@@
- .@@@% @@@@@@@@# @@@@@@ @@@@@@* @@@@@@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@ @@@@ @@@(@@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@ @@@@ @@@ @@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@@@& @@@@@@@ @@@ @@@% @@@@@@@@&")
- ElseIf wish = 3 Then
- Console.WriteLine("You are Outnumbered and the work together to bring you to the sheriff who locks you up in an underground prison with NO escape.
- ")
- Console.WriteLine("(@@@@@@@@ @@@&.@@@# @@@@@@* @@@@@@% @@@( %@@% @@@@@@@@.
- .@@@% @@@&.@@@# @@@@ @@@@ @@@@ %@@% @@@@ @@@@
- .@@@% @@@&*@@@# @@@@ @@@@ @@@@@%@@% @@@@ @@@@
- .@@@% @@@@@@@@# @@@@@@ @@@@@@* @@@@@@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@ @@@@ @@@(@@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@ @@@@ @@@ @@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@@@& @@@@@@@ @@@ @@@% @@@@@@@@&")
- Else
- Console.WriteLine("They tear the town up and find you hidden in the toilet of the Tavern, they bring you to the sheriff who locks you up in an underground prison with NO escape.
- ")
- Console.WriteLine("(@@@@@@@@ @@@&.@@@# @@@@@@* @@@@@@% @@@( %@@% @@@@@@@@.
- .@@@% @@@&.@@@# @@@@ @@@@ @@@@ %@@% @@@@ @@@@
- .@@@% @@@&*@@@# @@@@ @@@@ @@@@@%@@% @@@@ @@@@
- .@@@% @@@@@@@@# @@@@@@ @@@@@@* @@@@@@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@ @@@@ @@@(@@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@ @@@@ @@@ @@@@% @@@@ @@@@
- .@@@% @@@&.@@@# @@@@@@& @@@@@@@ @@@ @@@% @@@@@@@@&")
- End If
- Else
- Console.WriteLine("The mayor fines them 650 gold each and lets them go, He gives you 500 gold as well as freedom to leave the city")
- Console.WriteLine("Thankyou for playong my game and CONGRATULATIONS!")
- End If
- Else
- Goodbye("You get lost in the heavy snow and freeze to death.")
- End If
- End If
- End If
- Else
- Goodbye("You got too close to the dragon and it bit off your head, YOU DIE.")
- End If
- ElseIf wish = 2 Then
- Console.WriteLine("You have escaped the dragon.")
- emptyhanded(name)
- End If
- Else
- emptyhanded(name)
- End If
- End Function
- Private Function emptyhanded(name As String)
- Dim wish As String
- wish = doAction("Do you return empty handed or kill another animal and pretend it is the dragon.", {"Return", "Pretend"})
- If wish = 1 Then
- Goodbye("You" + name + "are exiled")
- ElseIf wish = 2 Then
- Console.WriteLine("You need proof")
- wish = doAction("Do you kill the dragon or admit that your lying.", {"Kill", "Admit"})
- If wish = 2 Then
- Goodbye("You ar hung in the town square for lying and dis respecting the Mayor")
- Else
- RightPath(name)
- End If
- End If
- End Function
- Private Function Weapon(name As String)
- End Function
- Private Function EndWait(name As String)
- End Function
- Private Function LieReturn(name As String)
- End Function
- 'Check for yes or no
- Private Function YesNo()
- If Left(Console.ReadLine().ToLower.Trim(), 1) = "y" Then Return 1
- Return 0
- End Function
- Private Function Mayor()
- Console.WriteLine("You are asked to visit the Mayor" +
- "Do you accept his invitation or not?")
- If (YesNo() = 0) Then
- Console.WriteLine("Your wife manages to convince you to visit the mayor.")
- End If
- Console.WriteLine("You are given a quest to kill the Sea Dragon." +
- "Do you wish to accept it or not?")
- Return YesNo()
- End Function
- Private Function Quest()
- Console.WriteLine()
- 'Dim LR As Integer
- 'LR = LeftRight()
- 'While LR = 0
- 'LR = LeftRight()
- 'End While
- 'Console.WriteLine(LR)
- Return 0
- End Function
- Private Function Deadsg()
- Form1.ActiveForm.Show()
- End Function
- Private Sub Dead()
- Console.WriteLine("
- .**/&@@@@@@@@@@@@@%(**,
- .*&%%@@@@@@@@@@@@@@@@@@@@@@@.
- .*&@&*/&@@@@@@@@@@@@@@@@@@@@@@@@&*.
- %@@@@(/(#&@@@@@@@@@@@@@@@@@@@@@@@@%
- (@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@(,
- %@@@@&/*,,,,*(@@@@@@@@@(*,,,,,/&@@@@%*
- %@&/, *%@@@@@@/ /&@%*
- % ,##. *%@@@@@@* ./#, #@%*
- (&%, ,##. .#&@%#%@@( ./#, .%&/,
- (%@@&/*,,, ,(@@%, .#&@(,..,,,/&@@%(
- .*@@@@@%//(&@@@* *#@@&(//%@@@@@*.
- #@@@&**&@@@@@@@/,,,(%@@@@@@@%*%&@@#
- %@%/,.*(.,#%%%%%%%%%%%%%%%/. ,*%@%
- *(@@@#(**##(/,/(,,(##,/(/,(*,#@@@(*
- ,,, *&@@@@#,*#%(*%@**@@@*#&(,,%&@@@%, *#&&%,
- (%@@@#. .*&@@@@@#(*,*/.,///.*/(#&@@@%(.*(@@@(/*
- ///*(&@@%(/. ,//(&@@@@@@@@@@@@@%(/** (@@&(. //,
- .*&@&*. ..... .... .*#@. .%&(
- ,*. .*(%%(*. *((((%%* *#@@@#. *, ,%*
- .*/, ,(, ./&%%%*.*#@@@@%/..*&&%%(... ,(* .(#.
- #, *#, *( #* .,,,, .%%*#* *#* ,%&*
- ,// *#, .*%((%, ,#@@@&*,*&%, *(@@* .(#,
- /%, *%&**%%%%%#,.(*.*#@@@@#*#/#* .,(%%#*#* .(&*
- /@&. *#,. *#/#*#@@@@#*#%%%&*((... ,(&* (/.
- .#&( *(, *%(.%#*%@@@@#*#* *#*## #* (/.
- .#%(. *(, *(*(*#@@@@#*#%%(*(*. #* *(%*
- /%%(*. /(, *#*%#*#@@@@#*#**/. (* *(,
- ,/%, /%(/ *##&%////////%##%* (%@*./**/(/
- ..*%@@@%( ...*#&&&&&/.....,#&&%%%#%%%#%%@@/ .%%(
- ./(((((((((*. ((.
- (%( .(,
- ,/* /%&, #@% *(,
- *#. *@&, ,(/, #@% ,(*
- *#, *@&, #**# #@@( ,(*
- *(*.#* #*.*/, #@@% #*
- *(, %@#, *#%. *#, /&@# (*
- *(, %@(, *#* ,#, #@% #*
- *%/*&@(, *#, ,#* #@&*. ,***%*
- ,(#########/. ,/############,.
- ./,
- ,(@@@&/,/(&@@# /%@@@@@@%,.,,%@@%*,.
- %@@@@@@@@@&*(#/ .######((%@@@@@@@@@@@*
- .%@@@@@@@@@.,(*. /((((((/,(@@@@@@@@@@@(.
- ")
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement