1
0

044_strelba 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  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. end
  18. if buurand < 100:
  19. buu -= 1
  20. 'bloomer'
  21. jump 'markstrelba'
  22. end
  23. end
  24. if gunpricel = 1:
  25. if buurand >= 95:
  26. damage = gunpower
  27. jump 'markstelokpopal'
  28. end
  29. if buurand < 95:
  30. buu -= 1
  31. 'bloomer'
  32. jump 'markstrelba'
  33. end
  34. end
  35. if gunpricel = 2:
  36. if buurand >= 90:
  37. damage = gunpower
  38. jump 'markstelokpopal'
  39. end
  40. if buurand < 90:
  41. buu -= 1
  42. 'bloomer'
  43. jump 'markstrelba'
  44. end
  45. end
  46. end
  47. if shoot > 0 and shoot < 20:
  48. if gunpricel = 0:
  49. if buurand >= 95:
  50. damage = gunpower
  51. jump 'markstelokpopal'
  52. end
  53. if buurand < 95:
  54. buu -= 1
  55. 'bloomer'
  56. jump 'markstrelba'
  57. end
  58. end
  59. if gunpricel = 1:
  60. if buurand >= 90:
  61. damage = gunpower
  62. jump 'markstelokpopal'
  63. end
  64. if buurand < 90:
  65. buu -= 1
  66. 'bloomer'
  67. jump 'markstrelba'
  68. end
  69. end
  70. if gunpricel = 2:
  71. if buurand >= 85:
  72. damage = gunpower
  73. jump 'markstelokpopal'
  74. end
  75. if buurand < 85:
  76. buu -= 1
  77. 'bloomer'
  78. jump 'markstrelba'
  79. end
  80. end
  81. end
  82. if shoot >= 20 and shoot < 40:
  83. if gunpricel = 0:
  84. if buurand >= 90:
  85. damage = gunpower
  86. jump 'markstelokpopal'
  87. end
  88. if buurand < 90:
  89. buu -= 1
  90. 'bloomer'
  91. jump 'markstrelba'
  92. end
  93. end
  94. if gunpricel = 1:
  95. if buurand >= 85:
  96. damage = gunpower
  97. jump 'markstelokpopal'
  98. end
  99. if buurand < 85:
  100. buu -= 1
  101. 'bloomer'
  102. jump 'markstrelba'
  103. end
  104. end
  105. if gunpricel = 2:
  106. if buurand >= 80:
  107. damage = gunpower
  108. jump 'markstelokpopal'
  109. end
  110. if buurand < 80:
  111. buu -= 1
  112. 'bloomer'
  113. jump 'markstrelba'
  114. end
  115. end
  116. end
  117. if shoot >= 40 and shoot < 60:
  118. if gunpricel = 0:
  119. if buurand >= 85:
  120. damage = gunpower
  121. jump 'markstelokpopal'
  122. end
  123. if buurand < 85:
  124. buu -= 1
  125. 'bloomer'
  126. jump 'markstrelba'
  127. end
  128. end
  129. if gunpricel = 1:
  130. if buurand >= 80:
  131. damage = gunpower
  132. jump 'markstelokpopal'
  133. end
  134. if buurand < 80:
  135. buu -= 1
  136. 'bloomer'
  137. jump 'markstrelba'
  138. end
  139. end
  140. if gunpricel = 2:
  141. if buurand >= 75:
  142. damage = gunpower
  143. jump 'markstelokpopal'
  144. end
  145. if buurand < 75:
  146. buu -= 1
  147. 'bloomer'
  148. jump 'markstrelba'
  149. end
  150. end
  151. end
  152. if shoot >= 60 and shoot < 80:
  153. if gunpricel = 0:
  154. if buurand >= 80:
  155. damage = gunpower
  156. jump 'markstelokpopal'
  157. end
  158. if buurand < 80:
  159. buu -= 1
  160. 'bloomer'
  161. jump 'markstrelba'
  162. end
  163. end
  164. if gunpricel = 1:
  165. if buurand >= 75:
  166. damage = gunpower
  167. jump 'markstelokpopal'
  168. end
  169. if buurand < 75:
  170. buu -= 1
  171. 'bloomer'
  172. jump 'markstrelba'
  173. end
  174. end
  175. if gunpricel = 2:
  176. if buurand >= 70:
  177. damage = gunpower
  178. jump 'markstelokpopal'
  179. end
  180. if buurand < 70:
  181. buu -= 1
  182. 'bloomer'
  183. jump 'markstrelba'
  184. end
  185. end
  186. end
  187. if shoot >= 80 and shoot < 100:
  188. if gunpricel = 0:
  189. if buurand >= 75:
  190. damage = gunpower
  191. jump 'markstelokpopal'
  192. end
  193. if buurand < 75:
  194. buu -= 1
  195. 'bloomer'
  196. jump 'markstrelba'
  197. end
  198. end
  199. if gunpricel = 1:
  200. if buurand >= 70:
  201. damage = gunpower
  202. jump 'markstelokpopal'
  203. end
  204. if buurand < 70:
  205. buu -= 1
  206. 'bloomer'
  207. jump 'markstrelba'
  208. end
  209. end
  210. if gunpricel = 2:
  211. if buurand >= 65:
  212. damage = gunpower
  213. jump 'markstelokpopal'
  214. end
  215. if buurand < 65:
  216. buu -= 1
  217. 'bloomer'
  218. jump 'markstrelba'
  219. end
  220. end
  221. end
  222. if shoot >= 100 and shoot < 150:
  223. if gunpricel = 0:
  224. if buurand >= 70:
  225. damage = gunpower
  226. jump 'markstelokpopal'
  227. end
  228. if buurand < 70:
  229. buu -= 1
  230. 'bloomer'
  231. jump 'markstrelba'
  232. end
  233. end
  234. if gunpricel = 1:
  235. if buurand >= 65:
  236. damage = gunpower
  237. jump 'markstelokpopal'
  238. end
  239. if buurand < 65:
  240. buu -= 1
  241. 'bloomer'
  242. jump 'markstrelba'
  243. end
  244. end
  245. if gunpricel = 2:
  246. if buurand >= 60:
  247. damage = gunpower
  248. jump 'markstelokpopal'
  249. end
  250. if buurand < 60:
  251. buu -= 1
  252. 'bloomer'
  253. jump 'markstrelba'
  254. end
  255. end
  256. end
  257. if shoot >= 150 and shoot < 200:
  258. if gunpricel = 0:
  259. if buurand >= 65:
  260. damage = gunpower
  261. jump 'markstelokpopal'
  262. end
  263. if buurand < 65:
  264. buu -= 1
  265. 'bloomer'
  266. jump 'markstrelba'
  267. end
  268. end
  269. if gunpricel = 1:
  270. if buurand >= 60:
  271. damage = gunpower
  272. jump 'markstelokpopal'
  273. end
  274. if buurand < 60:
  275. buu -= 1
  276. 'bloomer'
  277. jump 'markstrelba'
  278. end
  279. end
  280. if gunpricel = 2:
  281. if buurand >= 55:
  282. damage = gunpower
  283. jump 'markstelokpopal'
  284. end
  285. if buurand < 55:
  286. buu -= 1
  287. 'bloomer'
  288. jump 'markstrelba'
  289. end
  290. end
  291. end
  292. if shoot >= 200 and shoot < 300:
  293. if gunpricel = 0:
  294. if buurand >= 60:
  295. damage = gunpower
  296. jump 'markstelokpopal'
  297. end
  298. if buurand < 60:
  299. buu -= 1
  300. 'bloomer'
  301. jump 'markstrelba'
  302. end
  303. end
  304. if gunpricel = 1:
  305. if buurand >= 55:
  306. damage = gunpower
  307. jump 'markstelokpopal'
  308. end
  309. if buurand < 55:
  310. buu -= 1
  311. 'bloomer'
  312. jump 'markstrelba'
  313. end
  314. end
  315. if gunpricel = 2:
  316. if buurand >= 45:
  317. damage = gunpower
  318. jump 'markstelokpopal'
  319. end
  320. if buurand < 45:
  321. buu -= 1
  322. 'bloomer'
  323. jump 'markstrelba'
  324. end
  325. end
  326. end
  327. if shoot >= 300 and shoot < 400:
  328. if gunpricel = 0:
  329. if buurand >= 55:
  330. damage = gunpower
  331. jump 'markstelokpopal'
  332. end
  333. if buurand < 55:
  334. buu -= 1
  335. 'bloomer'
  336. jump 'markstrelba'
  337. end
  338. end
  339. if gunpricel = 1:
  340. if buurand >= 50:
  341. damage = gunpower
  342. jump 'markstelokpopal'
  343. end
  344. if buurand < 50:
  345. buu -= 1
  346. 'bloomer'
  347. jump 'markstrelba'
  348. end
  349. end
  350. if gunpricel = 2:
  351. if buurand >= 45:
  352. damage = gunpower
  353. jump 'markstelokpopal'
  354. end
  355. if buurand < 45:
  356. buu -= 1
  357. 'bloomer'
  358. jump 'markstrelba'
  359. end
  360. end
  361. end
  362. if shoot >= 400 and shoot < 500:
  363. if gunpricel = 0:
  364. if buurand >= 50:
  365. damage = gunpower
  366. jump 'markstelokpopal'
  367. end
  368. if buurand < 50:
  369. buu -= 1
  370. 'bloomer'
  371. jump 'markstrelba'
  372. end
  373. end
  374. if gunpricel = 1:
  375. if buurand >= 45:
  376. damage = gunpower
  377. jump 'markstelokpopal'
  378. end
  379. if buurand < 45:
  380. buu -= 1
  381. 'bloomer'
  382. jump 'markstrelba'
  383. end
  384. end
  385. if gunpricel = 2:
  386. if buurand >= 40:
  387. damage = gunpower
  388. jump 'markstelokpopal'
  389. end
  390. if buurand < 40:
  391. buu -= 1
  392. 'bloomer'
  393. jump 'markstrelba'
  394. end
  395. end
  396. end
  397. if shoot >= 500:
  398. if gunpricel = 0:
  399. if buurand >= 45:
  400. damage = gunpower
  401. jump 'markstelokpopal'
  402. end
  403. if buurand < 45:
  404. buu -= 1
  405. 'bloomer'
  406. jump 'markstrelba'
  407. end
  408. end
  409. if gunpricel = 1:
  410. if buurand >= 40:
  411. damage = gunpower
  412. jump 'markstelokpopal'
  413. end
  414. if buurand < 40:
  415. buu -= 1
  416. 'bloomer'
  417. jump 'markstrelba'
  418. end
  419. end
  420. if gunpricel = 2:
  421. if buurand >= 35:
  422. damage = gunpower
  423. jump 'markstelokpopal'
  424. end
  425. if buurand < 35:
  426. buu -= 1
  427. 'bloomer'
  428. jump 'markstrelba'
  429. end
  430. end
  431. end
  432. :markstelokpopal
  433. !if hit
  434. !Calculation of damage
  435. if defenceV <= 0 and klonV <= 0 and unmaterialV <= 0 and barierV <= 0:
  436. if dospehV > 0:set damage -= dospehDefV & set dospehEnV -= 1
  437. if damage < 0:set damage = 0
  438. set healthV -= damage
  439. Gcrimein += 1
  440. '<b><font color="green">harmed <<damage>> units</font></b>'
  441. if zerkaloV > 0:
  442. set zerkaloV -= 1
  443. set health -= damage
  444. '<b><font color="red"><<$nameV>> reflected damage and you got <<damage>> points of damage</font></b>'
  445. end
  446. if buu = 0:xgt 'fight', 'sta'
  447. if buu > 0:buu -= 1 & jump 'markstrelba'
  448. end
  449. if defenceV > 0 and klonV <= 0 and unmaterialV <= 0:
  450. set defenceV -= damage
  451. '<b><font color="green">Protection enemy harmed <<damage>> units</font></b>'
  452. if buu = 0:xgt 'fight', 'sta'
  453. if buu > 0:buu -= 1 & jump 'markstrelba'
  454. end
  455. if klonV > 0 and unmaterialV <= 0:
  456. set klonV -= 1
  457. '<b><font color="green">Clone destroyed enemy, he still had <<KlonV>> clones</font></b>'
  458. if buu = 0:xgt 'fight', 'sta'
  459. if buu > 0:buu -= 1 & jump 'markstrelba'
  460. end
  461. if unmaterialV > 0:
  462. set unmaterialV -= 1
  463. '<b><font color="red">Your bullet went straight through the opponent´s body. <<$nameV>> none Materials</font></b>'
  464. if buu = 0:xgt 'fight', 'sta'
  465. if buu > 0:buu -= 1 & jump 'markstrelba'
  466. end
  467. if barierV > 0:
  468. !meniteta barrier for damange
  469. if barierV >= damage:
  470. '<b><font color="red"><<$nameV>> easily withstood hit</font></b>'
  471. if buu = 0:xgt 'fight', 'sta'
  472. if buu > 0:buu -= 1 & jump 'markstrelba'
  473. end
  474. if barierV < damage:
  475. set healthV -= damage
  476. Gcrimein += 1
  477. '<b><font color="green">harmed <<damage>> units</font></b>'
  478. if zerkaloV > 0:
  479. set zerkaloV -= 1
  480. set health -= damage
  481. '<b><font color="red"><<$nameV>> reflected damage and you got <<damage>> points of damage</font></b>'
  482. end
  483. end
  484. if buu = 0:xgt 'fight', 'sta'
  485. if buu > 0:buu -= 1 & jump 'markstrelba'
  486. end
  487. --- strelba ---------------------------------