Here it is, my first full text game! It's only a simple little game but it's ok! The "name.bas file is under neath of this one, make sure you compile this one with the name.bas file in the same folder/directory. Have fun!!!
Randomize Timer
'this is the map structure
dim key(6,4)
for a = 1 to 6
for b = 1 to 4
read key(a,b)
next b
next a
data 2,0,0,0 'room 1 or sidewalk
data 3,1,5,0 'room 2 or Lounge
data 0,2,4,0 'room 3 or hallway
data 0,0,0,3 'room 4 or men's room
data 6,0,0,2 'room 5 or game room
data 0,5,0,0 'room 6 or package room
dim as string room(6), pw_input, choice2, choice3
dim as integer z, y, x, w
w = 0
'assigning room names
room(1) = "Side-walk in front of Bruno's."
room(2) = "Lounge area."
room(3) = "Hallway in front of the bathrooms."
room(4) = "Men's room."
room(5) = "Game room."
room(6) = "Package room."
rn = 1 'rn means room number
screen 18
#include "name.bas"
main:
if rn = 1 then gosub room1
main1:
if rn = 6 then gosub room6
if rn = 5 and x = 0 then gosub room5
if rn = 4 then gosub room4
'this is the moving around part of the interaction
cls
locate 9
print player_name; ","
print : print "You are in the "; room(rn)
if key(rn,1) <> 0 then print "There is a door to the north"
if key(rn,2) <> 0 then print "There is a door to the south"
if key(rn,3) <> 0 then print "There is a door to the east"
if key(rn,4) <> 0 then print "There is a door to the west"
print "(type 'exit' to quit the game)"
input "Which direction would you like to go? (n, s, e, w) ", d$
if d$ <> "n" then
if d$ <> "s" then
if d$ <> "e" then
if d$ <> "w" then
if d$ <> "exit" then
gosub bad_input
else
goto wrong_way
end if
end if
end if
end if
end if
wrong_way:
if d$ = "n" then
if key(rn,1) = 0 then
cls
locate 9
print "You can't go that way"
sleep 1000
else
rn = key(rn,1)
end if
end if
if d$ = "s" then
if key(rn,2) = 0 then
cls
locate 9
print "You can't go that way"
sleep 1000
else
rn = key(rn,2)
end if
end if
if d$ = "e" then
if key(rn,3) = 0 then
cls
locate 9
print "You can't go that way"
sleep 1000
else
rn = key(rn,3)
end if
end if
if d$ = "w" then
if key(rn,4) = 0 then
cls
locate 9
print "You can't go that way"
sleep 1000
else
rn = key(rn,4)
end if
end if
if d$ = "exit" then end
if rn > 1 and rn < 6 then goto main
if rn = 1 then gosub room1
goto main1
bad_input:
cls
locate 9
print "error: not a valid entry"
print "please enter n, s, e, w, or exit"
print "press any key to continue"
while inkey$ = "": wend
return
room1:
gosub room1a
if z = 0 then
goto main1
else
cls
print "Congratulations, you have completed your job."
locate 15, 40
print "Thank you for playing Package boy"
print "(press any key to exit)"
while inkey$ = "": wend
end
end if
return
room1a:
if y = 0 then
gosub id_check
end if
return
room6:
gosub package
if rn = 6 then
z = 1
w = 1
end if
return
package:
cls
if w = 1 then
print "You already have the package" : sleep 3000,
else
print "You picked up the package, return it to Sal" : sleep 3000, 1
end if
return
id_check:
cls
print "You walk up to the door to be greeted by the door man" : sleep 1000, 1
print : print "Doorman: 'Do you have I.D.?'" : sleep 2000, 1
if item = 0 then
goto fail1
elseif item = 1 then
print : print "Good thing you grabbed your wallet!" : sleep 1000, 1
print : print "You show your card to the doorman, he glances at it and waves you by"
print : print : print "(press any key to continue)"
y = 1
while inkey$ = "": wend
end if
return
room5:
cls
print "You knock on the door. you hear someone on the other side...."
print "voice: 'What's the password?'"
input pw_input
if pw_input = "Slim sent me" then
x = 1
else
print "Sorry that's not it"
rn = 2
end if
return
room4:
cls
locate 9
print " For the love of environmental safety......." : sleep 3000, 1
print : print "Has Bruno ever heard of a mop, or hydrochloric acid!" : sleep 3000, 1
print : print "After entering this place you automatically feel disgusting...."
print : input "Would you like to wash your hands? (y/n) "; choice2
if choice2 = "y" then
gosub wash
else
cls
end if
return
wash:
print : print "As you wash your hands, you see some writing...."
print : input "Would you like to examine closer? (y/n) "; choice3
if choice3 = "y" then
print : print "It says: 'The password is: Slim sent me'"
print : print : print "(press any key to continue)"
while inkey$ = "": wend
else
cls
end if
return
fail1:
print : print "You check your pockets and realize.";
for e = 1 to 5
print ".";
sleep 250, 1
next e
print : print : print "you must have left your wallet at home"
print : print "(press any key to continue)"
while inkey$ = "": wend
cls : locate 9
print "You have failed, press any key to exit"
sleep
endand heres the name.bas (if you dont save this file as "name.bas" then it will not compile!
dim as string player_name, choice1
dim as integer item
locate 9
input "What is your name? ", player_name
for d = 1 to 3
cls
locate 9, 10
print "ring.";
sleep 250, 1
for e = 1 to 5
print ".";
sleep 250, 1
next e
next d
print : print : print player_name; ": 'Hello....'" : sleep 2000, 1
print : print "voice: 'Package boy?'" : sleep 3000, 1
print : print player_name; ": 'Yeah....'"
print "(you hate it when they call you that!)" : sleep 3500, 1
print : print "voice: 'Well.... da boss has a job for ya's'" : sleep 2500, 1
print : print player_name; ": '...and....'" : sleep 2000, 1
print : print "voice: '...Sal's waitin' out front.....' click" : sleep 3000, 1
print : print "Damn...you tell yourself as you walk out the door....."
print : print : print "(press any key to continue)"
while inkey$ = "": wend
cls
locate 9
print "As you walk outside, you see Sal parked, crooked, in his sedan." : sleep 3000, 1
print : input "Sal: 'You forgetting anything?' (y/n)"; choice1
item = 0
if choice1 = "y" or choice1 = "Y" then : gosub wallet
end if
cls
locate 6
print "You get into the car and drive off, Sal starts filling you in on the details...." : sleep 3000, 1
print : print "Sal: 'Ok Package boy.......'" : sleep 2500, 1
print : print player_name; ": 'My name is "; player_name; "'" : sleep 2500, 1
print : print "Sal: 'Yeah, "; player_name; " the package boy.'" : sleep 2500, 1
print : print "Sal: 'So here's the deal, we need you to pick up a package.....'" : sleep 1000
print : print "Go figure!" : sleep 2000, 1
print : print "Sal: '....it's at a bar called Bruno's'" : sleep 2500, 1
print : print "Sal: 'Everything is already setup......In and out!'" : sleep 2500, 1
print : print "You pull up to Bruno's and you step out of the car." : sleep 3000, 1
print : print "Sal: 'I'll be waitin' right here for ya.'" : sleep 1000, 1
print : print "(press any key to continue)"
while inkey$ = "": wend
goto main
wallet:
print : print "You quickly pat yourself down, realizing that you've forgotten your wallet."
print "You run back inside and grab it, you never know when you will need it...."
print "(press any key to continue)"
item = 1
while inkey$ = "": wend
returnok guys tell me what you think!!





