Lab One
Slim420 12 May 2007 23:59
This was a quick effort by the students of GDN's Beginning with FreeBASIC class. bacon333 and I put efforts together and came up with "Lab One"
Randomize Timer
Option Explicit
Dim as string player_name, weapon(3,2), usranswer, retry, input2, sprayer, winnar
Dim As Integer Weapons, ammountofammo, WeaponsRnd, i
Screen 19, 15
locate 15, 35
weapon(1,1) = "USP Match"
weapon(1,2) = "bullets"
weapon(2,1) = "Shot gun"
weapon(2,2) = "shells"
weapon(3,1) = "sub machine gun"
weapon(3,2) = "rounds"
Starthere:
WeaponsRnd = Int(Rnd(1)*3)+1
ammountofammo = Int(Rnd(3)*6)+5
print "Welcome to Lab One"
sleep 1000
print
print
print
input "Enter your name: ", player_name
cls
locate 15
print "Your name is "; player_name
sleep 1000, 1
print "You are a security personell trainee"
print "for 'Lab One'."
sleep 3000, 1
cls
locate 15
print "As you enter the building, you ";
print "immediatly notice that something..."
sleep 2000, 1
print "...is very wrong...";
for i = 1 to 7
sleep 500
print ".";
next i
sleep 500
print "."
sleep 3000, 1
Print "You walk down the hallway of the building... to see a weapon in front of you..."
sleep 3000, 1
Print "You pick up a " ; weapon(weaponsRnd,1) ; " with" ; (ammountofammo) ; " " ; weapon(weaponsRnd,2) ; "."
Sleep 2000, 1
Print "You look down the vast hallway..."
Sleep 3000, 1
Print "You decide to progress down the hallway, to round a corner."
Sleep 2000, 1
Print "A zombie walks towards you, hungry for your flesh. What do you do?"
Input "Do you shoot it with your gun, or do you run away? (Shoot/run)" , usranswer
If lcase(usranswer) = "run" Then Goto gameover
Print "The zombie drops to the ground. Dead."
Sleep 2000, 1
Print "You then see something down the hall... it looks like a soldier of some kind..."
Sleep 2000, 1
Print "He gets much closer, but doesn't seem to notice you... yet... What do you do?"
Input "Do you shoot him in the head, or do you shoot him in the chest? (chest/head)" , input2
If lcase(input2) = "head" Then Goto Reason1
Print "The recoil pushes the gun up, and basically blows the soldier's head clean off."
Sleep 3000, 1
Print "You see an exit, however, another soldier steps out from the side, and raises his gun."
Sleep 2000, 1
Print "Do fire at him, randomly, hoping that one of the bullets might hit him?"
Input "Or do you take aim and fire? (aim/spray)" , sprayer
If lcase(input2) = "aim" Then Goto Reason2
Print "You run towards the exit, and you escape. Congratulations, you are the winner. Yay."
Goto Wingame
'As a side note, I have a can of root beer in my hand at this very moment. And it is gooood.
Reason2:
Print "None of the bullets hit, and the soldier eventually kills you..."
Goto gameover
Reason1:
Print "The recoil rises above the soldiers head, and eventually he mows you down with his over-sized machine gun..."
Sleep 3000, 1
Goto gameover
gameover:
Input "You screwed up. Badly. Would you like to try again? (y/n)" , retry
If lcase(retry) = "y" Then
Cls
Goto Starthere
End If
End
Wingame:
Input "Would you like to play again? (y/n)" , winnar
If lcase(winnar) = "y" Then
Cls
Goto Starthere
End If
End