1
0

strelba 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. # strelba
  2. !gunpricel = 0 no sighting
  3. !gunpricel = 1 sighting
  4. !gunpricel = 2 very accurate
  5. !gunpower Weapon damage
  6. !buu the number of shots
  7. !shoot shooting skills
  8. :markstrelba
  9. !Reita hit
  10. buurand = RAND(0,100)
  11. if buu = 0:xgt'fight','sta'
  12. if shoot = 0:
  13. if gunpricel = 0:
  14. if buurand = 100:
  15. damage = gunpower
  16. jump'markstelokpopal'
  17. elseif buurand < 100:
  18. buu -= 1
  19. 'Bloomer'
  20. jump'markstrelba'
  21. end
  22. elseif gunpricel = 1:
  23. if buurand >= 95:
  24. damage = gunpower
  25. jump'markstelokpopal'
  26. elseif buurand < 95:
  27. buu -= 1
  28. 'Bloomer'
  29. jump'markstrelba'
  30. end
  31. elseif gunpricel = 2:
  32. if buurand >= 90:
  33. damage = gunpower
  34. jump'markstelokpopal'
  35. elseif buurand < 90:
  36. buu -= 1
  37. 'Bloomer'
  38. jump'markstrelba'
  39. end
  40. end
  41. elseif shoot > 0 and shoot < 20:
  42. if gunpricel = 0:
  43. if buurand >= 95:
  44. damage = gunpower
  45. jump'markstelokpopal'
  46. elseif buurand < 95:
  47. buu -= 1
  48. 'Bloomer'
  49. jump'markstrelba'
  50. end
  51. elseif gunpricel = 1:
  52. if buurand >= 90:
  53. damage = gunpower
  54. jump'markstelokpopal'
  55. elseif buurand < 90:
  56. buu -= 1
  57. 'Bloomer'
  58. jump'markstrelba'
  59. end
  60. elseif gunpricel = 2:
  61. if buurand >= 85:
  62. damage = gunpower
  63. jump'markstelokpopal'
  64. elseif buurand < 85:
  65. buu -= 1
  66. 'Bloomer'
  67. jump'markstrelba'
  68. end
  69. end
  70. end
  71. if shoot >= 20 and shoot < 40:
  72. if gunpricel = 0:
  73. if buurand >= 90:
  74. damage = gunpower
  75. jump'markstelokpopal'
  76. elseif buurand < 90:
  77. buu -= 1
  78. 'Bloomer'
  79. jump'markstrelba'
  80. end
  81. elseif gunpricel = 1:
  82. if buurand >= 85:
  83. damage = gunpower
  84. jump'markstelokpopal'
  85. elseif buurand < 85:
  86. buu -= 1
  87. 'Bloomer'
  88. jump'markstrelba'
  89. end
  90. elseif gunpricel = 2:
  91. if buurand >= 80:
  92. damage = gunpower
  93. jump'markstelokpopal'
  94. elseif buurand < 80:
  95. buu -= 1
  96. 'Bloomer'
  97. jump'markstrelba'
  98. end
  99. end
  100. elseif shoot >= 40 and shoot<60:
  101. if gunpricel = 0:
  102. if buurand >= 85:
  103. damage = gunpower
  104. jump'markstelokpopal'
  105. elseif buurand < 85:
  106. buu -= 1
  107. 'Bloomer'
  108. jump'markstrelba'
  109. end
  110. elseif gunpricel = 1:
  111. if buurand >= 80:
  112. damage = gunpower
  113. jump'markstelokpopal'
  114. elseif buurand < 80:
  115. buu -= 1
  116. 'Bloomer'
  117. jump'markstrelba'
  118. end
  119. elseif gunpricel = 2:
  120. if buurand >= 75:
  121. damage = gunpower
  122. jump'markstelokpopal'
  123. elseif buurand < 75:
  124. buu -= 1
  125. 'Bloomer'
  126. jump'markstrelba'
  127. end
  128. end
  129. elseif shoot >= 60 and shoot < 80:
  130. if gunpricel = 0:
  131. if buurand >= 80:
  132. damage = gunpower
  133. jump'markstelokpopal'
  134. elseif buurand < 80:
  135. buu -= 1
  136. 'Bloomer'
  137. jump'markstrelba'
  138. end
  139. elseif gunpricel = 1:
  140. if buurand >= 75:
  141. damage = gunpower
  142. jump'markstelokpopal'
  143. elseif buurand < 75:
  144. buu -= 1
  145. 'Bloomer'
  146. jump'markstrelba'
  147. end
  148. elseif gunpricel = 2:
  149. if buurand >= 70:
  150. damage = gunpower
  151. jump'markstelokpopal'
  152. elseif buurand < 70:
  153. buu -= 1
  154. 'Bloomer'
  155. jump'markstrelba'
  156. end
  157. end
  158. elseif shoot >= 80 and shoot < 100:
  159. if gunpricel = 0:
  160. if buurand >= 75:
  161. damage = gunpower
  162. jump'markstelokpopal'
  163. elseif buurand < 75:
  164. buu -= 1
  165. 'Bloomer'
  166. jump'markstrelba'
  167. end
  168. elseif gunpricel = 1:
  169. if buurand >= 70:
  170. damage = gunpower
  171. jump'markstelokpopal'
  172. end
  173. if buurand < 70:
  174. buu -= 1
  175. 'Bloomer'
  176. jump'markstrelba'
  177. end
  178. elseif gunpricel = 2:
  179. if buurand >= 65:
  180. damage = gunpower
  181. jump'markstelokpopal'
  182. elseif buurand < 65:
  183. buu -= 1
  184. 'Bloomer'
  185. jump'markstrelba'
  186. end
  187. end
  188. elseif shoot >= 100 and shoot < 150:
  189. if gunpricel = 0:
  190. if buurand >= 70:
  191. damage = gunpower
  192. jump'markstelokpopal'
  193. elseif buurand < 70:
  194. buu -= 1
  195. 'Bloomer'
  196. jump'markstrelba'
  197. end
  198. elseif gunpricel = 1:
  199. if buurand >= 65:
  200. damage = gunpower
  201. jump'markstelokpopal'
  202. elseif buurand < 65:
  203. buu -= 1
  204. 'Bloomer'
  205. jump'markstrelba'
  206. end
  207. elseif gunpricel = 2:
  208. if buurand >= 60:
  209. damage = gunpower
  210. jump'markstelokpopal'
  211. elseif buurand < 60:
  212. buu -= 1
  213. 'Bloomer'
  214. jump'markstrelba'
  215. end
  216. end
  217. elseif shoot >= 150 and shoot < 200:
  218. if gunpricel = 0:
  219. if buurand >= 65:
  220. damage = gunpower
  221. jump'markstelokpopal'
  222. elseif buurand < 65:
  223. buu -= 1
  224. 'Bloomer'
  225. jump'markstrelba'
  226. end
  227. elseif gunpricel = 1:
  228. if buurand >= 60:
  229. damage = gunpower
  230. jump'markstelokpopal'
  231. elseif buurand < 60:
  232. buu -= 1
  233. 'Bloomer'
  234. jump'markstrelba'
  235. end
  236. elseif gunpricel = 2:
  237. if buurand >= 55:
  238. damage = gunpower
  239. jump'markstelokpopal'
  240. elseif buurand < 55:
  241. buu -= 1
  242. 'Bloomer'
  243. jump'markstrelba'
  244. end
  245. end
  246. elseif shoot >= 200 and shoot < 300:
  247. if gunpricel = 0:
  248. if buurand >= 60:
  249. damage = gunpower
  250. jump'markstelokpopal'
  251. elseif buurand < 60:
  252. buu -= 1
  253. 'Bloomer'
  254. jump'markstrelba'
  255. end
  256. elseif gunpricel = 1:
  257. if buurand >= 55:
  258. damage = gunpower
  259. jump'markstelokpopal'
  260. elseif buurand < 55:
  261. buu -= 1
  262. 'Bloomer'
  263. jump'markstrelba'
  264. end
  265. elseif gunpricel = 2:
  266. if buurand >= 45:
  267. damage = gunpower
  268. jump'markstelokpopal'
  269. elseif buurand < 45:
  270. buu -= 1
  271. 'Bloomer'
  272. jump'markstrelba'
  273. end
  274. end
  275. elseif shoot >= 300 and shoot < 400:
  276. if gunpricel = 0:
  277. if buurand >= 55:
  278. damage = gunpower
  279. jump'markstelokpopal'
  280. elseif buurand < 55:
  281. buu -= 1
  282. 'Bloomer'
  283. jump'markstrelba'
  284. end
  285. elseif gunpricel = 1:
  286. if buurand >= 50:
  287. damage = gunpower
  288. jump'markstelokpopal'
  289. elseif buurand < 50:
  290. buu -= 1
  291. 'Bloomer'
  292. jump'markstrelba'
  293. end
  294. elseif gunpricel = 2:
  295. if buurand >= 45:
  296. damage = gunpower
  297. jump'markstelokpopal'
  298. elseif buurand < 45:
  299. buu -= 1
  300. 'Bloomer'
  301. jump'markstrelba'
  302. end
  303. end
  304. elseif shoot >= 400 and shoot < 500:
  305. if gunpricel = 0:
  306. if buurand >= 50:
  307. damage = gunpower
  308. jump'markstelokpopal'
  309. elseif buurand < 50:
  310. buu -= 1
  311. 'Bloomer'
  312. jump'markstrelba'
  313. end
  314. elseif gunpricel = 1:
  315. if buurand >= 45:
  316. damage = gunpower
  317. jump'markstelokpopal'
  318. elseif buurand < 45:
  319. buu -= 1
  320. 'Bloomer'
  321. jump'markstrelba'
  322. end
  323. elseif gunpricel = 2:
  324. if buurand >= 40:
  325. damage = gunpower
  326. jump'markstelokpopal'
  327. elseif buurand < 40:
  328. buu -= 1
  329. 'Bloomer'
  330. jump'markstrelba'
  331. end
  332. end
  333. elseif shoot >= 500:
  334. if gunpricel = 0:
  335. if buurand >= 45:
  336. damage = gunpower
  337. jump'markstelokpopal'
  338. elseif buurand < 45:
  339. buu -= 1
  340. 'Bloomer'
  341. jump'markstrelba'
  342. end
  343. elseif gunpricel = 1:
  344. if buurand >= 40:
  345. damage = gunpower
  346. jump'markstelokpopal'
  347. elseif buurand < 40:
  348. buu -= 1
  349. 'Bloomer'
  350. jump'markstrelba'
  351. end
  352. elseif gunpricel = 2:
  353. if buurand >= 35:
  354. damage = gunpower
  355. jump'markstelokpopal'
  356. end
  357. if buurand < 35:
  358. buu -= 1
  359. 'Bloomer'
  360. jump'markstrelba'
  361. end
  362. end
  363. end
  364. :markstelokpopal
  365. !if hit
  366. !calculation of damage
  367. if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
  368. if dospehV > 0:damage = damage - dospehDefV & dospehEnV = dospehEnV - 1
  369. if damage < 0:damage = 0
  370. healthV = healthV - damage
  371. Gcrimein += 1
  372. '<b><font color = green>Accept damage <<damage>> units</font></b>'
  373. if zerkaloV > 0:
  374. zerkaloV = zerkaloV - 1
  375. health = health - damage
  376. '<b><font color = red><<$boy>> reflected the damage and you get <<damage>> points of damage</font></b>'
  377. end
  378. if buu = 0:xgt'fight','sta'
  379. if buu > 0:buu -= 1 & jump'markstrelba'
  380. end
  381. if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
  382. defenceV = defenceV - damage
  383. '<b><font color = green>Protection of the enemy suffered damage <<damage>> units</font></b>'
  384. if buu = 0:xgt'fight','sta'
  385. if buu > 0:buu -= 1 & jump'markstrelba'
  386. end
  387. if klonV > 0 and unmaterialV <= 0:
  388. klonV = klonV - 1
  389. '<b><font color = green>Destroyed enemy clone, he still had <<KlonV>> Clones</font></b>'
  390. if buu = 0:xgt'fight','sta'
  391. if buu > 0:buu -= 1 & jump'markstrelba'
  392. end
  393. if unmaterialV > 0:
  394. unmaterialV = unmaterialV - 1
  395. '<b><font color = red>Your bullet flew straight through the opponent`s body. <<$boy>> Not material</font></b>'
  396. if buu = 0:xgt'fight','sta'
  397. if buu > 0:buu -= 1 & jump'markstrelba'
  398. end
  399. if barierV > 0:
  400. !imeniteta barrier for damage
  401. if barierV >= damage:
  402. '<b><font color = red><<$boy>> easily withstood hit</font></b>'
  403. if buu = 0:xgt'fight','sta'
  404. if buu > 0:buu -= 1 & jump'markstrelba'
  405. elseif barierV < damage:
  406. healthV = healthV - damage
  407. Gcrimein += 1
  408. '<b><font color = green>Accept damage <<damage>> units</font></b>'
  409. if zerkaloV > 0:
  410. zerkaloV = zerkaloV - 1
  411. health = health - damage
  412. '<b><font color = red><<$boy>> reflected the damage and you get <<damage>> points of damage</font></b>'
  413. end
  414. end
  415. if buu = 0:xgt'fight','sta'
  416. if buu > 0:buu -= 1 & jump'markstrelba'
  417. end
  418. --- strelba ---------------------------------