ShooterowyPL

Gladiatorzy

Jan 1st, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.98 KB | None | 0 0
  1. options:
  2. tag: &9[&6GLADIATORZY&9]
  3. max_players: 6
  4. accept_time: 30
  5. on script load:
  6. if {turniej::gra::status} is not set:
  7. set {turniej::gra::status} to false
  8. on join:
  9. if {turniej::status::%player%} is not set:
  10. set {turniej::status::%player%} to false
  11. command /turniej [<text>] [<text>]:
  12. trigger:
  13. if arg 1 is not set:
  14. if player doesn't have permission "turniej.*" or "turniej.pomoc":
  15. send "{@tag} &cNie masz uprawnien do tej komendy!"
  16. stop
  17. send "{@tag} &aKomendy:"
  18. send "&3/turniej zapros <gracz>"
  19. send "&3/turniej akceptuj"
  20. send "&3/turniej odrzuc"
  21. send "&3/turniej opusc"
  22. send "&3/turniej nagroda"
  23. send "&3/turniej info"
  24. send "&3/turniej ustawlobby"
  25. send "&3/turniej ustawwidownie"
  26. send "&3/turniej ustawspawn <1|2>"
  27. stop
  28. if arg 1 is "nagroda":
  29. if size of {nagroda::%player%::*} is 0:
  30. send "{@tag} &cNie masz zadnych nagrod do odebrania!"
  31. stop
  32. send "{@tag} &cPo zamknieciu ekwipunku przedmioty znikna!"
  33. open chest with 6 rows named "{@tag} &6Nagroda" to player
  34. add {nagroda::%player%::*} to current inventory of player
  35. clear {nagroda::%player%::*}
  36. stop
  37. if arg 1 is "info":
  38. if {turniej::gra::spawn1} is set:
  39. send "&6Spawn druzyny nr 1: &austawiony"
  40. else:
  41. send "&6Spawn druzyny nr 1: &cnieustawiony"
  42. if {turniej::gra::spawn2} is set:
  43. send "&6Spawn druzyny nr 2: &austawiony"
  44. else:
  45. send "&6Spawn druzyny nr 2: &cnieustawiony"
  46. if {turniej::gra::lobby} is set:
  47. send "&6Looby: &austawione"
  48. else:
  49. send "&6Lobby: &cnieustawione"
  50. if {turniej::gra::widownia} is set:
  51. send "&6Widownia: &austawiona"
  52. else:
  53. send "&6Widownia: &cnieustawiona"
  54. stop
  55. if arg 1 is "opusc":
  56. if player doesn't have permission "turniej.*" or "turniej.opusc" or "turniej.gracz":
  57. send "{@tag} &cNie masz uprawnien do tej komendy!"
  58. stop
  59. if {turniej::status::%player%} is false:
  60. send "{@tag} &cNie bierzesz udzialu w turnieju!"
  61. stop
  62. send "{@tag} &6%player% &copuscil turniej!" to {turniej::gra::gracze::*}
  63. remove player from {turniej::gra::gracze::*}
  64. remove player from {turniej::gra::team%{turniej::status::%player%::team}%::*}
  65. if {turniej::gra::status} is true:
  66. if {turniej::status::%player%::team} is 1:
  67. if size of {turniej::gra::team1::*} is 0:
  68. send "{@tag} &3Turniej wygrala druzyna nr 2!" to {turniej::gra::gracze::*}
  69. loop {turniej::gra::team2::*}:
  70. clear loop-value's inventory
  71. set loop-value's helmet to air
  72. set loop-value's chestplate to air
  73. set loop-value's leggings to air
  74. set loop-value's boots to air
  75. #Nagroda
  76. add 64 diamonds to {nagroda::%loop-value%::*}
  77. add 64 emeralds to {nagroda::%loop-value%::*}
  78. clear {turniej::gra::team2::*}
  79. loop {turniej::gra::gracze::*}:
  80. teleport loop-value to {turniej::cache::%loop-value%::pos}
  81. set loop-value's level to {turniej::cache::%loop-value%::level}
  82. set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
  83. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  84. clear {turniej::cache::%loop-value%::*}
  85. clear {turniej::status::%loop-value%::*}
  86. set {turniej::status::%loop-value%} to false
  87. set {turniej::gra::status} to false
  88. clear {turniej::gra::gracze::*}
  89. else if {turniej::status::%player%::team} is 2:
  90. if size of {turniej::gra::team2::*} is 0:
  91. send "{@tag} &3Turniej wygrala druzyna nr 1!" to {turniej::gra::gracze::*}
  92. loop {turniej::gra::team1::*}:
  93. clear loop-value's inventory
  94. set loop-value's helmet to air
  95. set loop-value's chestplate to air
  96. set loop-value's leggings to air
  97. set loop-value's boots to air
  98. #Nagroda
  99. add 64 diamonds to {nagroda::%loop-value%::*}
  100. add 64 emeralds to {nagroda::%loop-value%::*}
  101. clear {turniej::gra::team1::*}
  102. loop {turniej::gra::gracze::*}:
  103. teleport loop-value to {turniej::cache::%loop-value%::pos}
  104. set loop-value's level to {turniej::cache::%loop-value%::level}
  105. set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
  106. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  107. clear {turniej::cache::%loop-value%::*}
  108. clear {turniej::status::%loop-value%::*}
  109. set {turniej::status::%loop-value%} to false
  110. set {turniej::gra::status} to false
  111. clear {turniej::gra::gracze::*}
  112. clear {turniej::status::%player%::*}
  113. set {turniej::status::%player%} to false
  114. teleport player to {turniej::cache::%player%::pos}
  115. clear player's inventory
  116. set player's helmet to air
  117. set player's chestplate to air
  118. set player's leggings to air
  119. set player's boots to air
  120. add {turniej::cache::%player%::items::*} to player
  121. set player's level to {turniej::cache::%player%::level}
  122. set player's level progress to {turniej::cache::%player%::levelprogress}
  123. clear {turniej::cache::%player%::*}
  124. if arg 1 is "ustawspawn":
  125. if player doesn't have permission "turniej.*" or "turniej.ustawspawn":
  126. send "{@tag} &cNie masz uprawnien do tej komendy!"
  127. stop
  128. if arg 2 is not set:
  129. send "&cPoprawne uzycie: &3/turniej ustawspawn <1|2>"
  130. stop
  131. if arg 2 is not "1" or "2":
  132. send "&cPoprawne uzycie: &3/turniej ustawspawn <1|2>"
  133. stop
  134. set {turniej::gra::spawn%arg 2%} to location of player
  135. send "{@tag} &3Ustawiono spawn druzyny nr &6%arg 2%&3."
  136. stop
  137. if arg 1 is "ustawlobby":
  138. if player doesn't have permission "turniej.*" or "turniej.ustawlobby":
  139. send "{@tag} &cNie masz uprawnien do tej komendy!"
  140. stop
  141. set {turniej::gra::lobby} to location of player
  142. send "{@tag} &3Ustawiono lobby."
  143. stop
  144. if arg 1 is "ustawwidownie":
  145. if player doesn't have permission "turniej.*" or "turniej.ustawwidownie":
  146. send "{@tag} &cNie masz uprawnien do tej komendy!"
  147. stop
  148. set {turniej::gra::widownia} to location of player
  149. send "{@tag} &3Ustawiono widownie."
  150. stop
  151. if arg 1 is "zapros":
  152. if player doesn't have permission "turniej.*" or "turniej.zapros":
  153. send "{@tag} &cNie masz uprawnien do tej komendy!"
  154. stop
  155. if arg 2 is not set:
  156. send "{@tag} &cPoprawne uzycie: &3/turniej zapros <gracz>"
  157. stop
  158. if arg 2 parsed as player is not set:
  159. send "{@tag} &cNie ma takiego gracza na serwerze!"
  160. stop
  161. if {turniej::gra::status} is true:
  162. send "{@tag} &cGra juz trwa!"
  163. stop
  164. if {turniej::gra::gracze::*} is {@max_players}:
  165. send "{@tag} Osiagnieto maksymalna liczbe graczy!"
  166. stop
  167. if {turniej::status::%arg 2 parsed as player%} is true:
  168. send "{@tag} &cTen gracz bierze juz udzial w turnieju!"
  169. stop
  170. if {turniej::status::%arg 2 parsed as player%::czas} is set:
  171. send "{@tag} &cTen gracz zostal juz zaproszony!"
  172. stop
  173. set {turniej::status::%arg 2 parsed as player%::czas} to {@accept_time}
  174. set {turniej::status::%arg 2 parsed as player%::invitator} to player
  175. send "{@tag} &3Zaproszono gracza &6%arg 2 parsed as player% &3do turnieju."
  176. send "{@tag} &6%player% &3zaprosil Cie do turnieju." to arg 2 parsed as player
  177. send "{@tag} &3Aby akceptowac zaproszenie uzyj komendy &6/turniej akceptuj&3. Masz na to &c{@accept_time} &3sekund." to arg 2 parsed as player
  178. stop
  179. if arg 1 is "odrzuc":
  180. if player doesn't have permission "turniej.*" or "turniej.odrzuc" or "turniej.gracz":
  181. send "{@tag} &cNie masz uprawnien do tej komendy!"
  182. stop
  183. if {turniej::status::%player%::invitator} is not set:
  184. send "{@tag} &cNie masz zadnego zaproszenia do turnieju!"
  185. stop
  186. send "{@tag} &cZaproszenie do turnieju zostalo odrzucone!" to player
  187. send "{@tag} &6%player% &codrzucil zaproszenie do turnieju!" to {turniej::status::%player%::invitator}
  188. clear {turniej::status::%player%::czas}
  189. clear {turniej::status::%player%::invitator}
  190. stop
  191. if arg 1 is "akceptuj":
  192. if player doesn't have permission "turniej.*" or "turniej.akceptuj" or "turniej.gracz":
  193. send "{@tag} &cNie masz uprawnien do tej komendy!"
  194. stop
  195. if {turniej::status::%player%::invitator} is not set:
  196. send "{@tag} &cNie masz zadnego zaproszenia do turnieju!"
  197. stop
  198. if {turniej::gra::status} is true:
  199. send "{@tag} &cGra juz trwa!"
  200. stop
  201. set {turniej::cache::%player%::pos} to location of player
  202. loop items in player's inventory:
  203. add loop-value to {turniej::cache::%player%::items::*}
  204. if player's helmet is any helmet:
  205. add player's helmet to {turniej::cache::%player%::items::*}
  206. if player's chestplate is any chestplate:
  207. add player's chestplate to {turniej::cache::%player%::items::*}
  208. if player's leggings is any leggings:
  209. add player's leggings to {turniej::cache::%player%::items::*}
  210. if player's boots is any boots:
  211. add player's boots to {turniej::cache::%player%::items::*}
  212. set {turniej::cache::%player%::level} to player's level
  213. set {turniej::cache::%player%::levelprogress} to player's level progress
  214. set player's level to 0
  215. set player's level progress to 0
  216. clear player's inventory
  217. set player's helmet to air
  218. set player's chestplate to air
  219. set player's leggings to air
  220. set player's boots to air
  221. teleport player to {turniej::gra::lobby}
  222. set {turniej::status::%player%} to true
  223. add player to {turniej::gra::gracze::*}
  224. send "{@tag} &6%player% &3akceptowal twoje zaproszenie do turnieju." to {turniej::status::%player%::invitator}
  225. send "{@tag} &6%player% &3dolaczyl do turnieju &7(&c%size of {turniej::gra::gracze::*}%&7/&c{@max_players}&7)" to {turniej::gra::gracze::*}
  226. clear {turniej::status::%player%::czas}
  227. clear {turniej::status::%player%::invitator}
  228. if size of {turniej::gra::gracze::*}-1 is smaller than rounded up {@max_players}/2:
  229. set {turniej::status::%player%::team} to 1
  230. send "{@tag} &3Jestes w druzynie nr &61&3."
  231. add player to {turniej::gra::team1::*}
  232. else:
  233. set {turniej::status::%player%::team} to 2
  234. send "{@tag} &3Jestes w druzynie nr &62&3."
  235. add player to {turniej::gra::team2::*}
  236. if size of {turniej::gra::gracze::*} is {@max_players}:
  237. send "{@tag} &3Turniej rozpocznie sie za &c30 &3sekund." to {turniej::gra::gracze::*}
  238. wait 10 seconds
  239. send "{@tag} &3Turniej rozpocznie sie za &c20 &3sekund." to {turniej::gra::gracze::*}
  240. wait 10 seconds
  241. send "{@tag} &3Turniej rozpocznie sie za &c10 &3sekund." to {turniej::gra::gracze::*}
  242. wait 7 seconds
  243. send "{@tag} &3Turniej rozpocznie sie za &c3 &3sekundy." to {turniej::gra::gracze::*}
  244. wait a second
  245. send "{@tag} &3Turniej rozpocznie sie za &c2 &3sekundy." to {turniej::gra::gracze::*}
  246. wait a second
  247. send "{@tag} &3Turniej rozpocznie sie za &c1 &3sekunde." to {turniej::gra::gracze::*}
  248. wait a second
  249. send "{@tag} &3Turniej rozpoczal sie! Powodzenia!" to {turniej::gra::gracze::*}
  250. set {turniej::gra::status} to true
  251. loop {turniej::gra::gracze::*}:
  252. teleport loop-value to {turniej::gra::spawn%{turniej::status::%loop-value%::team}%}
  253. #Zbroja
  254. equip loop-value with all diamond armour
  255. #Przedmioty
  256. add diamond sword to "%loop-value%" parsed as player
  257. add 16 cooked beef to "%loop-value%" parsed as player
  258. add 4 enchanted golden apple to "%loop-value%" parsed as player
  259. add 8 golden apple to "%loop-value%" parsed as player
  260. every 1 second:
  261. loop {turniej::status::*}:
  262. if {turniej::status::%loop-index parsed as player%} is false:
  263. if {turniej::status::%loop-index parsed as player%::czas} is more than 0:
  264. remove 1 from {turniej::status::%loop-index parsed as player%::czas}
  265. if {turniej::status::%loop-index parsed as player%::czas} is 0:
  266. send "{@tag} &cZaproszenie do turnieju zostalo anulowane!" to loop-index parsed as player
  267. send "{@tag} &6%loop-index parsed as player% &cnie odpowiedzial na zaproszenie!" to {turniej::status::%loop-index parsed as player%::invitator}
  268. clear {turniej::status::%loop-index parsed as player%::czas}
  269. clear {turniej::status::%loop-index parsed as player%::invitator}
  270. on quit:
  271. if {turniej::status::%player%} is true:
  272. send "{@tag} &6%player% &copuscil turniej!" to {turniej::gra::gracze::*}
  273. remove player from {turniej::gra::gracze::*}
  274. remove player from {turniej::gra::team%{turniej::status::%player%::team}%::*}
  275. if {turniej::gra::status} is true:
  276. if {turniej::status::%player%::team} is 1:
  277. if size of {turniej::gra::team1::*} is 0:
  278. send "{@tag} &3Turniej wygrala druzyna nr 2!" to {turniej::gra::gracze::*}
  279. loop {turniej::gra::team2::*}:
  280. clear loop-value's inventory
  281. set loop-value's helmet to air
  282. set loop-value's chestplate to air
  283. set loop-value's leggings to air
  284. set loop-value's boots to air
  285. #Nagroda
  286. add 64 diamonds to {nagroda::%loop-value%::*}
  287. add 64 emeralds to {nagroda::%loop-value%::*}
  288. clear {turniej::gra::team2::*}
  289. loop {turniej::gra::gracze::*}:
  290. teleport loop-value to {turniej::cache::%loop-value%::pos}
  291. set loop-value's level to {turniej::cache::%loop-value%::level}
  292. set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
  293. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  294. clear {turniej::cache::%loop-value%::*}
  295. clear {turniej::status::%loop-value%::*}
  296. set {turniej::status::%loop-value%} to false
  297. set {turniej::gra::status} to false
  298. clear {turniej::gra::gracze::*}
  299. else if {turniej::status::%player%::team} is 2:
  300. if size of {turniej::gra::team2::*} is 0:
  301. send "{@tag} &3Turniej wygrala druzyna nr 1!" to {turniej::gra::gracze::*}
  302. loop {turniej::gra::team1::*}:
  303. clear loop-value's inventory
  304. set loop-value's helmet to air
  305. set loop-value's chestplate to air
  306. set loop-value's leggings to air
  307. set loop-value's boots to air
  308. #Nagroda
  309. add 64 diamonds to {nagroda::%loop-value%::*}
  310. add 64 emeralds to {nagroda::%loop-value%::*}
  311. clear {turniej::gra::team1::*}
  312. loop {turniej::gra::gracze::*}:
  313. teleport loop-value to {turniej::cache::%loop-value%::pos}
  314. set loop-value's level to {turniej::cache::%loop-value%::level}
  315. set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
  316. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  317. clear {turniej::cache::%loop-value%::*}
  318. clear {turniej::status::%loop-value%::*}
  319. set {turniej::status::%loop-value%} to false
  320. set {turniej::gra::status} to false
  321. clear {turniej::gra::gracze::*}
  322. clear {turniej::status::%player%::*}
  323. clear {turniej::status::%player%}
  324. teleport player to {turniej::cache::%player%::pos}
  325. clear player's inventory
  326. set player's helmet to air
  327. set player's chestplate to air
  328. set player's leggings to air
  329. set player's boots to air
  330. add {turniej::cache::%player%::items::*} to player
  331. set player's level to {turniej::cache::%player%::level}
  332. set player's level progress to {turniej::cache::%player%::levelprogress}
  333. clear {turniej::cache::%player%::*}
  334. click:
  335. loop {turniej::cache::*}:
  336. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  337. on damage:
  338. if attacker is a player:
  339. if victim is a player:
  340. if {turniej::status::%attacker%} is set:
  341. if {turniej::gra::status} is false:
  342. cancel event
  343. if {turniej::status::%attacker%::team} is {turniej::status::%victim%::team}:
  344. cancel event
  345. on death of player:
  346. if {turniej::status::%victim%} is true:
  347. if {turniej::gra::status} is true:
  348. clear drops
  349. send "{@tag} &6%attacker% &3pokonal &6%victim%&3." to {turniej::gra::gracze::*}
  350. remove victim from {turniej::gra::team%{turniej::status::%victim%::team}%::*}
  351. if {turniej::status::%victim%::team} is 1:
  352. if size of {turniej::gra::team1::*} is 0:
  353. send "{@tag} &3Turniej wygrala druzyna nr 2!" to {turniej::gra::gracze::*}
  354. loop {turniej::gra::team2::*}:
  355. clear loop-value's inventory
  356. set loop-value's helmet to air
  357. set loop-value's chestplate to air
  358. set loop-value's leggings to air
  359. set loop-value's boots to air
  360. #Nagroda
  361. add 64 diamonds to {nagroda::%loop-value%::*}
  362. add 64 emeralds to {nagroda::%loop-value%::*}
  363. clear {turniej::gra::team2::*}
  364. loop {turniej::gra::gracze::*}:
  365. teleport loop-value to {turniej::cache::%loop-value%::pos}
  366. set loop-value's level to {turniej::cache::%loop-value%::level}
  367. set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
  368. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  369. clear {turniej::cache::%loop-value%::*}
  370. clear {turniej::status::%loop-value%::*}
  371. set {turniej::status::%loop-value%} to false
  372. set {turniej::gra::status} to false
  373. clear {turniej::gra::gracze::*}
  374. else if {turniej::status::%victim%::team} is 2:
  375. if size of {turniej::gra::team2::*} is 0:
  376. send "{@tag} &3Turniej wygrala druzyna nr 1!" to {turniej::gra::gracze::*}
  377. loop {turniej::gra::team1::*}:
  378. clear loop-value's inventory
  379. set loop-value's helmet to air
  380. set loop-value's chestplate to air
  381. set loop-value's leggings to air
  382. set loop-value's boots to air
  383. #Nagroda
  384. add 64 diamonds to {nagroda::%loop-value%::*}
  385. add 64 emeralds to {nagroda::%loop-value%::*}
  386. clear {turniej::gra::team1::*}
  387. loop {turniej::gra::gracze::*}:
  388. teleport loop-value to {turniej::cache::%loop-value%::pos}
  389. set loop-value's level to {turniej::cache::%loop-value%::level}
  390. set loop-value's level progress to {turniej::cache::%loop-value%::levelprogress}
  391. add {turniej::cache::%loop-value%::items::*} to inventory of loop-value
  392. clear {turniej::cache::%loop-value%::*}
  393. clear {turniej::status::%loop-value%::*}
  394. set {turniej::status::%loop-value%} to false
  395. set {turniej::gra::status} to false
  396. clear {turniej::gra::gracze::*}
  397. on respawn:
  398. wait a tick
  399. if player is in {turniej::gra::gracze::*}:
  400. teleport player to {turniej::gra::widownia}
Add Comment
Please, Sign In to add comment