Advertisement
Guest User

Untitled

a guest
Nov 6th, 2013
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. DIM keypress AS STRING
  2. SCREEN 12
  3.  
  4. COMMON SHARED x AS SINGLE, y AS SINGLE, xx AS SINGLE, yy AS SINGLE, score AS SINGLE, cc AS SINGLE, eclor AS SINGLE, range AS SINGLE, weapon AS SINGLE, ammo AS SINGLE, clr AS SINGLE
  5.  
  6. yy = 100
  7. xx = 200
  8. weapon = 1
  9. ammo = 15
  10. health = 3
  11.  
  12. DO
  13.  
  14. keypress = UCASE$(INKEY$)
  15.  
  16. hit
  17.  
  18. IF keypress = "W" THEN
  19. y = y - 1
  20. CLS
  21. acls
  22. END IF
  23.  
  24. IF keypress = "S" THEN
  25. y = y + 1
  26. CLS
  27. acls
  28. END IF
  29.  
  30. IF keypress = "A" THEN
  31. x = x - 1
  32. CLS
  33. acls
  34. END IF
  35.  
  36. IF keypress = "D" THEN
  37. x = x + 1
  38. CLS
  39. acls
  40. END IF
  41.  
  42. IF keypress = "E" THEN
  43. SOUND 1000, 1
  44. ammo = ammo - 1
  45. FOR x2 = x TO x + range
  46. CIRCLE (x2, y), 3, clr
  47. FOR d = 1 TO 1000000
  48. NEXT d
  49. CLS
  50. ashot
  51. acls
  52.  
  53. NEXT x2
  54. ' dead
  55. END IF
  56.  
  57. IF keypress = "Q" THEN
  58. wepswitch
  59. CLS
  60. acls
  61.  
  62. END IF
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. IF keypress = "E" AND x + range = xx AND y = yy THEN
  71. dead
  72. score = score + 1
  73. CLS
  74. ammo = ammo + 5
  75. acls
  76. END IF
  77.  
  78.  
  79.  
  80.  
  81.  
  82. CIRCLE (x, y), 10, 2
  83. enemy
  84. hbar
  85.  
  86.  
  87.  
  88.  
  89.  
  90. LOOP UNTIL keypress = "K" OR ammo = 0
  91.  
  92.  
  93. SUB acls
  94. PRINT "SCORE"; score; "Weapon"; weapon; "AMMO"; ammo
  95. END SUB
  96.  
  97. SUB ashot
  98. CIRCLE (x, y), 10, 2
  99. enemy
  100. hbar
  101. END SUB
  102.  
  103. SUB enemy
  104. CIRCLE (xx, yy), 10, 4
  105. END SUB
  106.  
  107. SUB dead
  108. RANDOMIZE TIMER
  109. xx = INT(RND * 640)
  110. RANDOMIZE TIMER
  111. yy = INT(RND * 480)
  112. END SUB
  113.  
  114.  
  115.  
  116.  
  117. SUB wepswitch
  118. weapon = weapon + 1
  119. IF weapon > 3 THEN weapon = 1
  120.  
  121. IF weapon = 1 THEN
  122. range = 50
  123. clr = 2
  124. END IF
  125. IF weapon = 2 THEN
  126. range = 120
  127. clr = 4
  128. END IF
  129. IF weapon = 3 THEN
  130. range = 300
  131. clr = 14
  132. END IF
  133.  
  134.  
  135. END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement