ShooterowyPL

Gladiatorzy

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