'ThyDungeonman! in QB64!!! 'Original game by Homestarrunner 'Kludged conversion to QB64 by Goob '2021!! 'V1.0 - It finally is playable! WITH END STATES!!!! 7/31/2021 SCREEN 0 Start: CLS text$ = "" CurrentRoom% = 0 FlaskCounter% = 0 ScrollCounter% = 0 TrinketGet% = 0 score% = 0 enter$ = "" 'CurrentRoom Values ' 0 = Start of Game ' 1 = Main Dungeon Room ' 2 = North of Main Dungeon Room ' 3 = South of Main Dungeon Room ' 4 = Dennis PRINT "THY DUNGEONMAN" PRINT "Press Enter to, uhh, Enter the Dungeon" PRINT "(Also turn on Caps Lock. I am bad at programming lol)" INPUT enter$ CLS PRINT "YOU ARE THY DUNGEONMAN!" PRINT " " GOTO MainDungeonRoom 'Takes player commands as text. text$ is the action and text2$ is the object (if specified) 'Yes its really dumb to type them with commas instead of spaces but I am a bad programmer okay? TextInputter: INPUT text$, text2$ GOTO textsort MainDungeonRoom: CurrentRoom% = 1 PRINT "Ye find yeself in yon dungeon. Ye see a SCROLL. Behind ye scroll is a FLASK." PRINT "Obvious exits are NORTH, SOUTH, and DENNIS." IF ScrollCounter% > 2 THEN PRINT "There is definitely no YE SCROLL, so drop it." END IF GOTO TextInputter NorthDungeonRoom: CurrentRoom% = 2 PRINT "You arrive at parapets. Ye see a ROPE. Obvious exits are SOUTH." GOTO TextInputter SouthDungeonRoom: CurrentRoom% = 3 PRINT "Anyway, ye spies a TRINKET. Obvious exits are NORTH." GOTO TextInputter Dennis: CurrentRoom% = 4 PRINT "Ye arrive at Dennis. He wears a sporty frock coat and long jimberjam." PRINT "He paces about nervously. Obvious exits are NOT DENNIS." GOTO TextInputter Winner: PRINT "A novel idea! You givst the TRINKET to Dennis and he happily agrees to tell you " PRINT "what parapets are. With this new knowledge, ye escapes from yon dungeon in order" PRINT "to search for new dungeons and to remain... THY DUNGEONMAN!!" PRINT "You hath won! Congraturation!!" PRINT "Your score was: "; score% PRINT "Play Again? " INPUT enter$ CLS FlaskCounter% = 0 ScrollCounter% = 0 TrinketGet% = 0 score% = 0 GOTO MainDungeonRoom 'Sorts inputted text textsort: 'GO IF text$ = "GO" THEN IF text2$ = "NORTH" THEN IF CurrentRoom% = 1 THEN PRINT "You go NORTH through yon corridor." GOTO NorthDungeonRoom END IF IF CurrentRoom% = 3 THEN GOTO MainDungeonRoom END IF END IF IF text2$ = "SOUTH" THEN IF CurrentRoom% = 1 THEN PRINT "You head south to an enbankment. Or maybe a chasm. You can't decide which." GOTO SouthDungeonRoom END IF IF CurrentRoom% = 2 THEN GOTO MainDungeonRoom END IF END IF IF text2$ = "DENNIS" THEN IF CurrentRoom% = 1 THEN GOTO Dennis END IF END IF END IF 'escape from Dennis IF text$ = "NOT" THEN IF text2$ = "DENNIS" THEN IF CurrentRoom% = 4 THEN GOTO MainDungeonRoom END IF END IF END IF 'look IF text$ = "LOOK" THEN IF text2$ = "SCROLL" THEN IF CurrentRoom% = 1 THEN IF ScrollCounter% = 0 THEN PRINT "Parchment, definitely parchment. I'd recognize it anywhere." GOTO TextInputter END IF IF ScrollCounter% > 0 THEN PRINT "Ye seeth nothing wheretofore it went ZAP." GOTO TextInputter END IF END IF PRINT "It looketh really awesome." GOTO TextInputter END IF IF text2$ = "FLASK" THEN IF CurrentRoom% = 1 THEN PRINT "Looks like you could quaff some serious mead out of that thing" GOTO TextInputter END IF PRINT "It looketh really awesome." GOTO TextInputter END IF IF text2$ = "PARAPETS" THEN IF CurrentRoom% = 2 THEN PRINT "Well, they're parapets. This much we know for sure." GOTO TextInputter END IF PRINT "It looketh pretty awesome." GOTO TextInputter END IF IF text2$ = "ROPE" THEN IF CurrentRoom% = 2 THEN PRINT "It looks okay. You've seen better." GOTO TextInputter END IF PRINT "It looketh pretty awesome." GOTO TextInputter END IF IF text2$ = "TRINKET" THEN IF CurrentRoom% = 3 THEN IF TrinketGet% = 0 THEN PRINT "Quit Looking! Just get it already!" GOTO TextInputter END IF PRINT "Just a bulge in thou pouchel at thist point." GOTO TextInputter END IF END IF IF text2$ = "DENNIS" THEN IF CurrentRoom% = 4 THEN PRINT "That jimberjam really makes the outfit." GOTO TextInputter END IF END IF IF text2$ = "JIMBERJAM" THEN IF CurrentRoom% = 4 THEN PRINT "Man, that art a nice jimberjam." GOTO TextInputter END IF END IF PRINT "What is thou'st lookingth at?" GOTO lookswitch END IF 'give command IF text$ = "GIVE" THEN IF text2$ = "TRINKET" THEN IF CurrentRoom% = 4 THEN IF TrinketGet% = 0 THEN PRINT "Thou don'tst have a trinket to give. Go back to your tiny life." GOTO TextInputter END IF IF TrinketGet% > 0 THEN GOTO Winner END IF END IF END IF PRINT "What sort of gameth are thee playing?!" GOTO TextInputter END IF 'get command IF text$ = "GET" THEN IF text2$ = "DAGGER" THEN PRINT "Yeah, okay." score% = score% + 25 GOTO TextInputter END IF IF text2$ = "ROPE" THEN IF CurrentRoom% = 2 THEN PRINT "you attempt to take ye ROPE but alas it is enchanted!" PRINT "It glows a mustard red and smells like a public privy." PRINT "The ROPE wraps around your neck and hangs you from parapets." PRINT "With your last breath, you wonder want parapets are." PRINT "GAME OVER: Your score was "; score%; "Play again?" INPUT enter$ GOTO Start END IF END IF IF text2$ = "SCROLL" THEN IF ScrollCounter% = 0 THEN ScrollCounter% = 1 PRINT "Ye takes the scroll and reads of it. It doth say: " PRINT "BEWARE, READER OF THE SCROLL, DANGER AWAITS TO THE -" PRINT "THe SCROLL disappears in thy hands with ye olde ZAP!" score% = score% + 2 GOTO TextInputter END IF PRINT "Ye doth suffer from memory loss. YE SCROLL is no more. Honestly." ScrollCounter% = ScrollCounter% + 1 score% = score% - 1 GOTO TextInputter END IF IF text2$ = "FLASK" THEN IF CurrentRoom% = 1 THEN IF FlaskCounter% < 2 THEN FlaskCounter% = FlaskCounter% + 1 PRINT "Ye cannot get the FLASK." PRINT "It is firmly bolted to a wall which is bolted to the rest of the dungeon which " PRINT "is probably bolted to a castle. Never you mind." score% = score% + 1 GOTO TextInputter END IF PRINT "Okay, okay. You unbolt yon FLASK and hold it aloft." PRINT "A great shaking begins. The dungeon ceiling collapses down on you, crushing you in twain." PRINT "Apparently, this was a load-bearing FLASK." PRINT "Your score was:"; score%; "Play again?" score% = score% - 1000 INPUT enter$ GOTO Start END IF END IF IF text2$ = "TRINKET" THEN IF CurrentRoom% = 3 THEN IF TrinketGet% = 0 THEN TrinketGet% = TrinketGet% + 1 PRINT "Ye getsts yon TRINKET and discover it to be a bauble." PRINT "You rejoice at your good fortune. You shove the TRINKET " PRINT "in your pouchel. It kinda hurts." score% = score% + 2 GOTO TextInputter END IF IF TrinketGet% > 0 THEN PRINT "Sigh. The trinket is in thou pouchel. Recallest thou?" score% = score% - 1 GOTO TextInputter END IF END IF END IF PRINT "Thou cannotsts get that. Quit making stuffeth up!" END IF 'help IF text$ = "HELP" THEN PRINT "Please separate command words with a comma instead of a space (ex: SMELL,DAN)" PRINT "Press anyth key to continuest." INPUT enter$ GOTO lookswitch END IF 'Joke commands IF text$ = "DAN" THEN PRINT "Blast 'em up, Dan!" GOTO TextInputter END IF IF text$ = "DANCE" THEN PRINT "Thou shaketh it a litttle, and it feeleth all right." GOTO TextInputter END IF IF text$ = "DIE" THEN score% = score% - 100 PRINT "That wasn't very smart. Your score was "; score%; "Play again?" INPUT enter$ GOTO Start END IF IF text$ = "SMELL" THEN IF text2$ = "DAN" THEN PRINT "Dan's smelling fine!" GOTO TextInputter END IF PRINT " You smell a Wumpus." GOTO TextInputter END IF IF text$ = "SNIFF" THEN PRINT " You smell a Wumpus." GOTO TextInputter END IF IF text$ = "TALK" THEN IF text2$ = "DENNIS" THEN IF CurrentRoom% = 4 THEN PRINT "You engage Dennis in leisurely disucssion." PRINT "Ye learns that his jimberjam was purchased on sale at a discount market " PRINT "and that he enjoyes pacing about nervously. You become bored and begin " PRINT "thinking about parapets." GOTO TextInputter END IF END IF PRINT "Who is that? Your new boyfriend? Somebody from work you don't want me to meeteth?" GOTO TextInputter END IF 'If all else fails PRINT "That does not computeth. Type HELP is thou needs of it." GOTO TextInputter 'refreshes current room text lookswitch: IF CurrentRoom% = 1 THEN CLS GOTO MainDungeonRoom END IF