Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.32 KB | None | 0 0
  1. script options:
  2. $ init com.mysql.jdbc.Driver
  3. $ db url jdbc:mysql://localhost:3306/ehcsql
  4. $ db username root
  5. $ db password jnnbwaJP69$
  6.  
  7. on load:
  8. if folder "plugins/ehcGuilds" doesn't exists:
  9. create folder "plugins/ehcGuilds"
  10. else:
  11. if file "plugins/ehcGuilds/config.yml" doesn't exists:
  12. create file "plugins/ehcGuilds/config.yml"
  13. wf "Ustawienia:" "plugins/ehcGuilds/config.yml"
  14. wf " Wymagane:" "plugins/ehcGuilds/config.yml"
  15. wf " Gracz:" "plugins/ehcGuilds/config.yml"
  16. wf " - 1 stone" "plugins/ehcGuilds/config.yml"
  17. wf " VIP:" "plugins/ehcGuilds/config.yml"
  18. wf " - 1 stone" "plugins/ehcGuilds/config.yml"
  19. else:
  20. loop {Gildie::regiony::lista::*}:
  21. set {_nazwa} to loop-value
  22. set {_loc.a} to {Gildie::region::%{_nazwa}%::locA}
  23. set {_loc.b} to {Gildie::region::%{_nazwa}%::locB}
  24. set {_loc} to {Gildie::region::%{_nazwa}%::locC}
  25. new Region {_nazwa};
  26. "%{_nazwa}%".Region.selectLL{{_loc.a}, {_loc.b}};
  27. "%{_nazwa}%".Region.setCenter{{_loc}};
  28.  
  29. Options:
  30. logo: &8 >>
  31. brakPermissions: &7Nie masz do tego praw
  32.  
  33. command /gildia:
  34. aliases: g
  35. trigger:
  36. if player have permissions "Gildie.Gracz" or "Gildie.help" or "Gildie.*":
  37. send "&6============ Zarzadzanie ==========="
  38. send "&7/zaloz &6[TAG] [NAZWA] &7- Tworzy gildie"
  39. send "&7/usun &7- &7Usuwa gildie"
  40. send "&7/lider &6[NICK] &7- &7Oddaje lidera gildii"
  41. send "&7/awans &6[NICK] &7- &7Nadaje mistrza gildii"
  42. send "&7/degraduj &6[NICK] &7- &7Degraduje gracza"
  43. send "&7/zapros &6[NICK] &7- &7Zaprasza gracza do gildii"
  44. send "&7/wyrzuc &6[NICK] &7- &7Wyrzuca gracza z gildii"
  45. send "&7/sojusz &6[TAG] &7- &7Zawiera sojusz z gildia"
  46. send "&7/pvp &7- &7ON/OFF PvP"
  47. send "&6============== Gracz =============="
  48. send "&7/dolacz &6[TAG] &7- &7Dolacza do danej gildii"
  49. send "&7/opusc &7- &7Opuszcza gildie"
  50. send "&7/baza &7- &7Przenosi do gildii"
  51. send "&6============== Ogolne =============="
  52. send "&7/info &6[TAG] &7- &7Sprawdzasz informacje o gildii"
  53. send "&7/itemy &8- &7Pokazuje itemy potrzebne do stworzenia gildi"
  54. send "&6==================================="
  55.  
  56. command /itemy:
  57. trigger:
  58. set {_nazwaEQ} to "&9---===&f[&4&lItemy na Gildie&f]&9===---"
  59. "%{_nazwaEQ}%".inventory.unregister{};
  60. new Inventory "%{_nazwaEQ}%"
  61. "%{_nazwaEQ}%".inventory.setRow{1};
  62. if player have permissions "gildia.VIP":
  63. set {_listaItemkow::*} to value list "Ustawienia.Wymagane.VIP" get of "plugins/ehcGuilds/config.yml"
  64. else:
  65. set {_listaItemkow::*} to value list "Ustawienia.Wymagane.Gracz" get of "plugins/ehcGuilds/config.yml"
  66. loop {_listaItemkow::*}:
  67. add loop-value to {_itemyLista}
  68. set {_itemyLista} to "%{_listaItemkow::1}%,%{_listaItemkow::2}%,%{_listaItemkow::3}%,%{_listaItemkow::4}%,%{_listaItemkow::5}%,%{_listaItemkow::6}%,%{_listaItemkow::7}%,%{_listaItemkow::8}%,%{_listaItemkow::9}%"
  69. # send "%{_itemyLista}%"
  70. set {_Itemy::*} to {_itemyLista} split at ","
  71. set {_ItemyIlosc::*} to {_itemyLista} split at " "
  72. send "%{_ItemyIlosc::0}% %{_ItemyIlosc::3}%"
  73. #set {_list::*} to {_fakeplugins} split at ","
  74. "%{_nazwaEQ}%".inventory.setItem{1, wood sword named "" with lore ""};
  75. "%{_nazwaEQ}%".inventory.setExecutor{1, "player"};
  76. "%{_nazwaEQ}%".inventory.display{player}
  77.  
  78. command /zaloz [<text>] [<text>]:
  79. trigger:
  80. if player have permissions "Gildie.Gracz" or "Gildie.create" or "Gildie.*":
  81. if {Gildie::gracz::%player%::nazwaGildii} is not set:
  82. if arg 1 is set:
  83. if arg 2 is set:
  84. set {_nazwa} to arg 2
  85. if {Gildie::skrot::%arg 1%::stan} is set:
  86. send "{@logo} &7Skrot &6%arg 1% juz istnieje"
  87. stop
  88. set {_len} to length of arg 1
  89. if {_len} is greater than 4:
  90. send "{@logo} &7Masz za dlugi skrot - musi miec on 4 znaki"
  91. stop
  92. if {_len} is smaller than 4:
  93. send "{@logo} &7Masz za krotki skrot - musi miec on 4 znaki"
  94. stop
  95. set {_len} to length of arg 2
  96. if {_len} is greater than 22:
  97. send "{@logo} &7Masz za dluga nazwe - musi miec ona mniej niz 22 znakow"
  98. stop
  99. if {_len} is smaller than 5:
  100. send "{@logo} &7Masz za krotka nazwe - musi miec ona wiecej niz 5 znakow"
  101. stop
  102. set {_sk} to arg 1
  103. set {_nazwa.test} to {_nazwa}
  104. replace all "a" and "b" and "c" and "d" and "e" and "f" and "g" and "h" and "i" and "j" and "k" and "l" and "m" and "n" and "o" and "p" and "q" and "r" and "s" and "t" and "u" and "v" and "w" and "x" and "y" and "z" and "1" and "2" and "3" and "4" and "5" and "6" and "7" and "8" and "9" and "0" with "" in {_nazwa.test}
  105. replace all "a" and "b" and "c" and "d" and "e" and "f" and "g" and "h" and "i" and "j" and "k" and "l" and "m" and "n" and "o" and "p" and "q" and "r" and "s" and "t" and "u" and "v" and "w" and "x" and "y" and "z" and "1" and "2" and "3" and "4" and "5" and "6" and "7" and "8" and "9" and "0" with "" in {_sk}
  106. if length of {_sk} is greater than 1:
  107. send "{@logo} &7skrot zwiera nieprawidlowe znaki: %{_sk}%"
  108. stop
  109. if length of {_nazwa.test} is greater than 1:
  110. send "{@logo} &7Skrot zwiera nieprawidlowe znaki: %{_nazwa.test}%"
  111. stop
  112. if {Gildie::nazwa::%{_nazwa}%::istnienie} is not set:
  113. set {_loc.x} to x-location of block at location of player
  114. set {_loc.y} to y-location of block at location of player
  115. set {_loc.z} to z-location of block at location of player
  116. set {_world} to player's world
  117. add -41 to {_loc.x}
  118. add -40 to {_loc.z}
  119. set {_loc.y} to 1
  120. set {_loc.a} to location at {_loc.x}, {_loc.y}, {_loc.z} in {_world}
  121. add 81 to {_loc.x}
  122. add 81 to {_loc.z}
  123. set {_loc.y} to 256
  124. set {_loc.b} to location at {_loc.x}, {_loc.y}, {_loc.z} in {_world}
  125. set {_ile.x} to difference between x location of {_loc.a} and x location of {_loc.b}
  126. set {_ile.z} to difference between z location of {_loc.a} and z location of {_loc.b}
  127. set {_ile.y} to difference between y location of {_loc.a} and y location of {_loc.b}
  128. set {_loc.y} to 100
  129. set {_loc.loop} to location at {_loc.x}, {_loc.y}, {_loc.z} in {_world}
  130. set {_loc.loop.x} to {_loc.x}
  131. set {_loc.loop.z} to {_loc.z}
  132. set {_loc.loop.z.save} to {_loc.loop.z}
  133. set {_index} to 0
  134. loop {_ile.x} times:
  135. set {_loc.loop.x} to {_loc.loop.x}-1
  136. remove {_ile.z} from {_loc.loop.z}
  137. loop {_ile.z} times:
  138. set {_loc.loop.z} to {_loc.loop.z}+1
  139. set {_loc.loop} to location at {_loc.loop.x}, {_loc.y}, {_loc.loop.z} in {_world}
  140. add 1 to {_index}
  141. if {_loc.loop} is in any region:
  142. send "{@logo} &7Nie mozna utworzyc gildii, poniewaz teren na ktorym by powstala jest juz zajety"
  143. stop
  144. if player have permissions "gildia.VIP":
  145. set {_listaItemkow::*} to value list "Ustawienia.Wymagane.VIP" get of "plugins/ehcGuilds/config.yml"
  146. else:
  147. set {_listaItemkow::*} to value list "Ustawienia.Wymagane.Gracz" get of "plugins/ehcGuilds/config.yml"
  148. loop {_listaItemkow::*}:
  149. set {_item} to "%loop-value%" parsed as item type
  150. if player's inventory contains {_item}:
  151. set {_posiada} to true
  152. else:
  153. set {_posiada} to false
  154. send "%{gildie::tag::config}% &6Potrzebujesz &c20x&6: &bDiament, &aSzmaragd, &7Zelazo, &eZloto"
  155. stop
  156. if {_posiada} is true:
  157. loop {_listaItemkow::*}:
  158. set {_item} to "%loop-value%" parsed as item type
  159. remove {_item} from player's inventory
  160. new Region {_nazwa};
  161. "%{_nazwa}%".Region.selectLL{{_loc.a}, {_loc.b}};
  162. set {_loc} to location of block at location of player
  163. "%{_nazwa}%".Region.setCenter{{_loc}};
  164. set block at {_loc} to enderdragon egg
  165. set {Gildie::region::%{_nazwa}%::locA} to {_loc.a}
  166. set {Gildie::region::%{_nazwa}%::locB} to {_loc.b}
  167. set {Gildie::region::%{_nazwa}%::locC} to {_loc}
  168. add {_nazwa} to {Gildie::regiony::lista::*}
  169. set {Gildie::nazwa::%{_nazwa}%::istnienie} to true
  170. set {Gildie::nazwa::%{_nazwa}%::owner} to player
  171. add player to {Gildie::nazwa::%{_nazwa}%::members::list::*}
  172. set {Gildie::nazwa::%{_nazwa}%::HP} to 100
  173. set {Gildie::nazwa::%{_nazwa}%::DataZalozenia} to now
  174. set {Gildie::nazwa::%{_nazwa}%::MaxHP} to 100
  175. set {Gildie::nazwa::%{_nazwa}%::members::number} to 1
  176. set {Gildie::nazwa::%{_nazwa}%::skrot} to arg 1
  177. set {Gildie::tag::%arg 1%::skrot} to {_nazwa}
  178. set {Gildie::skrot::%{Gildie::nazwa::%{_nazwa}%::skrot}%::nazwaGildii} to {_nazwa}
  179. set {Gildie::nazwa::%{_nazwa}%::pvp} to false
  180. set {Gildie::nazwa::%{_nazwa}%::punkty} to 0
  181. add {_nazwa} to {Gildie::gildie::lista::*}
  182. set {Gildie::gracz::%player%::nazwaGildii} to {_nazwa}
  183. set {Gildie::gracz::%player%::stanowisko} to "Owner"
  184. broadcast "{@logo} &7Gracz &6%player% &7zalozyl gildie &6%{_nazwa}%"
  185. create hologram "&4 %{Gildie::nazwa::%{_nazwa}%::HP}% &6/&a %{Gildie::nazwa::%{_nazwa}%::MaxHP}%" at block above {_loc} for 1 seconds
  186. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  187. set {_player} to loop-value
  188. set {_player} to {_player} parsed as player
  189. add {Gracz::%{_player}%::punkty} to {_points}
  190. add 1 to {_dziel}
  191. set {_p.g} to {_points}/{_dziel}
  192. set {_p.g} to {_p.g} parsed as number
  193. set {_p.g} to a round down {_p.g}
  194. update "INSERT INTO gildie (Nazwa, Tag, Lider, Czlonkowie, Punkty) VALUES ('%{_nazwa}%', '%arg 1%', '%player%','%player%', '%{_p.g}%');"
  195. update "UPDATE gracze SET pozycjaWGildi='%{Gildie::gracz::%player%::stanowisko}%' WHERE Nick='%player%';"
  196. else:
  197. send "{@logo} &7Gildia o nazwie &6%arg 2% juz istnieje"
  198. else:
  199. send "{@logo} &7Musisz podac nazwe swojej gidii"
  200. else:
  201. send "{@logo} &7Musisz podac skrot swojej gidii"
  202. else:
  203. send "{@logo} &7Masz juz gildie &6%{Gildie::gracz::%player%::nazwaGildii}%"
  204. else:
  205. send "{@brakPermissions}"
  206.  
  207. command /usun:
  208. trigger:
  209. if player have permissions "Gildie.Gracz" or "Gildie.Delete" or "Gildie.*":
  210. if {Gildie::gracz::%player%::nazwaGildii} is set:
  211. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  212. if {Gildie::gracz::%player%::stanowisko} is "Owner":
  213. set {_loc} to {Gildie::region::%{_nazwa}%::locC}
  214. set block at {_loc} to air
  215. "%{_nazwa}%".Region.delete{};
  216. delete {Gildie::skrot::%{Gildie::nazwa::%{_nazwa}%::skrot}%::nazwaGildii}
  217. loop {Gildie::nazwa::%{_nazwa}%::sojusznicy::*}:
  218. set {_gildia} to loop-value
  219. remove {_nazwa} from {Gildie::nazwa::%{_gildia}%::sojusznicy::*}
  220. delete {Gildie::nazwa::%{_nazwa}%::stosunki::%{_gildia}%}
  221. delete {Gildie::nazwa::%{_gildia}%::stosunki::%{_nazwa}%}
  222. loop {Gildie::nazwa::%{_nazwa}%::prosbyOSojusz::*}:
  223. remove {_nazwa} from {Gildie::nazwa::%{_gildia}%::propozycjaSojuszuLista::*}
  224. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  225. delete {Gildie::gracz::%loop-value%::nazwaGildii}
  226. delete {Gildie::gracz::%loop-value%::Stanowisko}
  227. delete {Gildie::gracz::%loop-value%::skrot}
  228. if "%loop-value%" is not "%player%":
  229. send "{@logo} Gracz %player% rozwiazal Twoja gildie" to "%loop-value%" parsed as player
  230. delete {Gildie::skrot::%{Gildie::nazwa::%{_nazwa}%::skrot}%::stan}
  231. delete {Gildie::skrot::%{Gildie::nazwa::%{_nazwa}%::skrot}%::nazwaGildii}
  232. delete {Gildie::nazwa::%{_nazwa}%}
  233. remove {_nazwa} from {Gildie::gildie::lista::*}
  234. remove {_nazwa} from {Gildie::regiony::lista::*}
  235. delete {Gildie::region::%{_nazwa}%}
  236. delete {Gildie::nazwa::%{_nazwa}%::*}
  237. delete {Gildie::nazwa::%{_nazwa}%::istnienie}
  238. delete {Gildie::nazwa::%{_nazwa}%::zaproszeni::list::*}
  239. delete {Gildie::gracz::%player%::skrot}
  240. update "DELETE FROM gildie WHERE Nazwa='%{_nazwa}%';"
  241. broadcast "{@logo} &7Gracz &6%player% &7rozwiazal gildie &6%{_nazwa}%"
  242. else:
  243. send "{@logo} &7Nie jestes wlascicielem gildii &6%{_nazwa}%"
  244. else:
  245. send "{@logo} &7Nie jestes w zadnej gildii"
  246. else:
  247. send "{@brakPermissions}"
  248.  
  249. command /baza:
  250. trigger:
  251. if player have permissions "Gildie.Gracz" or "Gildie.home" or "Gildie.*":
  252. if {Gildie::gracz::%player%::nazwaGildii} is set:
  253. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  254. if {Gildie::region::%{_nazwa}%::locC} is set:
  255. set {_loc} to {Gildie::region::%{_nazwa}%::locC}
  256. set {_time} to 5
  257. set {_x.%player%} to x-location of player
  258. set {_z.%player%} to z-location of player
  259. set {_y.%player%} to y-location of player
  260. send "{@logo} &7Teleportacja nastapi za: &6%{_time}% sek&7. Nie mozesz sie ruszac."
  261. loop {_time} times:
  262. if difference between x-location of player and {_x.%player%} is bigger than 0.5:
  263. send "{@logo} &7Ruszyles sie, teleportacja zostala przerwana."
  264. stop
  265. if difference between z-location of player and {_z.%player%} is bigger than 0.5:
  266. send "{@logo} &7Ruszyles sie, teleportacja zostala przerwana."
  267. stop
  268. if difference between y-location of player and {_y.%player%} is bigger than 0.5:
  269. send "{@logo} &7Ruszyles sie, teleportacja zostala przerwana."
  270. stop
  271. remove 1 from {_time}
  272. if {_time} is 0:
  273. teleport player to {_loc}
  274. stop
  275. wait 1 second
  276. stop
  277. else:
  278. send "{@logo} &7Masz terenu gildii"
  279. else:
  280. send "{@logo} &7Nie jestes w zadnej gildii"
  281. else:
  282. send "{@brakPermissions}"
  283.  
  284. command /zapros [<text>]:
  285. trigger:
  286. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  287. if {Gildie::gracz::%player%::nazwaGildii} is set:
  288. if {Gildie::gracz::%player%::Stanowisko} is "Owner" or "Moderator":
  289. if arg 1 is set:
  290. set {_nick} to arg 1
  291. set {_nick} to {_nick} parsed as player
  292. if "%{_nick}%" is "%player%":
  293. send "{@logo} &7Nie mozesz zaprosic samego siebie"
  294. stop
  295. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  296. if {Gildie::gracz::%{_nick}%::nazwaGildii} is {_nazwa}:
  297. send "{@logo} &7Ten gracz jest juz w Twojej gildii"
  298. stop
  299. if {Gildie::gracz::%{_nick}%::zaproszenie::nazwa::%{_nazwa}%} is set:
  300. send "{@logo} &7Ten gracz juz zostal zaproszony"
  301. stop
  302. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  303. if "%loop-value%" is not "%player%":
  304. send "{@logo} &7Gracz &6%player% &7zaprosil do Twojej gildii gracza &6%{_nick}%" to "%loop-value%" parsed as player
  305. add {_nick} to {Gildie::nazwa::%{_nazwa}%::zaproszeni::list::*}
  306. set {Gildie::gracz::%{_nick}%::zaproszenie::nazwa::%{_nazwa}%} to true
  307. send "{@logo} &7Zaprosiles gracza &6%{_nick}%"
  308. send "{@logo} &7Gracz &6%player% &7zaprosil Ciebie do gildii &6%{_nazwa}%" to "%{_nick}%" parsed as player
  309. else:
  310. send "{@logo} &7Musisz podac nick zapraszanego gracza"
  311. else:
  312. send "{@logo} &7Nie jestes wlascicielem gildii"
  313. else:
  314. send "{@logo} &7Nie jestes w zadnej gildii"
  315. else:
  316. send "{@brakPermissions}"
  317.  
  318. command /wyrzuc [<text>]:
  319. trigger:
  320. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  321. if {Gildie::gracz::%player%::nazwaGildii} is set:
  322. if {Gildie::gracz::%player%::Stanowisko} is "Owner":
  323. if arg 1 is set:
  324. set {_nick} to arg 1
  325. set {_nick} to {_nick} parsed as player
  326. if "%{_nick}%" is "%player%":
  327. send "{@logo} &7Nie mozesz wyrzucic samego siebie"
  328. stop
  329. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  330. if {Gildie::gracz::%{_nick}%::nazwaGildii} is {_nazwa}:
  331. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  332. if "%loop-value%" is not "%player%":
  333. send "{@logo} &7Gracz &6%player% &7wyrzucil z Twojej gildii gracza &6%{_nick}%" to "%loop-value%" parsed as player
  334. delete {Gildie::gracz::%{_nick}%::nazwaGildii}
  335. delete {Gildie::gracz::%{_nick}%::Stanowisko}
  336. remove {_nick} from {Gildie::nazwa::%{_nazwa}%::members::list::*}
  337. remove {_nick} from {Gildie::nazwa::%{_nazwa}%::moderatorzy::*}
  338. send "{@logo} &7Wyrzuciles gracza &6%{_nick}%"
  339. send "{@logo} &7Gracz &6%player% &7wyrzucil Ciebie z gildii" to {_nick} parsed as player
  340. set {_Mistrzowie} to "%{Gildie::nazwa::%{_nazwa}%::moderatorzy::*}%"
  341. replace all " and " with ", " in {_Mistrzowie}
  342. replace all "<none>" with "" in {_Mistrzowie}
  343. set {_member} to "%{Gildie::nazwa::%{_nazwa}%::members::list::*}%"
  344. replace all " and " with ", " in {_member}
  345. replace all "<none>" with "" in {_member}
  346. update "UPDATE gildie SET Czlonkowie='%{_member}%', Mistrzowie='%{_Mistrzowie}%' WHERE Nazwa='%{_nazwa}%';"
  347. update "UPDATE gracze SET pozycjaWGildi='BRAK' WHERE Nick='%{_nick}%';"
  348. else:
  349. send "{@logo} &7Gracz &6%{_nick}% nie jest w Twojej gildii"
  350. else:
  351. send "{@logo} &7Musisz podac nick wyrzucanego gracza"
  352. else:
  353. send "{@logo} &7Nie jestes wlascicielem gildii"
  354. else:
  355. send "{@logo} &7Nie jestes w zadnej gildii"
  356. else:
  357. send "{@brakPermissions}"
  358.  
  359. command /dolacz [<text>]:
  360. trigger:
  361. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  362. if {Gildie::gracz::%player%::nazwaGildii} is not set:
  363. if arg 1 is set:
  364. set {_tag} to arg 1
  365. set {_nazwa} to {Gildie::tag::%{_tag}%::skrot}
  366. if {Gildie::nazwa::%{_nazwa}%::istnienie} is not set:
  367. send "{@logo} &7Gildia &6%{_nazwa}% &7nie istnieje"
  368. stop
  369. if {Gildie::nazwa::%{_nazwa}%::istnienie} is not true:
  370. send "{@logo} &7Gildia &6%{_nazwa}% &7nie istnieje"
  371. stop
  372. set {_nick} to player
  373. if {Gildie::gracz::%{_nick}%::zaproszenie::nazwa::%{_nazwa}%} is true:
  374. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  375. if "%loop-value%" is not "%player%":
  376. send "{@logo} &7Gracz &6%{_nick}% &7dolaczyl do Twojej gildii" to "%loop-value%" parsed as player
  377. set {Gildie::gracz::%{_nick}%::nazwaGildii} to {_nazwa}
  378. add {_nick} to {Gildie::nazwa::%{_nazwa}%::members::list::*}
  379. send "{@logo} &7Dolaczyles do gildii &6%{_nazwa}%"
  380. add {Gildie::gracz::%player%::punkty} to {Gildie::gildie::lista::%{_nazwa}%}
  381. set {Gildie::gracz::%{_nick}%::nazwaGildii} to {_nazwa}
  382. set {Gildie::gracz::%{_nick}%::Stanowisko} to "Member"
  383. delete {Gildie::gracz::%{_nick}%::zaproszenie::nazwa::%{_nazwa}%}
  384. set {_member} to "%{Gildie::nazwa::%{_nazwa}%::members::list::*}%"
  385. replace all " and " with ", " in {_member}
  386. replace all "<none>" with "" in {_member}
  387. update "UPDATE gildie SET Czlonkowie='%{_member}%' WHERE Nazwa='%{_nazwa}%';"
  388. update "UPDATE gracze SET pozycjaWGildi='%{Gildie::gracz::%player%::stanowisko}%' WHERE Nick='%player%';"
  389. else:
  390. send "{@logo} &7Nie masz zaproszenia do gildii &6%{_tag}%"
  391. else:
  392. send "{@logo} &7Musisz podac gildie do ktorej chcesz dolaczyc"
  393. else:
  394. send "{@logo} &7Jestes juz w gildii"
  395. else:
  396. send "{@brakPermissions}"
  397.  
  398. command /opusc:
  399. trigger:
  400. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  401. if {Gildie::gracz::%player%::nazwaGildii} is set:
  402. set {_nick} to player
  403. set {_nick} to {_nick} parsed as player
  404. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  405. remove {_nick} from {Gildie::nazwa::%{_nazwa}%::moderatorzy::*}
  406. remove {_nick} from {Gildie::nazwa::%{_nazwa}%::members::list::*}
  407. if {Gildie::gracz::%{_nick}%::stanowisko} is "Moderator" or "Member":
  408. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  409. if "%loop-value%" is not "%player%":
  410. send "{@logo} &7Gracz &6%{_nick}% &7odszedl z Twojej gildii" to "%loop-value%" parsed as player
  411. delete {Gildie::gracz::%{_nick}%::nazwaGildii}
  412. send "{@logo} &7Opusciles gildie &6%{_nazwa}%"
  413. delete {Gildie::gracz::%{_nick}%::Stanowisko}
  414. delete {Gildie::gracz::%{_nick}%::nazwaGildii}
  415. set {_Mistrzowie} to "%{Gildie::nazwa::%{_nazwa}%::moderatorzy::*}%"
  416. replace all " and " with ", " in {_Mistrzowie}
  417. replace all "<none>" with "" in {_Mistrzowie}
  418. set {_member} to "%{Gildie::nazwa::%{_nazwa}%::members::list::*}%"
  419. replace all " and " with ", " in {_member}
  420. replace all "<none>" with "" in {_member}
  421. update "UPDATE gildie SET Czlonkowie='%{_member}%', Mistrzowie='%{_Mistrzowie}%' WHERE Nazwa='%{_nazwa}%';"
  422. update "UPDATE gracze SET pozycjaWGildi='BRAK' WHERE Nick='%{_nick}%';"
  423. else:
  424. send "{@logo} &7Nie mozesz opuscic gildi"
  425. else:
  426. send "{@logo} &7Nie posiadasz gildi"
  427. else:
  428. send "{@brakPermissions}"
  429.  
  430. command /sojusz [<text>]:
  431. trigger:
  432. if player have permissions "Gildie.Gracz" or "Gildie.sojusz" or "Gildie.*":
  433. if {Gildie::gracz::%player%::nazwaGildii} is set:
  434. if {Gildie::gracz::%player%::Stanowisko} is "Owner":
  435. if arg 1 is set:
  436. set {_tag} to arg 1
  437. set {_gildia} to {Gildie::tag::%{_tag}%::skrot}
  438. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  439. set {_tag1} to {Gildie::nazwa::%{_nazwa}%::skrot}
  440. if {_tag1} is not {_gildia}:
  441. if {Gildie::nazwa::%{_gildia}%::istnienie} is set:
  442. if {Gildie::nazwa::%{_nazwa}%::stosunki::%{_gildia}%} is not set:
  443. if {Gildie::nazwa::%{_gildia}%::propozycjaSojuszu::%{_nazwa}%} is not set:
  444. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  445. send "{@logo} &7Gildia &6%{_nazwa}% &7zaproponowala sojusz z gildia &6%{_gildia}%" to "%loop-value%" parsed as player
  446. loop {Gildie::nazwa::%{_gildia}%::members::list::*}:
  447. send "{@logo} &7Gildia &6%{_nazwa}% &7zaproponowala sojusz z twoja gildia. Wpisz &6/g sojusz %{_tag1}% &7aby zakceptowac" to "%loop-value%" parsed as player
  448. add {_nazwa} to {Gildie::nazwa::%{_gildia}%::propozycjaSojuszuLista::*}
  449. add {_gildia} to {Gildie::nazwa::%{_nazwa}%::prosbyOSojusz::*}
  450. set {Gildie::nazwa::%{_nazwa}%::propozycjaSojuszu::%{_gildia}%} to true
  451. set {Gildie::nazwa::%{_gildia}%::propozycjaSojuszu::%{_nazwa}%} to true
  452. stop
  453. if {Gildie::nazwa::%{_nazwa}%::propozycjaSojuszu::%{_gildia}%} is true:
  454. set {Gildie::nazwa::%{_nazwa}%::stosunki::%{_gildia}%} to "sojusz"
  455. set {Gildie::nazwa::%{_gildia}%::stosunki::%{_nazwa}%} to "sojusz"
  456. add {_gildia} to {Gildie::nazwa::%{_nazwa}%::sojusznicy::*}
  457. add {_nazwa} to {Gildie::nazwa::%{_gildia}%::sojusznicy::*}
  458. delete {Gildie::nazwa::%{_nazwa}%::propozycjaSojuszu::%{_gildia}%}
  459. delete {Gildie::nazwa::%{_gildia}%::propozycjaSojuszu::%{_nazwa}%}
  460. remove {_nazwa} from {Gildie::nazwa::%{_gildia}%::propozycjaSojuszuLista::*}
  461. remove {_gildia} from {Gildie::nazwa::%{_nazwa}%::propozycjaSojuszuLista::*}
  462. remove {_gildia} from {Gildie::nazwa::%{_nazwa}%::prosbyOSojusz::*}
  463. remove {_nazwa} from {Gildie::nazwa::%{_gildia}%::prosbyOSojusz::*}
  464. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  465. send "{@logo} &7Gildia &6%{_nazwa}% &7zawarla sojusz z gildia &6%{_gildia}%" to "%loop-value%" parsed as player
  466. loop {Gildie::nazwa::%{_gildia}%::members::list::*}:
  467. send "{@logo} &7Gildia &6%{_nazwa}% &7zawarla sojusz z twoja gildia" to "%loop-value%" parsed as player
  468. set {_ally1} to "%{Gildie::nazwa::%{_gildia}%::sojusznicy::*}%"
  469. replace all " and " with ", " in {_ally1}
  470. set {_ally} to "%{Gildie::nazwa::%{_nazwa}%::sojusznicy::*}%"
  471. replace all " and " with ", " in {_ally}
  472. update "UPDATE gildie SET Sojusze='%{_ally}%' WHERE Nazwa='%{_nazwa}%';"
  473. update "UPDATE gildie SET Sojusze='%{_ally1}%' WHERE Nazwa='%{_gildia}%';"
  474. else:
  475. delete {Gildie::nazwa::%{_nazwa}%::stosunki::%{_gildia}%}
  476. delete {Gildie::nazwa::%{_gildia}%::stosunki::%{_nazwa}%}
  477. remove {_gildia} from {Gildie::nazwa::%{_nazwa}%::sojusznicy::*}
  478. remove {_nazwa} from {Gildie::nazwa::%{_gildia}%::sojusznicy::*}
  479. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  480. send "{@logo} &7Gildia &6%{_nazwa}% &7rozwiazala sojusz z gildia &6%{_gildia}%" to "%loop-value%" parsed as player
  481. loop {Gildie::nazwa::%{_gildia}%::members::list::*}:
  482. send "{@logo} &7Gildia &6%{_nazwa}% &7rozwiazala sojusz z twoja gildia" to "%loop-value%" parsed as player
  483. set {_ally1} to "%{Gildie::nazwa::%{_gildia}%::sojusznicy::*}%"
  484. replace all " and " with ", " in {_ally1}
  485. replace all "<none>" with "" in {_ally}
  486. set {_ally} to "%{Gildie::nazwa::%{_nazwa}%::sojusznicy::*}%"
  487. replace all " and " with ", " in {_ally}
  488. replace all "<none>" with "" in {_ally}
  489. update "UPDATE gildie SET Sojusze='%{_ally}%' WHERE Nazwa='%{_nazwa}%';"
  490. update "UPDATE gildie SET Sojusze='%{_ally1}%' WHERE Nazwa='%{_gildia}%';"
  491. else:
  492. send "{@logo} &7Taka gildia nie istnieje!"
  493. else:
  494. send "{@logo} &7Nie mozesz zaprosic do sojusza swoja gildie"
  495. else:
  496. send "{@logo} &7Musisz podac nazwe gildii"
  497. else:
  498. send "{@logo} &7Nie jestes wlascicielem gildii"
  499. else:
  500. send "{@logo} &7Nie jestes w zadnej gildii"
  501. else:
  502. send "{@brakPermissions}"
  503.  
  504. command /pvp:
  505. trigger:
  506. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  507. if {Gildie::gracz::%player%::nazwaGildii} is set:
  508. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  509. if {Gildie::gracz::%player%::Stanowisko} is "Owner":
  510. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  511. if {Gildie::nazwa::%{_nazwa}%::pvp} is false:
  512. set {Gildie::nazwa::%{_nazwa}%::pvp} to true
  513. send "{@logo} &7Pomyslnie wlaczyles pvp miedzy czlonkami swojej gildii"
  514. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  515. if "%loop-value%" is not "%player%":
  516. send "{@logo} &7Gracz &6%player% &7wlaczyl pvp miedzy czlonkami w Twojej gildii" to "%loop-value%" parsed as player
  517. else:
  518. set {Gildie::nazwa::%{_nazwa}%::pvp} to false
  519. send "{@logo} Pomyslnie wylaczyles pvp miedzy czlonkami swojej gildii"
  520. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  521. if "%loop-value%" is not "%player%":
  522. send "{@logo} &7Gracz &6%player% &7wylaczyl pvp miedzy czlonkami w Twojej gildii" to "%loop-value%" parsed as player
  523. else:
  524. send "{@logo} &7Nie jestes wlascicielem gildii"
  525. else:
  526. send "{@logo} &7Nie jestes w zadnej gildii"
  527. else:
  528. send "{@brakPermissions}"
  529.  
  530. command /degraduj [<text>]:
  531. trigger:
  532. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  533. if {Gildie::gracz::%player%::nazwaGildii} is set:
  534. if {Gildie::gracz::%player%::Stanowisko} is "Owner":
  535. if arg 1 is set:
  536. set {_nick} to arg 1
  537. set {_nick} to {_nick} parsed as player
  538. if "%{_nick}%" is "%player%":
  539. send "{@logo} &7Nie mozesz awansowac samego siebie"
  540. stop
  541. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  542. if {Gildie::gracz::%{_nick}%::nazwaGildii} is {_nazwa}:
  543. if {Gildie::gracz::%{_nick}%::Stanowisko} is "Moderator":
  544. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  545. if "%loop-value%" is not "%player%":
  546. if "%loop-value%" is not "%{_nick}%":
  547. send "{@logo} &7Gracz &6%player% &7zdegradowal gracza &6%{_nick}% &7na stanowisko czlonka gildii" to "%loop-value%" parsed as player
  548. set {Gildie::gracz::%{_nick}%::Stanowisko} to "member"
  549. remove {_nick} from {Gildie::nazwa::%{_nazwa}%::moderatorzy::*}
  550. send "{@logo} &7Zdegradowales gracza &6%{_nick}% &7na stanowisko czlonka gildii"
  551. send "{@logo} &7Gracz &6%player% &7zdegradowal Ciebie na range czlonka gildii" to "%{_nick}%" parsed as player
  552. set {_Mistrzowie} to "%{Gildie::nazwa::%{_nazwa}%::moderatorzy::*}%"
  553. replace all " and " with ", " in {_Mistrzowie}
  554. replace all "<none>" with "" in {_Mistrzowie}
  555. update "UPDATE gildie SET Mistrzowie='%{_Mistrzowie}%' WHERE Nazwa='%{_nazwa}%';"
  556. update "UPDATE gracze SET pozycjaWGildi='%{Gildie::gracz::%{_nick}%::Stanowisko}%' WHERE Nick='%{_nick}%';"
  557. stop
  558. else:
  559. send "{@logo} &7Gracz &6%{_nick}% &7nie jest w Twojej gildii"
  560. else:
  561. send "{@logo} &7Musisz podac nick wyrzucanego gracza"
  562. else:
  563. send "{@logo} &7Nie jestes wlascicielem gildii %{_nazwa}%"
  564. else:
  565. send "{@logo} &7Nie jestes w zadnej gildii"
  566. else:
  567. send "{@brakPermissions}"
  568.  
  569. command /awans [<text>]:
  570. trigger:
  571. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  572. if {Gildie::gracz::%player%::nazwaGildii} is set:
  573. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  574. if {Gildie::gracz::%player%::Stanowisko} is "Owner":
  575. if arg 1 is set:
  576. set {_nick} to arg 1
  577. set {_nick} to {_nick} parsed as player
  578. if "%{_nick}%" is "%player%":
  579. send "{@logo} &7Nie mozesz awansowac samego siebie"
  580. stop
  581. if {Gildie::gracz::%{_nick}%::nazwaGildii} is {_nazwa}:
  582. if {Gildie::gracz::%{_nick}%::Stanowisko} is "Member":
  583. execute player command "g Moderator %{_nick}%"
  584. stop
  585. if {Gildie::gracz::%{_nick}%::Stanowisko} is "Moderator":
  586. execute player command "g owner %{_nick}%"
  587. stop
  588. #send "{@logo} &7Pomyslnie awansowales gracza &6%{_nick}% &7na range &6%{Gildie::gracz::%{_nick}%::Stanowisko}%"
  589. else:
  590. send "{@logo} &7Gracz &6%{_nick}% &7nie jest w Twojej gildii"
  591. else:
  592. send "{@logo} &7Musisz podac nick gracza"
  593. else:
  594. send "{@logo} &7Nie jestes wlascicielem gildii"
  595. else:
  596. send "{@logo} &7Nie jestes w zadnej gildii"
  597. else:
  598. send "{@brakPermissions}"
  599.  
  600. command /lider [<text>]:
  601. trigger:
  602. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  603. if {Gildie::gracz::%player%::nazwaGildii} is set:
  604. if {Gildie::gracz::%player%::Stanowisko} is "Owner":
  605. if arg 1 is set:
  606. set {_player} to player
  607. set {_nick} to arg 1
  608. set {_nick} to {_nick} parsed as player
  609. if "%{_nick}%" is "%player%":
  610. send "{@logo} &7Nie mozesz awansowac samego siebie"
  611. stop
  612. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  613. if {Gildie::gracz::%{_nick}%::nazwaGildii} is {_nazwa}:
  614. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  615. if "%loop-value%" is not "%player%":
  616. if "%loop-value%" is not "%{_nick}%":
  617. send "{@logo} &7Gracz &6%player% &7awansowal gracza &6%{_nick}% &7na stanowisko wlasciciela gildii" to "%loop-value%" parsed as player
  618. set {Gildie::gracz::%{_nick}%::Stanowisko} to "Owner"
  619. set {Gildie::gracz::%player%::Stanowisko} to "Moderator"
  620. set {Gildie::nazwa::%{_nazwa}%::Owner} to {_nick}
  621. add {_player} to {Gildie::nazwa::%{_nazwa}%::moderatorzy::*}
  622. remove {_nick} from {Gildie::nazwa::%{_nazwa}%::moderatorzy::*}
  623. send "{@logo} &7Awansowales gracza &6%{_nick}% &7na stanowisko wlasciciela gildii"
  624. send "{@logo} &7Gracz &6%player% &7awansowal Ciebie na range wlasciciela gildii" to "%{_nick}%" parsed as player
  625. set {_Mistrzowie} to "%{Gildie::nazwa::%{_nazwa}%::moderatorzy::*}%"
  626. replace all " and " with ", " in {_Mistrzowie}
  627. replace all "<none>" with "" in {_Mistrzowie}
  628. update "UPDATE gildie SET Lider='%{_nick}%', Mistrzowie='%{_Mistrzowie}%' WHERE Nazwa='%{_nazwa}%';"
  629. update "UPDATE gracze SET pozycjaWGildi='%{Gildie::gracz::%{_nick}%::Stanowisko}%' WHERE Nick='%{_nick}%';"
  630. update "UPDATE gracze SET pozycjaWGildi='%{Gildie::gracz::%player%::Stanowisko}%' WHERE Nick='%player%';"
  631. else:
  632. send "{@logo} &7Gracz &6%{_nick}% &7nie jest w Twojej gildii"
  633. else:
  634. send "{@logo} &7Musisz podac nick gracza"
  635. else:
  636. send "{@logo} &7Nie jestes wlascicielem gildii"
  637. else:
  638. send "{@logo} &7Nie jestes w zadnej gildii"
  639. else:
  640. send "{@brakPermissions}"
  641.  
  642. command /info [<text>]:
  643. trigger:
  644. if player have permissions "Gildie.Gracz" or "Gildie.Inv" or "Gildie.*":
  645. if arg 1 is set:
  646. set {_nazwa} to {Gildie::tag::%arg 1%::skrot}
  647. if arg 1 is not set:
  648. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  649. if {Gildie::nazwa::%{_nazwa}%::istnienie} is true:
  650. send "&6======================"
  651. send "&2Tag: &6%{Gildie::nazwa::%{_nazwa}%::skrot}%"
  652. send "&2Nazwa: &6%{_nazwa}%"
  653. send "&2Lider:&6 %{Gildie::nazwa::%{_nazwa}%::owner}%"
  654. set {_points} to 0
  655. set {_dziel} to 0
  656. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  657. set {_player} to loop-value
  658. set {_player} to {_player} parsed as player
  659. add {Gracz::%{_player}%::punkty} to {_points}
  660. add 1 to {_dziel}
  661. set {_p.g} to {_points}/{_dziel}
  662. set {_p.g} to {_p.g} parsed as number
  663. set {_p.g} to a round down {_p.g}
  664. send "&2Punkty: &7%{_p.g}%"
  665. set {_mody} to "%{Gildie::nazwa::%{_nazwa}%::moderatorzy::*}%"
  666. replace all " and " with ", " in {_mody}
  667. if {Gildie::nazwa::%{_nazwa}%::moderatorzy::*} is not set:
  668. set {_mody} to "Brak"
  669. if {Gildie::nazwa::%{_nazwa}%::moderatorzy::*} is empty:
  670. set {_mody} to "Brak"
  671. if {_mody} is not set:
  672. set {_mody} to "Brak"
  673. send "&2Zastepcy&8: &7%{_mody}%"
  674. set {_member} to "%{Gildie::nazwa::%{_nazwa}%::members::list::*}%"
  675. replace all " and " with ", " in {_member}
  676. if {Gildie::nazwa::%{_nazwa}%::members::list::*} is not set:
  677. set {_member} to "Brak"
  678. if {Gildie::nazwa::%{_nazwa}%::members::list::*} is empty:
  679. set {_member} to "Brak"
  680. if {_member} is not set:
  681. set {_member} to "Brak"
  682. send "&2Czlonkowie&7: %{_member}%"
  683. set {_ally} to "%{Gildie::nazwa::%{_nazwa}%::sojusznicy::*}%"
  684. replace all " and " with ", " in {_ally}
  685. if {Gildie::nazwa::%{_nazwa}%::sojusznicy::*} is not set:
  686. set {_ally} to "Brak"
  687. if {Gildie::nazwa::%{_nazwa}%::sojusznicy::*} is empty:
  688. set {_ally} to "Brak"
  689. send "&2Sojusznicy&7: %{_ally}%"
  690. set {_soj} to "%{Gildie::nazwa::%{_nazwa}%::propozycjaSojuszuLista::*}%"
  691. replace all " and " with ", " in {_soj}
  692. if {Gildie::nazwa::%{_nazwa}%::propozycjaSojuszuLista::*} is not set:
  693. set {_soj} to "Brak"
  694. if {Gildie::nazwa::%{_nazwa}%::propozycjaSojuszuLista::*} is empty:
  695. set {_soj} to "Brak"
  696. send "&2Prosby o sojusz&7: %{_soj}%"
  697. send "&6======================"
  698. else:
  699. send "{@logo} &7Gildia &6%{_nazwa}% nie istnieje"
  700. else:
  701. send "{@brakPermissions}"
  702.  
  703.  
  704.  
  705. on damage:
  706. if victim is player:
  707. if attacker is player:
  708. if {Gildie::gracz::%victim%::nazwaGildii} is {Gildie::gracz::%attacker%::nazwaGildii}:
  709. set {_nazwa} to {Gildie::gracz::%attacker%::nazwaGildii}
  710. if {Gildie::nazwa::%{_nazwa}%::pvp} is false:
  711. cancel event
  712. else:
  713. if location of block at location of victim is in any region:
  714. set {_loc} to location of block at location of victim
  715. set {_ID} to Region.getAt{{_loc}};
  716. if {Gildie::gracz::%victim%::nazwaGildii} is set:
  717. if {Gildie::gracz::%victim%::nazwaGildii} is {_ID}:
  718. if {Gildie::gracz::%attacker%::nazwaGildii} is set:
  719. if {Gildie::nazwa::%{Gildie::gracz::%attacker%::nazwaGildii}%::stosunki::%{Gildie::gracz::%victim%::nazwaGildii}%} is not "wojna":
  720. cancel event
  721. send "{@logo} Gracz %attacker% chcial Ciebie zaatakowac, jednak nie moze tego zrobic, poniewaz jestes na terutorium swojej gildii i nie macie miedzy soba wojny" to victim
  722. send "{@logo} Nie mozesz zaatakowac gracza %victim% bedac z nim w stanie wojny" to attacker
  723. #
  724. on break:
  725. set {_loc} to location of event-block
  726. set {_ID} to Region.getAt{{_loc}};
  727. if {_ID} is set:
  728. if event-block is enderdragon egg:
  729. set {_loc} to location of event-block
  730. set {_ID} to Region.getAt{{_loc}};
  731. if {_ID} is set:
  732. set {_center} to "%{_ID}%".Region.getCenter{};
  733. if {_center} is location of event-block:
  734. cancel event
  735. if "%{Gildie::gracz::%player%::nazwaGildii}%" is not "%{_ID}%":
  736. cancel event
  737. send "{@logo} &7To teren gildii &6%{_ID}% &7nie mozesz wiec tutaj niczego stawiac"
  738.  
  739. on quit:
  740. if {arena::gracz::%player%::czyGra} is true:
  741. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  742. remove 1 from {Gildie::nazwa::%{_nazwa}%::arena::IloscGraczy}
  743. on kick:
  744. if {arena::gracz::%player%::czyGra} is true:
  745. set {_nazwa} to {Gildie::gracz::%player%::nazwaGildii}
  746. remove 1 from {Gildie::nazwa::%{_nazwa}%::arena::IloscGraczy}
  747. On Piston Extend:
  748. set {_loc} to location of event-block
  749. set {_ID} to Region.getAt{{_loc}};
  750. if {_ID} is set:
  751. loop all blocks around event-location in radius 13:
  752. if loop-block is enderdragon egg:
  753. set {_center} to "%{_ID}%".Region.getCenter{};
  754. if {_center} is location of loop-block:
  755. cancel event
  756. stop
  757. #
  758. On block physics:
  759. if event-block is enderdragon egg:
  760. set {_loc} to location of event-block
  761. set {_ID} to Region.getAt{{_loc}};
  762. if {_ID} is set:
  763. set {_center} to "%{_ID}%".Region.getCenter{};
  764. if {_center} is location of event-block:
  765. cancel event
  766. #
  767. on right click:
  768. if event-block is enderdragon egg:
  769. set {_loc} to location of event-block
  770. set {_ID} to Region.getAt{{_loc}};
  771. if {_ID} is set:
  772. set {_center} to "%{_ID}%".Region.getCenter{};
  773. if {_center} is location of event-block:
  774. set {_tag} to {Gildie::nazwa::%{_ID}%::skrot}
  775. cancel event
  776. execute player command "info %{_tag}%"
  777.  
  778. on any move:
  779. set {_player} to player
  780. if {Gildie::gracz::%{_player}%::ostatniaLokalizacja} is not location of block at location of player:
  781. if "%{Gildie::gracz::%{_player}%::clHome}%" is "true":
  782. delete {Gildie::gracz::%{_player}%::clHome}
  783. set {Gildie::gracz::%{_player}%::ostatniaLokalizacja} to location of block at location of player
  784. if {Gildie::gracz::%{_player}%::ostatniRegion} is not set:
  785. set {Gildie::gracz::%{_player}%::ostatniRegion} to "0"
  786. set {_loc} to location of player
  787. set {_nazwa} to Region.getAt{{_loc}};
  788. if {_nazwa} is set:
  789. set {_nazwa2} to {Gildie::gracz::%{_player}%::nazwaGildii}
  790. set {Gildie::gracz::%player%::regionAktualny} to {Gildie::nazwa::%{_nazwa}%::skrot}
  791. if "1" is not "%{_nazwa}%":
  792. if "%{Gildie::gracz::%{_player}%::ostatniRegion}%" is not "%{_nazwa}%":
  793. if "%{Gildie::gracz::%{_player}%::nazwaGildii}%" is not "%{_nazwa}%":
  794. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  795. set {_ploop} to loop-value
  796. set {_ploop} to {_ploop} parsed as player
  797. set {_tag} to {Gildie::nazwa::%{_nazwa2}%::skrot}
  798. if {_tag} is set:
  799. set action bar of {_ploop} to "Gracz [%{_Tag}%] %player% Wszedl Na Teren Twojej gildii"
  800. else:
  801. set action bar of {_ploop} to "Gracz %player% Wszedl Na Teren Twojej gildii"
  802. set {_locP} to location of player
  803. set {_aaa} to {Gildie::region::%{_nazwa}%::locA}
  804. set {_locA} to location of block at {_aaa}
  805. set {_abc} to {Gildie::region::%{_nazwa}%::locC}
  806. set {_y} to y-coordinate of {_abc}
  807. set y-coordinate of {_locA} to {_y}
  808. set {_Dc} to distance between {_locA} and {_abc}
  809. set {_Dp} to distance between {_locP} and {_abc}
  810. set {_W} to {_Dp}/{_Dc}*100
  811. set {_procent} to rounded {_W}
  812. set {_procent} to rounded 100-{_procent}
  813. if {_procent} is between 0 and 10:
  814. set {Gildie::gracz::%player%::procentIkona} to "&c&l■&7&l■■■■■■■■■"
  815. if {_procent} is between 10 and 20:
  816. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■&7&l■■■■■■■■"
  817. if {_procent} is between 20 and 30:
  818. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&7&l■■■■■■■"
  819. if {_procent} is between 30 and 40:
  820. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&6&l■&7&l■■■■■■"
  821. if {_procent} is between 40 and 50:
  822. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&6&l■■&7&l■■■■■"
  823. if {_procent} is between 50 and 60:
  824. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&6&l■■■&7&l■■■■"
  825. if {_procent} is between 60 and 70:
  826. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&6&l■■■■&7&l■■■"
  827. if {_procent} is between 70 and 80:
  828. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&6&l■■■■&a&l■&7&l■■"
  829. if {_procent} is between 80 and 90:
  830. set {Gildie::gracz::%player%::procentIkona} to "&c&l■■■&6&l■■■■&a&l■■&7&l■"
  831. if {_procent} is between 90 and 100:
  832. set {Gildie::gracz::%player%::procentIkona} to "&a&l■■■■■■■■■■"
  833. if "%{Gildie::gracz::%{_player}%::nazwaGildii}%" is not "%{_nazwa}%":
  834. set {_nazwa1} to {_nazwa}
  835. set {_nazwa2} to {Gildie::gracz::%{_player}%::nazwaGildii}
  836. if {_nazwa1} is set:
  837. set {_tag} to "[%{Gildie::gildia::%{_nazwa1}%::skrot}%]"
  838. if {_nazwa2} is not set:
  839. set {Gildie::gracz::%player%::SidebarColdown} to true
  840. else:
  841. if "%{_nazwa1}%" is "%{_nazwa2}%":
  842. set {Gildie::gracz::%player%::SidebarColdown} to true
  843. else:
  844. if {Gildie::nazwa::%{_nazwa1}%::stosunki::%{_nazwa2}%} is not set:
  845. set {Gildie::gracz::%player%::SidebarColdown} to true
  846. else:
  847. if {Gildie::nazwa::%{_nazwa1}%::stosunki::%{_nazwa2}%} is "Sojusz":
  848. set {Gildie::gracz::%player%::SidebarColdown} to true
  849. else:
  850. set {Gildie::gracz::%player%::SidebarColdown} to true
  851. else:
  852. set {Gildie::gracz::%player%::SidebarColdown} to true
  853. set {Gildie::gracz::%{_player}%::ostatniRegion} to "%{_nazwa}%"
  854. else:
  855. set {_nazwa} to "%{Gildie::gracz::%{_player}%::ostatniRegion}%"
  856. set {Gildie::gracz::%{_player}%::ostatniRegion} to "0"
  857. if "%{_nazwa}%" is not "0":
  858. if "%{Gildie::gracz::%{_player}%::nazwaGildii}%" is not "%{_nazwa}%":
  859. loop {Gildie::nazwa::%{_nazwa}%::members::list::*}:
  860. set {_ploop} to loop-value
  861. set {_ploop} to {_ploop} parsed as player
  862. set {_tag} to {Gildie::nazwa::%{_nazwa2}%::skrot}
  863. if {_tag} is set:
  864. set action bar of {_ploop} to "Gracz [%{_Tag}%] %player% wyszedl z terenu Twojej gildii"
  865. else:
  866. set action bar of {_ploop} to "Gracz %player% wyszedl z terenu Twojej gildii"
  867. if "%{Gildie::gracz::%{_player}%::nazwaGildii}%" is not "%{_nazwa}%":
  868. set action bar of player to "&fWyszedles z terenu gildii %{_nazwa}%"
  869. delete {Gildie::gracz::%player%::SidebarColdown}
  870. else:
  871. set action bar of player to "&aWyszedles z terenu swojej gildii"
  872. delete {Gildie::gracz::%player%::SidebarColdown}
  873.  
  874. every 1 seconds:
  875. loop all players:
  876. if {Gildie::gracz::%loop-player%::SidebarColdown} is set:
  877. invoke "Gildie" from loop-player
  878. else:
  879. wipe loop-player's sidebar
  880.  
  881. every 1 seconds:
  882. loop {Gildie::regiony::lista::*}:
  883. set {_nazwa} to loop-value
  884. set {_loc} to {Gildie::region::%{_nazwa}%::locC}
  885. if {_loc} is set:
  886. create hologram "&4%{Gildie::nazwa::%{_nazwa}%::HP}%&6/&a%{Gildie::nazwa::%{_nazwa}%::MaxHP}%" at block above {_loc} for 1 seconds
  887. wait 1 seconds
  888. loop all players:
  889. set {_otagowany} to "%loop-player%" parsed as player
  890. loop all players:
  891. add 1 to {_cl}
  892. if {_cl} is greater than or equal to 1000:
  893. wait 0.1 second
  894. set {_cl} to 0
  895. set {_player} to "%loop-player-2%" parsed as player
  896. set {_nazwa} to {Gildie::gracz::%{_otagowany}%::nazwaGildii}
  897. set {_nazwa1} to {Gildie::gracz::%{_player}%::nazwaGildii}
  898. if {Gildie::gracz::%{_otagowany}%::nazwaGildii} is set:
  899. set {_tag} to "[%{Gildie::nazwa::%{_nazwa}%::skrot}%]"
  900. if {Gildie::gracz::%{_player}%::nazwaGildii} is not set:
  901. make {_player} see {_otagowany}'s prefix as "&c%{_tag}% "
  902. else:
  903. if {_nazwa} is not {_nazwa1}:
  904. if {Gildie::nazwa::%{_nazwa}%::stosunki::%{_nazwa1}%} is not set:
  905. make {_player} see {_otagowany}'s prefix as "&c%{_tag}% "
  906. else:
  907. if {Gildie::nazwa::%{_nazwa}%::stosunki::%{_nazwa1}%} is "Sojusz":
  908. make {_player} see {_otagowany}'s prefix as "&6%{_tag}% "
  909. else:
  910. make {_player} see {_otagowany}'s prefix as "&d%{_tag}% "
  911. else:
  912. make {_player} see {_otagowany}'s prefix as "&a%{_tag}% "
  913. else:
  914. if {_nazwa} is not set:
  915. make {_player} see {_otagowany}'s prefix as "&f"
  916. else:
  917. make {_player} see {_otagowany}'s prefix as "&f"
  918.  
  919. On explosion prime:
  920. set {_loc} to location of event-location
  921. set {_nazwa} to Region.getAt{{_loc}};
  922. if {_nazwa} is set:
  923. if difference between {Gildie::nazwa::%{_nazwa}%::DataZalozenia} and now is smaller than 1 day:
  924. cancel event
  925. if event-entity is a tnt:
  926. set {_czas} to difference between {Gildie::nazwa::%{_nazwa}%::DataZalozenia} and now
  927. set {_czas} to difference between {_czas} and 1 day
  928. set {_czas} to "%{_czas}%"
  929. replace all "seconds" with "sekund" in {_czas}
  930. replace all "second" with "sekunda" in {_czas}
  931. replace all "minutes" with "minut" in {_czas}
  932. replace all "minute" with "minuta" in {_czas}
  933. replace all "hours" with "godzin" in {_czas}
  934. replace all "hour" with "godzina" in {_czas}
  935. replace all "days" with "dni" in {_czas}
  936. replace all "day" with "dzien" in {_czas}
  937. replace all "months" with "miesiecy" in {_czas}
  938. replace all "month" with "miesiac" in {_czas}
  939. replace all "and" with "i" in {_czas}
  940. loop all players in radius 10 around event-entity:
  941. send "%{gildie::tag::config}% &7Tnt nie wybuchlo poniewaz gildia jest jeszcze pod okresem ochronnym przez &6%{_czas}%" to loop-player
  942. if event-entity is a creeper:
  943. set {_loc} to location of event-entity
  944. delete event-entity
  945. create a safe explosion of force 3 at {_loc}
  946. else:
  947. send "5" to all players
  948. set {Gildie::nazwa::%{_nazwa}%::blokadaBudowyTNT} to now
  949. wait 60 seconds
  950. delete {Gildie::nazwa::%{_nazwa}%::blokadaBudowyTNT}
  951.  
  952. on place:
  953. set {_loc} to location of event-location
  954. set {_nazwa} to Region.getAt{{_loc}};
  955. if {_nazwa} is set:
  956. if event-block is enderdragon egg:
  957. set {_center} to "%{_ID}%".Region.getCenter{};
  958. if {_center} is location of event-block:
  959. cancel event
  960. set {_player} to player
  961. if "%{Gildie::gracz::%player%::bypass}%" is not "true":
  962. if "%{Gildie::gracz::%{_player}%::nazwaGildii}%" is not "%{_nazwa}%":
  963. if event-block is not tnt:
  964. cancel event
  965. send "%{gildie::tag::config}% &7To nie Twoj teren, wiec nie mozesz tutaj nic stawiac za wyjatkiem bloku TNT"
  966. stop
  967. if {Gildie::nazwa::%{_nazwa}%::blokadaBudowyTNT} is set:
  968. cancel event
  969. set {_czas} to difference between {Gildie::nazwa::%{_nazwa}%::blokadaBudowyTNT} and now
  970. set {_czas} to difference between {_czas} and 1 minute
  971. set {_czas} to "%{_czas}%"
  972. replace all "seconds" with "sekund" in {_czas}
  973. replace all "second" with "sekunda" in {_czas}
  974. replace all "minutes" with "minut" in {_czas}
  975. replace all "minute" with "minuta" in {_czas}
  976. replace all "hours" with "godzin" in {_czas}
  977. replace all "hour" with "godzina" in {_czas}
  978. replace all "days" with "dni" in {_czas}
  979. replace all "day" with "dzien" in {_czas}
  980. replace all "months" with "miesiecy" in {_czas}
  981. replace all "month" with "miesiac" in {_czas}
  982. replace all "and" with "i" in {_czas}
  983. send "%{gildie::tag::config}% Po wybuchu TNT gracze w gildii nie moga budwac przez %{_czas}%"
  984. stop
  985.  
  986. sub "Gildie":
  987. wipe parameter 1's sidebar
  988. set name of sidebar of parameter 1 to " &9&lElderHC.pl "
  989. set score "" in sidebar of parameter 1 to 4
  990. set score "&f&l%{Gildie::gracz::%parameter 1%::regionAktualny}%" in sidebar of parameter 1 to 3
  991. set score " " in sidebar of parameter 1 to 2
  992. set score "%{Gildie::gracz::%parameter 1%::procentIkona}%" in sidebar of parameter 1 to 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement