Advertisement
atm959

game.bas

Oct 2nd, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. 'Text-Based game by Aaron T. Murphy, NOBODY ELSE!!!
  2.  
  3. dim money as double
  4. dim in as string
  5.  
  6. 'I dont really know at the moment. I have to figure it all out.
  7.  
  8. money = 0.0
  9.  
  10. money = 50.99
  11.  
  12. print "You are in a house. There are 4 things you can do:"
  13. print "1: [exit]: Exit the house."
  14. print "2: [get]: Get money."
  15. print "3: [call]: Call your friend."
  16. print "4: [run]: Run away."
  17.  
  18. input "What do you do" ; in
  19. print ""
  20.  
  21. if in = "exit" then
  22. print "You exited the house!"
  23. end if
  24. if in = "get" then
  25. money += 100.99
  26. print "You got $100.99, so your balance is now"; money
  27. end if
  28. if in = "call" then
  29. color 10
  30. print "===BEEP BOOP BEEP BOOP==="
  31. color 15
  32. print "Hi, this is your friend. What do you want?"
  33. print "1: [buy]: Buy a cheap game system."
  34. print "2: [go]: Come over to your friend's house."
  35. print "3: [movies]: Go to the movies with your friend."
  36. print "4: [store]: Go to the store with your friend."
  37. input "Select a response: " , in
  38.  
  39. if in = "buy" then
  40. if money < 50.99 then
  41. color 12
  42. print ""
  43. print "YOU HAVE INSUFFICIENT FUNDS TO COMPLETE THIS TRANSACTION."
  44. print "FUNDS REQUIRED: $50.99"
  45. end if
  46. if money >= 50.99 then
  47. print ""
  48. print "You bought a cheap game system from your friend."
  49. money -= 50.99
  50. print "You now have"; money; " dollars."
  51. end if
  52. end if
  53. if in = "go" then
  54. color 10
  55. print "You went to your friend's house."
  56. color 15
  57. end if
  58. if in = "movies" then
  59. color 10
  60. print "You went to the movies with your friend."
  61. color 15
  62. end if
  63. if in = "store" then
  64. if money < 9.99 then
  65. color 12
  66. print "YOU HAVE INSUFFICIENT FUNDS TO COMPLETE THIS TRANSACTION."
  67. print "FUNDS REQUIRED: $9.99"
  68. color 15
  69. end if
  70. if money >= 9.99 then
  71. print "You went to the store and bought some bread."
  72. money -= 9.99
  73. print "You now have"; money; " dollars."
  74. end if
  75. end if
  76. end if
  77. if in = "run" then
  78. print "YOU RAN AWAY!!! :-)"
  79. color 12
  80. print "-GAME OVER-"
  81. end if
  82. sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement