GrimoN

BattleGuild V.0.0.2 BETA FreeVIP

Apr 14th, 2015
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 200.52 KB | None | 0 0
  1. # ============================================================================================================================================================================= #
  2. # ==================================================================== GuildBattles 0.0.2 BETA ================================================================================ #
  3. # ============================================================================================================================================================================= #
  4. # ================================================= Konfiguracja, po zmianie czegoś zapisz plik, następnie zrestartuj serwer. ================================================= #
  5. # ============================================================================================================================================================================= #
  6. options:
  7. Tag: &2[&6Guild&4Battles&2]&f # Prefix przed wiadomością #
  8. startSlot: 4 # Początkowa ilość slotów po założeniu gildii #
  9. startGold: 100 # Początkowa ilość złota po założeniu gildii #
  10. startMana: 10 # Początkowa ilość many po założeniu gildii #
  11. startWood: 0 # Początkowa ilość drewna po założeniu gildii #
  12. startIron: 0 # Początkowa ilość żelaza po założeniu gildii #
  13. startHonor: 1000 # Początkowa ilość honoru po zalożeniu gildii #
  14. warEnable: true # Wlaczyc wojny? (true/false)
  15. warKills: 50 # Do ilu zabójst prowadzona jest wojna
  16. warHonorRequired: 1200 # Wymagana ilosc punktów honoru na wojne
  17. warPlayersRequired: 1 # Wymagana liczba graczy na wojne
  18. # Nagrody za wygranie wojny
  19. warGoldReward: 100 # Złota za wygraną
  20. warManaReward: 50 # Many za wygraną
  21. warWoodReward: 100 # Drewna za wygraną
  22. warIronReward: 50 # Żelaza za wygraną
  23. warHonorReward: 150 # Punktów honoru za wygraną
  24. # Nagrody za zabósjtwo gracza na wojnie
  25. warKillGoldReward: 0 # Złota za zabójstwo
  26. warKillManaReward: 0 # Many za zabójstwo
  27. warKillWoodReward: 0 # Drewna za zabójstwo
  28. warKillIronReward: 0 # Żelaza za zabójstwo
  29. warKillHonorReward: 15 # Punktów honoru za zabójstwo
  30. # Nagrody za remis
  31. warRemisGoldReward: 0 # Złota za zabójstwo
  32. warRemisManaReward: 0 # Many za zabójstwo
  33. warRemisWoodReward: 0 # Drewna za zabójstwo
  34. warRemisIronReward: 0 # Żelaza za zabójstwo
  35. warRemisHonorReward: 25 # Punktów honoru za zabójstwo
  36. warLoseHonor: 100 # Strata punktow honoru po przegranej wojnie
  37. #Cuboidy
  38. enableCuboids: true # Wlaczyc cuboidy ? (true/false)
  39. Cuboid: 50 # Rozmiar cuboida
  40. cubSpawnDist: 200 # Odleglosc od punktu /spawn
  41. cubOtherDist: 150 # Odelglosc od innej gildi (polecam rozmiar cuboida+100)
  42. enableHomes: true # Wlaczyc teleportacje do gildii przez /g dom? (true/false)
  43. enableSetHomes: true #Wlaczyc usawienie pozycji /g dom ? (true/false)
  44. teleportCooldown: 5 # Jak dlugo czekac na teleport? (w sekundach)
  45. openChests: false # Czy inna gildia moze otwierac skrzynki, piece itp. na terenie innych gildii? (true/false)
  46. # Podbijanie gildii
  47. guildDestroy: true # Czy wlaczyc podbijanie gildii? (true/false)
  48. lifeEgg: 30 # Zycie jajka
  49. eggDamage: 3 # Obrazenia zadawane jajku
  50. eggExplodeDamage: 20 # Obrazenia zadane jajku przez tnt lub creepera
  51. dropMaterials: true # Czy surowce po podbiciu enemy gildii trafiaja na konto gildii. (true/false)
  52. dropChance: 17.5 # Szanse na przejecie surowcow przeciwnej gildii. (bez procenta)
  53. #
  54. guildPvp: true # Pvp między członkami gildii. (true/false)
  55. # TNT
  56. tntDestroy: true # TNT ma niszczyc obsydian i wode? (true/false)
  57. tntChance: 5.7 # Szansa na zniszczenie obsydianu (bez procenta)
  58. # Antylogout
  59. antyLog: true # Czy wlaczy AntyLogout (true/false)
  60. antyLogType: "dropeq" # Kara za wylogowanie sie podczas walki. (death/dropeq)
  61. antyLogTime: 15 # Czas przez ktory nie mozna sie wylogowac. (w sekundach)
  62. #
  63. explodeBlock: true # Blokada budowania/niszczenia podczas wybuchy TNT lub Creepera na terenie gildii. (true/false)
  64. explodeTime: 10 # Czas przez jaki nie moze budowac/niszczyc po wybuchu tnt. (w sekundach)
  65. # ============================================================================================================================================================================= #
  66. # ========================================================== Kod skryptu, jesli sie nie znasz to nie ruszaj :) ================================================================ #
  67. # ============================================================================================================================================================================= #
  68. # =============================================================================== Kod ========================================================================================= #
  69. # ============================================================================================================================================================================= #
  70. command /GuildBattles [<text>] [<text>] [<text>]:
  71. aliases: g, gb, gildia, f, guild, guilds, gildie
  72. trigger:
  73. # ============================================================================================================================================================================= #
  74. # ============================================================================== Inne: ======================================================================================== #
  75. # ============================================================================================================================================================================= #
  76. if arg 1 is not "zaloz" or "create" or "usun" or "delete" or "disband" or "rozwiaz" or "stworz" or "wyjdz" or "opusc" or "exit" or "leave" or "info" or "informacje" or "wplac" or "zapros" or "dodaj" or "ivite" or "dolacz" or "join" or "wyrzuc" or "kick" or "zbuduj" or "build" or "magazyn" or "storage" or "surowce" or "zasoby" or "budynki" or "budowle" or "zaproszenia" or "invites" or "help" or "pomoc" or "chat" or "wojna" or "walka" or "bitwa" or "war" or "battle" or "opis" or "desc" or "description" or "ukoncz" or "complete" or "alchemia" or "dom" or "home" or "fixhome" or "naprawdom" or "sethome" or "ustawdom" or "degradacja" or "degrad" or "awans":
  77. send "{@Tag}: Nie ma takiej komendy. /GuildBattles Pomoc."
  78. stop
  79. if arg 1 is not set:
  80. if player has permission "gb.help" or "gb.*":
  81. send "&f==========&6Guild&4Battles&f=========="
  82. send "{@Tag}: /GuildBattles Zaloz [<Nazwa>] [<Tag>] - Tworzy gildie."
  83. send "{@Tag}: /GuildBattles Usun - Usuwa gildie."
  84. send "{@Tag}: /GuildBattles Opis [<Opis>] - Ustawia opis gildii."
  85. send "{@Tag}: /GuildBattles Zapros [<Gracz>] - Zaprasza gracza do gildii."
  86. send "{@Tag}: /GuildBattles Dolacz [<Gildia>] - Akceptuje zaproszenie do gildii."
  87. send "{@Tag}: /GuildBattles Wyrzuc [<Gracz>] - Wyrzuca gracza z gildii."
  88. send "{@Tag}: /GuildBattles Opusc - Opuszcza gildie."
  89. send "{@Tag}: /GuildBattles Dom - Teleportuje do domu gildii."
  90. send "{@Tag}: /GuildBattles UstawDom - Ustawia dom gildii."
  91. send "{@Tag}: /GuildBattles NaprawDom - Resetuje lokalizacje domu."
  92. send "{@Tag}: /GuildBattles Info - Informacje o gildii."
  93. send "{@Tag}: /GuildBattles Zbuduj [<Budynek>] - Rozpoczyna budowe budynku."
  94. send "{@Tag}: /GuildBattles Ukoncz [<Budynek>] - Konczy budowe budynku."
  95. send "{@Tag}: /GuildBattles Zasoby - Zasoby gildii."
  96. send "{@Tag}: /GuildBattles Budynki - Lista budynkow gildii."
  97. send "{@Tag}: /GuildBattles Zaproszenia - Wyswietla zaproszenia gracza do gildii."
  98. send "{@Tag}: /GuildBattles Chat - Wlacza lub wylacza czat dla gildii."
  99. send "{@Tag}: Strona 2 - /GuildBattles Pomoc 2"
  100. send "&f==========&6Guild&4Battles&f=========="
  101. else:
  102. send "{@Tag}: Nie masz do tego uprawnien."
  103. stop
  104. if arg 1 is "help" or "pomoc":
  105. if arg 2 is not set:
  106. if player has permission "gb.help" or "gb.*":
  107. send "&f==========&6Guild&4Battles&f=========="
  108. send "{@Tag}: /GuildBattles Zaloz [<Nazwa>] [<Tag>] - Tworzy gildie."
  109. send "{@Tag}: /GuildBattles Usun - Usuwa gildie."
  110. send "{@Tag}: /GuildBattles Opis [<Opis>] - Ustawia opis gildii."
  111. send "{@Tag}: /GuildBattles Zapros [<Gracz>] - Zaprasza gracza do gildii."
  112. send "{@Tag}: /GuildBattles Dolacz [<Gildia>] - Akceptuje zaproszenie do gildii."
  113. send "{@Tag}: /GuildBattles Wyrzuc [<Gracz>] - Wyrzuca gracza z gildii."
  114. send "{@Tag}: /GuildBattles Opusc - Opuszcza gildie."
  115. send "{@Tag}: /GuildBattles Dom - Teleportuje do domu gildii."
  116. send "{@Tag}: /GuildBattles UstawDom - Ustawia dom gildii."
  117. send "{@Tag}: /GuildBattles NaprawDom - Resetuje lokalizacje domu."
  118. send "{@Tag}: /GuildBattles Info - Informacje o gildii."
  119. send "{@Tag}: /GuildBattles Zbuduj [<Budynek>] - Rozpoczyna budowe budynku."
  120. send "{@Tag}: /GuildBattles Ukoncz [<Budynek>] - Konczy budowe budynku."
  121. send "{@Tag}: /GuildBattles Zasoby - Zasoby gildii."
  122. send "{@Tag}: /GuildBattles Budynki - Lista budynkow gildii."
  123. send "{@Tag}: /GuildBattles Zaproszenia - Wyswietla zaproszenia gracza do gildii."
  124. send "{@Tag}: /GuildBattles Chat - Wlacza lub wylacza czat dla gildii."
  125. send "{@Tag}: Strona 2 - /GuildBattles Pomoc 2"
  126. send "&f==========&6Guild&4Battles&f=========="
  127. else:
  128. send "{@Tag}: Nie masz do tego uprawnien."
  129. stop
  130. if arg 2 is "1":
  131. if player has permission "gb.help" or "gb.*":
  132. execute player command "/g help"
  133. else:
  134. send "{@Tag}: Nie masz do tego uprawnien."
  135. stop
  136. if arg 2 is "2":
  137. if player has permission "gb.help" or "gb.*":
  138. send "&f==========&6Guild&4Battles&f=========="
  139. send "{@Tag}: /GuildBattles Chat Ustaw - Daje mozliwosc wlaczenia czatu dla gildii."
  140. send "{@Tag}: /GuildBattles Alchemia - Otwiera sklep z efektami dla gildii."
  141. send "{@Tag}: /GuildBattles Wojna [<Wypowiedz/Akceptuj/Zakoncz/Info>] - Akcje zwiazane z wojnami gildii."
  142. send "{@Tag}: /GuildBattles Awans [<Gracz>] - Awansuje gracza z rang Rekrut->Czlonek->Dowodca."
  143. send "{@Tag}: /GuildBattles Degrad [<Gracz>] - Degraduje gracza z rang Dowodca->Czlonek->Rekrut."
  144. send "{@Tag}: /GuildBattles Wplac [<Surowiec>] [<Ilosc>] - Wplaca dowolna ilosc surowca do gildii."
  145. send "&f==========&6Guild&4Battles&f=========="
  146. else:
  147. send "{@Tag}: Nie masz do tego uprawnien."
  148. stop
  149. # ============================================================================================================================================================================= #
  150. # ===================================================================== Tworzenie gildii: ===================================================================================== #
  151. # ============================================================================================================================================================================= #
  152. if arg 1 is "zaloz" or "stworz" or "create":
  153. if player has permission "gb.create" or "gb.*":
  154. if {gb::gNamePlayer::%player%} is not set:
  155. if arg 2 is set:
  156. if {gb::Name::%arg 2%} is not set:
  157. if length of arg 2 is greater or equal to 4:
  158. if length of arg 2 is smaller or equal to 12:
  159. if arg 3 is set:
  160. if length of arg 3 is greater or equal to 3:
  161. if length of arg 3 is smaller or equal to 4:
  162. if {@enableCuboids} is false:
  163. add arg 2 to {gb::gName::*}
  164. set {gb::gNamePlayer::%player%} to arg 2
  165. create file "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  166. add player to {gb::gPlayers::%arg 2%::*}
  167. set {gb::gMagazyn::Mana::%arg 2%} to 500
  168. set {gb::gMagazyn::Gold::%arg 2%} to 500
  169. set {gb::gMagazyn::Wood::%arg 2%} to 500
  170. set {gb::gMagazyn::Iron::%arg 2%} to 500
  171. set {gb::Name::%arg 2%} to arg 2
  172. wf "Name: '%arg 2%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  173. wf "Tag: '%arg 3%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  174. wf "Lider: '%player%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  175. wf "Desc: '&fUstaw opis. &6/GuildBattles Opis [<Opis>]'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  176. wf "Gold: '{@startGold}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  177. wf "Mana: '{@startMana}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  178. wf "Wood: '{@startWood}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  179. wf "Iron: '{@startIron}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  180. wf "Honor: '{@startHonor}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  181. wf "Efekt: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  182. wf "MaxSlots: '{@startSlot}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  183. wf "Players: '1'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  184. wf "Chat: 'Off'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  185. wf "Ratusz: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  186. wf "Magazyn: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  187. wf "Tartak: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  188. wf "Alchemik: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  189. wf "Wojna: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  190. broadcast "{@Tag}: Gracz &6%name of player%&f zalozyl gildie &6%arg 2%&f."
  191. stop
  192. if {@enableCuboids} is true:
  193. if distance between player and spawn is greater or equal to {@cubSpawnDist}:
  194. if {gb::gName::*} is not set:
  195. set {gb::gCuboidCenter::spawn} to location of spawn
  196. add "spawn" to {gb::gName::*}
  197. loop {gb::gName::*}:
  198. if distance between player and {gb::gCuboidCenter::%loop-value%} is greater or equal to {@cubOtherDist}:
  199. add arg 2 to {gb::gName::*}
  200. set {gb::gNamePlayer::%player%} to arg 2
  201. create file "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  202. add player to {gb::gPlayers::%arg 2%::*}
  203. set {gb::gMagazyn::Mana::%arg 2%} to 500
  204. set {gb::gMagazyn::Gold::%arg 2%} to 500
  205. set {gb::gMagazyn::Wood::%arg 2%} to 500
  206. set {gb::gMagazyn::Iron::%arg 2%} to 500
  207. set {gb::gCubiudCenter::%arg 2%} to location of player
  208. set {gb::gHome::%arg 2%} to location above {gb::gCubiudCenter::%arg 2%}
  209. set {gb::Name::%arg 2%} to arg 2
  210. "%arg 2%".Region.selectLS{{gb::gCubiudCenter::%arg 2%}, {@Cuboid}};
  211. wf "Name: '%arg 2%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  212. wf "Tag: '%arg 3%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  213. wf "Lider: '%player%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  214. wf "Desc: '&fUstaw opis. &6/GuildBattles Opis [<Opis>]'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  215. wf "Gold: '{@startGold}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  216. wf "Mana: '{@startMana}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  217. wf "Wood: '{@startWood}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  218. wf "Iron: '{@startIron}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  219. wf "Honor: '{@startHonor}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  220. wf "Efekt: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  221. wf "MaxSlots: '{@startSlot}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  222. wf "Players: '1'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  223. wf "Chat: 'Off'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  224. wf "Ratusz: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  225. wf "Magazyn: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  226. wf "Tartak: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  227. wf "Alchemik: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  228. wf "Wojna: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  229. if {@guildDestroy} is true:
  230. set block at location of player to dragon egg
  231. set block below location of player to bedrock
  232. set {gb::eggLife::%arg 2%} to {@lifeEgg}
  233. broadcast "{@Tag}: Gracz &6%name of player%&f zalozyl gildie &6%arg 2%&f."
  234. stop
  235. else:
  236. send "{@Tag}: Jestes zbyt blisko innej gildii."
  237. stop
  238. else:
  239. send "{@Tag}: Jestes zbyt blisko spawna."
  240. stop
  241. else:
  242. send "{@Tag}: Liczba znakow w tagu nie moze przekraczac 4."
  243. stop
  244. else:
  245. send "{@Tag}: Liczba znakow w tagu nie moze byc mniejsza niz 3."
  246. stop
  247. else:
  248. send "{@Tag}: Musisz podac tag gildii."
  249. stop
  250. else:
  251. send "{@Tag}: Liczba znakow w nazwie nie moze przekraczac 12."
  252. stop
  253. else:
  254. send "{@Tag}: Liczba znakow w nazwie nie moze byc mniejsza niz 4."
  255. stop
  256. else:
  257. send "{@Tag}: Taka gildia juz istnieje."
  258. stop
  259. else:
  260. send "{@Tag}: Musisz podac nazwe gildii."
  261. stop
  262. else:
  263. send "{@Tag}: Jestes juz w gildii."
  264. stop
  265. else:
  266. send "{@Tag}: Nie masz do tego uprawnien."
  267. stop
  268. # ============================================================================================================================================================================= #
  269. # ===================================================================== Teleportacja do gildii: =============================================================================== #
  270. # ============================================================================================================================================================================= #
  271. if arg 1 is "dom" or "home":
  272. if player has permission "gb.home" or "gb.*":
  273. if {@enableCuboids} is true:
  274. if {@enableHomes} is true:
  275. if {gb::gNamePlayer::%player%} is set:
  276. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  277. if {teleport::%player%} is not set:
  278. set {teleport::%player%} to true
  279. set {_pos::%player%} to position of player
  280. send "{@Tag}: Teleportuje... Czekaj {@teleportCooldown} sekund. Nie zmieniaj swojej lokalizacji."
  281. loop {@teleportCooldown} times:
  282. wait 1 second
  283. if position of player is not {_pos::%player%}:
  284. clear {teleport::%player%}
  285. send "{@Tag}: Poruszyles sie, teleportacja anulowana."
  286. stop
  287. if position of player is {_pos::%player%}:
  288. if {teleport::%player%} is true:
  289. set {_pozostalo::%player%} to "%{@teleportCooldown}-loop-number%"
  290. send "{@Tag}: Pozostalo: &6%{_pozostalo::%player%}% &fsekund/a."
  291. add 1 to {_teleport::%player%}
  292. else:
  293. stop
  294. if {_teleport::%player%} is {@teleportCooldown}:
  295. if {teleport::%player%} is true:
  296. clear {teleport::%player%}
  297. if block under {gb::gHome::%{gb::gNamePlayer::%player%}%} isn't air or lava:
  298. if block at {gb::gHome::%{gb::gNamePlayer::%player%}%} is air:
  299. if block above {gb::gHome::%{gb::gNamePlayer::%player%}%} is air:
  300. if {gb::AntyLog::%player%} is not set:
  301. send "{@Tag}: Teleportuje..."
  302. wait 2 tick
  303. teleport player to {gb::gHome::%{gb::gNamePlayer::%player%}%}
  304. stop
  305. else:
  306. stop
  307. else:
  308. send "{@Tag}: Twoj dom jest niedostepny. Wpisz /g fixhome"
  309. stop
  310. else:
  311. send "{@Tag}: Twoj dom jest niedostepny. Wpisz /g fixhome"
  312. stop
  313. else:
  314. send "{@Tag}: Twoj dom jest niedostepny. Wpisz /g fixhome"
  315. stop
  316. else:
  317. send "{@Tag}: Juz sie teleportujesz."
  318. stop
  319. else:
  320. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  321. clear {gb::gNamePlayer::%player%}
  322. else:
  323. send "{@Tag}: Nie nalezysz do zadnej gildii."
  324. stop
  325. else:
  326. send "{@Tag}: Ta opcja jest wylaczona."
  327. stop
  328. else:
  329. send "{@Tag}: Ta opcja jest wylaczona."
  330. stop
  331. else:
  332. send "{@Tag}: Nie masz do tego uprawnien."
  333. stop
  334. # ============================================================================================================================================================================= #
  335. # ===================================================================== Ustawianie domu gildii: =============================================================================== #
  336. # ============================================================================================================================================================================= #
  337. if arg 1 is "sethome" or "ustawdom":
  338. if player has permission "gb.sethome" or "gb.*":
  339. if {@enableCuboids} is true:
  340. if {@enableHomes} is true:
  341. if {gb::gNamePlayer::%player%} is set:
  342. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  343. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  344. if {_Lider::%player%} is "%player%":
  345. if location of player is in any region:
  346. set {_region::%player%} to Region.getAt{location of player};
  347. if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
  348. if block at player isn't lava:
  349. if block under player isn't lava:
  350. if block under player isn't air:
  351. set {gb::gHome::%{gb::gNamePlayer::%player%}%} to location of player
  352. send "{@Tag}: Pomyslnie ustawiono nowy dom."
  353. stop
  354. else:
  355. send "{@Tag}: Nie mozesz ustawic domu, gdy nie stoisz na ziemi"
  356. stop
  357. else:
  358. send "{@Tag}: Nie mozesz ustawic domu, gdy pod toba jest lava."
  359. stop
  360. else:
  361. send "{@Tag}: Nie mozesz ustawic domu, gdy jestes w lavie."
  362. stop
  363. else:
  364. send "{@Tag}: Nie jestes na swoim terenie gildii."
  365. stop
  366. else:
  367. send "{@Tag}: Nie jestes na swoim terenie gildii."
  368. stop
  369. else:
  370. send "{@Tag}: Nie jestes liderem tej gildii."
  371. stop
  372. else:
  373. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  374. clear {gb::gNamePlayer::%player%}
  375. else:
  376. send "{@Tag}: Nie nalezysz do zadnej gildii."
  377. stop
  378. else:
  379. send "{@Tag}: Ta opcja jest wylaczona."
  380. stop
  381. else:
  382. send "{@Tag}: Ta opcja jest wylaczona."
  383. stop
  384. else:
  385. send "{@Tag}: Nie masz do tego uprawnien."
  386. stop
  387. # ============================================================================================================================================================================= #
  388. # ===================================================================== Naprawianie domu gildii: ============================================================================== #
  389. # ============================================================================================================================================================================= #
  390. if arg 1 is "fixhome" or "naprawdom":
  391. if player has permission "gb.fixhome" or "gb.*":
  392. if {@enableCuboids} is true:
  393. if {@enableHomes} is true:
  394. if {gb::gNamePlayer::%player%} is set:
  395. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  396. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  397. if {_Lider::%player%} is "%player%":
  398. set {gb::gHome::%{gb::gNamePlayer::%player%}%} to block above {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%}
  399. send "{@Tag}: Pomyslnie zresetowano dom."
  400. stop
  401. else:
  402. send "{@Tag}: Nie jestes liderem tej gildii."
  403. stop
  404. else:
  405. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  406. clear {gb::gNamePlayer::%player%}
  407. else:
  408. send "{@Tag}: Nie nalezysz do zadnej gildii."
  409. stop
  410. else:
  411. send "{@Tag}: Ta opcja jest wylaczona."
  412. stop
  413. else:
  414. send "{@Tag}: Ta opcja jest wylaczona."
  415. stop
  416. else:
  417. send "{@Tag}: Nie masz do tego uprawnien."
  418. stop
  419. # ============================================================================================================================================================================= #
  420. # ===================================================================== Usuwanie gildii: ====================================================================================== #
  421. # ============================================================================================================================================================================= #
  422. if arg 1 is "usun" or "delete" or "disband" or "rozwiaz":
  423. if player has permission "gb.delete" or "gb.*":
  424. if arg 2 is not set:
  425. if arg 3 is not set:
  426. if {gb::gNamePlayer::%player%} is set:
  427. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  428. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  429. if {_Lider::%player%} is "%player%":
  430. set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  431. if {@enableCuboids} is true:
  432. "%{gb::gNamePlayer::%player%}%".Region.delete{};
  433. if {@guildDestroy} is true:
  434. loop blocks in radius 3 of {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%}:
  435. if loop-block is bedrock:
  436. add 1 to {_bedrock::%player%}
  437. if {_bedrock::%player%} is 1:
  438. set block below {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%} to air
  439. set block at {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%} to air
  440. clear {gb::eggLife::%{gb::gNamePlayer::%player%}%}
  441. clear {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%}
  442. if "%{_Efekt::%player%}%" is "Regen I" or "Regen II":
  443. loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
  444. set {_x::%player%} to loop-value parsed as player
  445. remove regeneration from {_x::%player%}
  446. if {@warEnable} is true:
  447. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  448. if {_Wojna::%player%} isn't "Brak":
  449. set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
  450. loop {gb::gName::*}:
  451. if {gb::gWarInvites::%loop-value%::*} contain "%{gb::gNamePlayer::%player%}%":
  452. remove "%{gb::gNamePlayer::%player%}%" from {gb::gWarInvites::%loop-value%::*}
  453. clear {gb::gWarInvites::%{gb::gNamePlayer::%player%}%::*}
  454. remove {gb::gNamePlayer::%player%} from {gb::gName::*}
  455. clear {gb::Efekt::TimeOut::%{gb::gNamePlayer::%player%}%}
  456. clear {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}
  457. clear {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}
  458. clear {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}
  459. clear {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}
  460. clear {gb::gHome::%{gb::gNamePlayer::%player%}%}
  461. clear {gb::Name::%{gb::gNamePlayer::%player%}%}
  462. set {_name::%player%} to {gb::gNamePlayer::%player%}
  463. broadcast "{@Tag}: Gracz &6%name of player%&f rozwiazal gildie &6%{gb::gNamePlayer::%player%}%&f."
  464. df "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  465. loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
  466. clear {gb::gNamePlayer::%loop-value%}
  467. clear {gb::gRank::%loop-value%}
  468. delete {gb::gPlayers::%{_name::%player%}%::*}
  469. else:
  470. send "{@Tag}: Nie jestes liderem tej gildii."
  471. stop
  472. else:
  473. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  474. clear {gb::gNamePlayer::%player%}
  475. else:
  476. send "{@Tag}: Nie jestes w zadnej gidlii."
  477. stop
  478. else:
  479. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Usun"
  480. stop
  481. else:
  482. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Usun"
  483. stop
  484. else:
  485. send "{@Tag}: Nie masz do tego uprawnien."
  486. stop
  487. # ============================================================================================================================================================================= #
  488. # ===================================================================== Informacje o gildii: ================================================================================== #
  489. # ============================================================================================================================================================================= #
  490. if arg 1 is "info" or "informacje":
  491. if player has permission "gb.info" or "gb.*":
  492. if arg 3 is not set:
  493. if arg 2 is not set:
  494. if {gb::gNamePlayer::%player%} is set:
  495. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  496. send "&f=======&6Informacje &4o gildii&f======="
  497. set {_Name::%player%} to single value "Name" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  498. send "&2Nazwa: &6%{_Name::%player%}%"
  499. set {_Tag::%player%} to single value "Tag" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  500. send "&2Tag: &6%{_Tag::%player%}%"
  501. set {_Desc::%player%} to single value "Desc" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  502. send "&2Opis: &6%{_Desc::%player%}%"
  503. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  504. send "&2Lider: &6%{_Lider::%player%}%"
  505. set {_gracze} to "%{gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}%"
  506. if {_gracze} contain " and":
  507. replace all " and" with "," in {_gracze}
  508. send "&2Czlonkowie: &6%{_gracze}%"
  509. loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
  510. if loop-value is online:
  511. add "%loop-value%" to {_online::*}
  512. set {_online} to "%{_online::*}%"
  513. if {_online} is empty:
  514. add "&fBrak" to {_online}
  515. replace all " and" with "," in {_online}
  516. send "&2Online: &6%{_online}%"
  517. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  518. send "&2Punkty honoru: &6%{_Honor::%player%}%"
  519. set {_Slots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  520. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  521. send "&2Miejsca: &6%{_Players::%player%}%&2/&6%{_Slots::%player%}%"
  522. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  523. send "&2Wojna: &6%{_Wojna::%player%}%"
  524. if {@enableCuboids} is true:
  525. if {@guildDestroy} is true:
  526. send "&2Zycie jajka: &6%{gb::eggLife::%{gb::gNamePlayer::%player%}%}%"
  527. else:
  528. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  529. clear {gb::gNamePlayer::%player%}
  530. else:
  531. send "{@Tag}: Nie nalezysz do zadnej gildii."
  532. stop
  533. if arg 2 is "%{gb::gNamePlayer::%player%}%":
  534. execute player command "/gb info"
  535. stop
  536. else:
  537. if {gb::Name::%arg 2%} is set:
  538. send "&f=======&6Informacje &4o gildii&f======="
  539. set {_Name::%player%} to single value "Name" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  540. send "&2Nazwa: &6%{_Name::%player%}%"
  541. set {_Tag::%player%} to single value "Tag" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  542. send "&2Tag: &6%{_Tag::%player%}%"
  543. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  544. send "&2Lider: &6%{_Lider::%player%}%"
  545. set {_gracze} to "%{gb::gPlayers::%arg 2%::*}%"
  546. if {_gracze} contain " and":
  547. replace all " and" with "," in {_gracze}
  548. send "&2Czlonkowie: &6%{_gracze}%"
  549. set {_Honor::%player%} to single value "Tag" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  550. send "&2Punkty honoru: &6%{_Honor::%player%}%"
  551. set {_Slots::%player%} to single value "Slots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  552. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  553. send "&2Miejsca: &6%{_Players::%player%}%&2/&6%{_Slots::%player%}%"
  554. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  555. send "&2Wojna: %{_Wojna::%player%}%"
  556. else:
  557. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Informacje"
  558. stop
  559. else:
  560. send "{@Tag}: Nie masz do tego uprawnien."
  561. stop
  562. # ============================================================================================================================================================================= #
  563. # ===================================================================== Opis gildii: ========================================================================================== #
  564. # ============================================================================================================================================================================= #
  565. if arg 1 is "opis" or "desc" or "description":
  566. if player has permission "gb.desc" or "gb.*":
  567. if arg 2 is not set:
  568. if arg 3 is not set:
  569. if {gb::gNamePlayer::%player%} is set:
  570. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  571. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  572. if {_Lider::%player%} is "%player%":
  573. send "{@Tag}: Napisz swoj opis na chacie."
  574. set {gb::gDescPlayer::%player%} to true
  575. set {_Desc::%player%} to single value "Desc" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  576. wait 30 second
  577. if {gb::gDescPlayer::%player%} is true:
  578. if {gb::gDesc::%{gb::gNamePlayer::%player%}%} is {_Desc::%player%}:
  579. clear {gb::gDescPlayer::%player%}
  580. stop
  581. else:
  582. send "{@Tag}: Nie jestes liderem tej gildii."
  583. stop
  584. else:
  585. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  586. clear {gb::gNamePlayer::%player%}
  587. else:
  588. send "{@Tag}: Nie nalezysz do zadnej gildii."
  589. stop
  590. else:
  591. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opis"
  592. stop
  593. else:
  594. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opis"
  595. stop
  596. else:
  597. send "{@Tag}: Nie masz do tego uprawnien."
  598. stop
  599.  
  600. # ============================================================================================================================================================================= #
  601. # ===================================================================== Wplata surowcow do gildii: ============================================================================ #
  602. # ============================================================================================================================================================================= #
  603. if arg 1 is "wplac":
  604. if player has permission "gb.donate" or "gb.*":
  605. if {gb::gNamePlayer::%player%} is set:
  606. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  607. if arg 2 is "zloto" or "gold":
  608. if arg 3 is set:
  609. set {_gold::%player%} to arg 3 parsed as number
  610. if {_gold::%player%} is greater than 0:
  611. if player has {_gold::%player%} of gold ingot:
  612. set {_GoldG::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  613. if {_gold::%player%}+{_GoldG::%player%} is smaller or equal to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}:
  614. add {_gold::%player%} to {_GoldG::%player%}
  615. remove {_gold::%player%} of gold ingot from player
  616. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_GoldG::%player%}%"
  617. send "{@Tag}: Gracz &6%name of player%&f wplacil &6%{_gold::%player%}%&f zlota do gildii." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  618. stop
  619. else:
  620. send "{@Tag}: W twoim magazynie nie ma miejsca."
  621. stop
  622. else:
  623. send "{@Tag}: Nie masz tyle zlota."
  624. stop
  625. else:
  626. send "{@Tag}: Minimalna wplata to 0."
  627. stop
  628. else:
  629. send "{@Tag}: Musisz podac kwote jaka chcesz wplacic."
  630. stop
  631. if arg 2 is "mana":
  632. if arg 3 is set:
  633. set {_mana::%player%} to arg 3 parsed as number
  634. if {_mana::%player%} is greater than 0:
  635. if level of player is greater or equal to {_mana::%player%}:
  636. set {_ManaG::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  637. if {_mana::%player%}+{_ManaG::%player%} is smaller or equal to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}:
  638. add {_mana::%player%} to {_ManaG::%player%}
  639. reduce player's level by {_mana::%player%}
  640. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_ManaG::%player%}%"
  641. send "{@Tag}: Gracz &6%name of player%&f wplacil &6%{_mana::%player%}%&f many do gildii." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  642. stop
  643. else:
  644. send "{@Tag}: W twoim magazynie nie ma miejsca"
  645. else:
  646. send "{@Tag}: Nie masz tyle many."
  647. stop
  648. else:
  649. send "{@Tag}: Minimalna wplata to 0."
  650. stop
  651. else:
  652. send "{@Tag}: Musisz podac kwote jaka chcesz wplacic."
  653. stop
  654. if arg 2 is "zelazo" or "iron":
  655. if arg 3 is set:
  656. set {_iron::%player%} to arg 3 parsed as number
  657. if {_iron::%player%} is greater than 0:
  658. if player has {_iron::%player%} of iron ingot:
  659. set {_IronG::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  660. if {_iron::%player%}+{_IronG::%player%} is smaller or equal to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}:
  661. add {_iron::%player%} to {_IronG::%player%}
  662. remove {_iron::%player%} of iron ingot from player
  663. set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_IronG::%player%}%"
  664. send "{@Tag}: Gracz &6%name of player%&f wplacil &6%{_iron::%player%}%&f zelaza do gildii." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  665. stop
  666. else:
  667. send "{@Tag}: W twoim magazynie nie ma miejsca"
  668. else:
  669. send "{@Tag}: Nie masz tyle zelaza."
  670. stop
  671. else:
  672. send "{@Tag}: Minimalna wplata to 0."
  673. stop
  674. else:
  675. send "{@Tag}: Musisz podac kwote jaka chcesz wplacic."
  676. stop
  677. if arg 2 is not "mana" or "gold" or "zloto" or "zelazo" or "iron":
  678. send "{@Tag}: Nie ma takiego zasobu."
  679. stop
  680. else:
  681. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  682. clear {gb::gNamePlayer::%player%}
  683. else:
  684. send "{@Tag}: Nie nalezysz do zadnej gildii."
  685. stop
  686. else:
  687. send "{@Tag}: Nie ma do tego uprawnien."
  688. stop
  689. # ============================================================================================================================================================================= #
  690. # ===================================================================== Zaproszenia do gildii: ================================================================================ #
  691. # ============================================================================================================================================================================= #
  692. if arg 1 is "zapros" or "dodaj" or "ivite":
  693. if player has permission "gb.invite" or "gb.*":
  694. if arg 3 is not set:
  695. if {gb::gNamePlayer::%player%} is set:
  696. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  697. if arg 2 is set:
  698. if arg 2 is not "%player%":
  699. set {_gracz} to arg 2 parsed as player
  700. if {gb::gNamePlayer::%{_gracz}%} is not set:
  701. if {_gracz} is online:
  702. set {_Slots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  703. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  704. if {_Players::%player%} is smaller than {_Slots::%player%}:
  705. if {gb::Invites::%{_gracz}%::*} contain {gb::gNamePlayer::%player%}:
  706. send "{@Tag}: Zaprosiles juz tego gracza do gidlii."
  707. stop
  708. else:
  709. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  710. if {_Lider::%player%} isn't "%player%":
  711. if {gb::gRank::%player%} isn't "dowodca":
  712. send "{@Tag}: Nie jestes liderem ani dowdca tej gildii."
  713. stop
  714. if {_Lider::%player%} isn't "%player%":
  715. if {gb::gRank::%player%} is "dowodca":
  716. add {gb::gNamePlayer::%player%} to {gb::Invites::%{_gracz}%::*}
  717. send "{@Tag}: Gracz &6%name of player%&f zaprasza Cie do gildii &6%{gb::gNamePlayer::%player%}%&f." to {_gracz}
  718. send "{@Tag}: Wyslano zaproszenie do gracza &6%{_gracz}%&f."
  719. wait 180 second
  720. if {gb::Invites::%{_gracz}%::*} contain {gb::gNamePlayer::%player%}:
  721. remove {gb::gNamePlayer::%player%} from {gb::Invites::%{_gracz}%::*}
  722. send "{@Tag}: Zaproszenie od gildii &6%{gb::gNamePlayer::%player%}%&f wygaslo." to {_gracz}
  723. stop
  724. if {_Lider::%player%} is "%player%":
  725. add {gb::gNamePlayer::%player%} to {gb::Invites::%{_gracz}%::*}
  726. send "{@Tag}: Gracz &6%name of player%&f zaprasza Cie do gildii &6%{gb::gNamePlayer::%player%}%&f." to {_gracz}
  727. send "{@Tag}: Wyslano zaproszenie do gracza &6%{_gracz}%&f."
  728. wait 180 second
  729. if {gb::Invites::%{_gracz}%::*} contain {gb::gNamePlayer::%player%}:
  730. remove {gb::gNamePlayer::%player%} from {gb::Invites::%{_gracz}%::*}
  731. send "{@Tag}: Zaproszenie od gildii &6%{gb::gNamePlayer::%player%}%&f wygaslo." to {_gracz}
  732. stop
  733. else:
  734. send "{@Tag}: W twojej gildii nie ma wolnego miejsca."
  735. stop
  736. else:
  737. send "{@Tag}: Tego gracza nie ma na serwersze."
  738. stop
  739. else:
  740. send "{@Tag}: Ten gracz jest juz w gildii."
  741. stop
  742. else:
  743. send "{@Tag}: Nie mozesz zaprosic samego siebie do gildii."
  744. stop
  745. else:
  746. send "{@Tag}: Musisz podac nazwe gracza, ktorego chcesz zaprosic."
  747. stop
  748. else:
  749. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  750. clear {gb::gNamePlayer::%player%}
  751. else:
  752. send "{@Tag}: Nie nalezysz do zadnej gildii."
  753. stop
  754. else:
  755. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Dodaj [<Gracz>]"
  756. stop
  757. else:
  758. send "{@Tag}: Nie masz do tego uprawnien."
  759. stop
  760. # ============================================================================================================================================================================= #
  761. # ===================================================================== Anulowanie zaproszenia do gildii: ===================================================================== #
  762. # ============================================================================================================================================================================= #
  763. if arg 1 is "anuluj":
  764. if player has permission "gb.cancel" or "gb.*":
  765. if arg 3 is not set:
  766. if {gb::gNamePlayer::%player%} is set:
  767. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  768. if arg 2 is set:
  769. if {gb::Invites::%arg 2%::*} contain {gb::gNamePlayer::%player%}:
  770. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  771. if {_Lider::%player%} isn't "%player%":
  772. if {gb::gRank::%player%} isn't "dowodca":
  773. send "{@Tag}: Nie jestes liderem ani dowodca tej gildii."
  774. stop
  775. if {gb::gRank::%player%} is "dowodca":
  776. remove {gb::gNamePlayer::%player%} from {gb::Invites::%arg 2%::*}
  777. send "{@Tag}: Anulowales zaproszenie do gildii gracza &6%arg 2%"
  778. set {_gracz} to arg 2 parsed as player
  779. if {_gracz} is online:
  780. send "{@Tag}: Gracz &6%player% &fanulowal zaproszenie do gildii &6%{gb::gNamePlayer::%player%}%&f."
  781. stop
  782. if {_Lider::%player%} is "%player%":
  783. remove {gb::gNamePlayer::%player%} from {gb::Invites::%arg 2%::*}
  784. send "{@Tag}: Anulowales zaproszenie do gildii gracza &6%arg 2%"
  785. set {_gracz} to arg 2 parsed as player
  786. if {_gracz} is online:
  787. send "{@Tag}: Gracz &6%player% &fanulowal zaproszenie do gildii &6%{gb::gNamePlayer::%player%}%&f."
  788. stop
  789. else:
  790. send "{@Tag}: Nie zaprosiles tego gracza do gildii, lub zaproszenie wygaslo."
  791. stop
  792. if arg 2 is not set:
  793. send "{@Tag}: Musisz podac nazwe gracza, ktorego zaproszenie chcesz anulowac."
  794. stop
  795. else:
  796. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  797. clear {gb::gNamePlayer::%player%}
  798. else:
  799. send "{@Tag}: Nie nalezysz do zadnej gildii."
  800. stop
  801. else:
  802. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Anuluj [<Gracz>]"
  803. stop
  804. else:
  805. send "{@Tag}: Nie masz do tego uprawnien"
  806. stop
  807. # ============================================================================================================================================================================= #
  808. # ===================================================================== Dolaczenie do gildii: ================================================================================= #
  809. # ============================================================================================================================================================================= #
  810. if arg 1 is "dolacz" or "join":
  811. if player has permission "gb.join" or "gb.*":
  812. if arg 3 is not set:
  813. if arg 2 is set:
  814. if {gb::Name::%arg 2%} is set:
  815. if {gb::gNamePlayer::%player%} is not set:
  816. if {gb::Invites::%player%::*} contain arg 2:
  817. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  818. set {_MaxSlots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  819. if {_Players::%player%} is smaller than {_MaxSlots::%player%}:
  820. send "{@Tag}: Gracz &6%name of player%&f dolaczyl do twojej gildii." to {gb::gPlayers::%arg 2%::*}
  821. delete {gb::Invites::%player%::*}
  822. set {_gName::%player%} to single value "Name" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  823. set {gb::gNamePlayer::%player%} to {_gName::%player%}
  824. add player to {gb::gPlayers::%arg 2%::*}
  825. set {gb::gRank::%player%} to "rekrut"
  826. add 1 to {_Players::%player%}
  827. set yaml value "Players" from "GuildsBattles/%{_gName::%player%}%.yml" to "%{_Players::%player%}%"
  828. send "{@Tag}: Dolaczyles do gildii &6%{_gName::%player%}%&f."
  829. stop
  830. else:
  831. send "{@Tag}: W tej gildii nie ma wolnego miejsca."
  832. remove {_gName::%player%} from {gb::Invites::%player%::*}
  833. stop
  834. else:
  835. send "{@Tag}: Nie zostales zaproszony do tej gildii."
  836. stop
  837. else:
  838. send "{@Tag}: Jestes juz w gildii."
  839. remove {_gName::%player%} from {gb::Invites::%player%::*}
  840. stop
  841. else:
  842. send "{@Tag}: Nie ma takiej gildii."
  843. stop
  844. else:
  845. send "{@Tag}: Musisz podac nazwe gildii, do ktorej chcesz dolaczyc"
  846. stop
  847. else:
  848. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Dolacz [<Gildia>]"
  849. stop
  850. else:
  851. send "{@Tag}: Nie masz do tego uprawnien."
  852. stop
  853. # ============================================================================================================================================================================= #
  854. # ===================================================================== Wyrzucanie z gildii: ================================================================================== #
  855. # ============================================================================================================================================================================= #
  856. if arg 1 is "wyrzuc" or "kick":
  857. if player has permission "gb.kick" or "gb.*":
  858. if arg 3 is not set:
  859. if {gb::gNamePlayer::%player%} is set:
  860. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  861. if arg 2 is set:
  862. if arg 2 is not "%player%":
  863. set {_gracz} to arg 2 parsed as player
  864. if {gb::gNamePlayer::%player%} is {gb::gNamePlayer::%{_gracz}%}:
  865. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  866. if {_Lider::%player%} isn't "%player%":
  867. if {gb::gRank::%player%} isn't "dowodca":
  868. send "{@Tag}: Nie jestes liderem ani dowodca tej gildii."
  869. stop
  870. if {gb::gRank::%player%} is "dowodca":
  871. if {gb::gRank::%{_gracz}%} isn't "dowodca":
  872. if {_Lider::%player%} isn't "%{_gracz}%":
  873. remove {_gracz} from {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  874. send "{@Tag}: Gracz &6%arg 2%&f zostal wyrzcony z twojej gildii przez &6%name of player%&f." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  875. send "{@Tag}: Zostales wyrzucony z gildii przez &6%name of player%&f." to {_gracz}
  876. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  877. remove 1 from {_Players::%player%}
  878. clear {gb::gRank::%{_gracz}%}
  879. teleport {_gracz} to spawn
  880. set yaml value "Players" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Players::%player%}%"
  881. clear {gb::gNamePlayer::%{_gracz}%}
  882. else:
  883. send "{@Tag}: Nie mozesz wyrzucic lidera z gildii."
  884. stop
  885. else:
  886. send "{@Tag}: Nie mozesz wyrzucic innego dowodcy z gildii."
  887. stop
  888. if {_Lider::%player%} is "%player%":
  889. remove {_gracz} from {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  890. send "{@Tag}: Gracz &6%arg 2%&f zostal wyrzcony z twojej gildii przez &6%name of player%&f." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  891. send "{@Tag}: Zostales wyrzucony z gildii przez &6%name of player%&f." to {_gracz}
  892. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  893. remove 1 from {_Players::%player%}
  894. teleport {_gracz} to spawn
  895. set yaml value "Players" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Players::%player%}%"
  896. clear {gb::gNamePlayer::%{_gracz}%}
  897. else:
  898. send "{@Tag}: Ten gracz nie jest w twojej gildii."
  899. stop
  900. else:
  901. send "{@Tag}: Nie mozesz wyrzucic samego siebie."
  902. stop
  903. else:
  904. send "{@Tag}: Musisz podac nick gracza, ktorego chcesz wyrzucic."
  905. stop
  906. else:
  907. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  908. clear {gb::gNamePlayer::%player%}
  909. else:
  910. send "{@Tag}: Nie nalezysz do zadnej gildii."
  911. stop
  912. else:
  913. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Wyrzuc [<Gracz>]"
  914. stop
  915. else:
  916. send "{@Tag}: Nie masz do tego uprawnien."
  917. stop
  918. # ============================================================================================================================================================================= #
  919. # ===================================================================== Odejscie z gildii: ==================================================================================== #
  920. # ============================================================================================================================================================================= #
  921. if arg 1 is "wyjdz" or "opusc" or "exit" or "leave":
  922. if player has permission "gb.exit" or "gb.*":
  923. if arg 2 is not set:
  924. if arg 3 is not set:
  925. if {gb::gNamePlayer::%player%} is set:
  926. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  927. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  928. if {_Lider::%player%} isn't "%player%":
  929. if {gb::gNameEnemy::%{gb::gNamePlayer::%player%}%} is not set:
  930. remove player from {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  931. send "{@Tag}: Gracz &6%name of player%&f opuscil twoja gildie." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  932. send "{@Tag}: Opusciles gildie &6%{gb::gNamePlayer::%player%}%&f."
  933. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  934. remove 1 from {_Players::%player%}
  935. clear {gb::gRank::%player%}
  936. set yaml value "Players" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Players::%player%}%"
  937. clear {gb::gNamePlayer::%player%}
  938. stop
  939. else:
  940. send "{@Tag}: Twoja gildia prowadzi w tej chwili wojne."
  941. stop
  942. else:
  943. send "{@Tag}: Nie mozesz opuscic tej gildii, poniewaz jestes jej liderem."
  944. stop
  945. else:
  946. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  947. clear {gb::gNamePlayer::%player%}
  948. else:
  949. send "{@Tag}: Nie nalezysz do zadnej gildii."
  950. stop
  951. else:
  952. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opusc"
  953. stop
  954. else:
  955. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opusc"
  956. stop
  957. else:
  958. send "{@Tag}: Nie masz do tego uprawnien."
  959. stop
  960. # ============================================================================================================================================================================= #
  961. # ===================================================================== Budowle gildii: ======================================================================================= #
  962. # ============================================================================================================================================================================= #
  963. if arg 1 is "zbuduj" or "build":
  964. if player has permission "gb.build" or "gb.*":
  965. if arg 3 is not set:
  966. if {gb::gNamePlayer::%player%} is set:
  967. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  968. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  969. if {_Lider::%player%} is "%player%":
  970. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  971. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  972. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  973. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  974. if arg 2 is "ratusz" or "townhall":
  975. set {_Ratusz::%player%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  976. if "%{_Ratusz::%player%}%" doesn't contain "b.":
  977. if {_Ratusz::%player%} is 0:
  978. if {_Gold::%player%} is greater or equal to 50:
  979. if {_Mana::%player%} is greater or equal to 5:
  980. set {_czas} to now
  981. add 10 seconds to {_czas}
  982. set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
  983. set {_Ratusz::%player%} to "b.1"
  984. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  985. remove 5 from {_Mana::%player%}
  986. remove 50 from {_Gold::%player%}
  987. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  988. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  989. send "{@Tag}: Rozpoczynasz budowe Ratusz I, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
  990. stop
  991. else:
  992. send "{@Tag}: Nie masz tyle many (&65&f)."
  993. stop
  994. else:
  995. send "{@Tag}: Nie masz tyle zlota (&650&f)."
  996. stop
  997. if {_Ratusz::%player%} is 1:
  998. if {_Gold::%player%} is greater or equal to 500:
  999. if {_Mana::%player%} is greater or equal to 15:
  1000. if {_Wood::%player%} is greater or equal to 150:
  1001. set {_czas} to now
  1002. add 10 seconds to {_czas}
  1003. set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
  1004. set {_Ratusz::%player%} to "b.2"
  1005. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1006. remove 15 from {_Mana::%player%}
  1007. remove 500 from {_Gold::%player%}
  1008. remove 150 from {_Wood::%player%}
  1009. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1010. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1011. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1012. send "{@Tag}: Rozpoczynasz budowe Ratusz II, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
  1013. stop
  1014. else:
  1015. send "{@Tag}: Nie masz tyle drewna (&6150&f)."
  1016. stop
  1017. else:
  1018. send "{@Tag}: Nie masz tyle many (&615&f)."
  1019. stop
  1020. else:
  1021. send "{@Tag}: Nie masz tyle zlota (&6500&f)."
  1022. stop
  1023. if {_Ratusz::%player%} is 2:
  1024. if {_Gold::%player%} is greater or equal to 2000:
  1025. if {_Mana::%player%} is greater or equal to 50:
  1026. if {_Wood::%player%} is greater or equal to 500:
  1027. set {_czas} to now
  1028. add 10 seconds to {_czas}
  1029. set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
  1030. set {_Ratusz::%player%} to "b.3"
  1031. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1032. remove 50 from {_Mana::%player%}
  1033. remove 2000 from {_Gold::%player%}
  1034. remove 500 from {_Wood::%player%}
  1035. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1036. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1037. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1038. send "{@Tag}: Rozpoczynasz budowe Ratusz III, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
  1039. stop
  1040. else:
  1041. send "{@Tag}: Nie masz tyle drewna (&6500&f)."
  1042. stop
  1043. else:
  1044. send "{@Tag}: Nie masz tyle many (&650&f)."
  1045. stop
  1046. else:
  1047. send "{@Tag}: Nie masz tyle zlota (&62000&f)."
  1048. stop
  1049. if {_Ratusz::%player%} is 3:
  1050. if {_Gold::%player%} is greater or equal to 5000:
  1051. if {_Mana::%player%} is greater or equal to 150:
  1052. if {_Wood::%player%} is greater or equal to 1500:
  1053. if {_Iron::%player%} is greater or equal to 100:
  1054. set {_czas} to now
  1055. add 10 seconds to {_czas}
  1056. set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
  1057. set {_Ratusz::%player%} to "b.4"
  1058. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1059. remove 15 from {_Mana::%player%}
  1060. remove 5000 from {_Gold::%player%}
  1061. remove 1500 from {_Wood::%player%}
  1062. remove 100 from {_Iron::%player%}
  1063. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1064. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1065. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1066. set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Iron::%player%}%"
  1067. send "{@Tag}: Rozpoczynasz budowe Ratusz IV, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
  1068. stop
  1069. else:
  1070. send "{@Tag}: Nie masz tyle zelaza (&6100&f)."
  1071. stop
  1072. else:
  1073. send "{@Tag}: Nie masz tyle drewna (&61500&f)."
  1074. else:
  1075. send "{@Tag}: Nie masz tyle many (&6150&f)."
  1076. stop
  1077. else:
  1078. send "{@Tag}: Nie masz tyle zlota (&65000&f)."
  1079. stop
  1080. if {_Tartak::%player%} is 4:
  1081. send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
  1082. stop
  1083. else:
  1084. send "{@Tag}: Juz budujesz ta budowle."
  1085. stop
  1086. if arg 2 is "magazyn":
  1087. set {_Magazyn::%player%} to single value "Magazyn" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  1088. if "%{_Magazyn::%player%}%" doesn't contain "b.":
  1089. if {_Magazyn::%player%} is 0:
  1090. if {_Gold::%player%} is greater or equal to 500:
  1091. if {_Mana::%player%} is greater or equal to 25:
  1092. if {_Wood::%player%} is greater or equal to 500:
  1093. set {_czas} to now
  1094. add 10 seconds to {_czas}
  1095. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1096. set {_Magazyn::%player%} to "b.1"
  1097. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1098. remove 25 from {_Mana::%player%}
  1099. remove 500 from {_Gold::%player%}
  1100. remove 500 from {_Wood::%player%}
  1101. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1102. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1103. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1104. send "{@Tag}: Rozpoczynasz budowe Magazyn I, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1105. stop
  1106. else:
  1107. send "{@Tag}: Nie masz tyle drewna (&6500&f)."
  1108. else:
  1109. send "{@Tag}: Nie masz tyle many (&625&f)."
  1110. stop
  1111. else:
  1112. send "{@Tag}: Nie masz tyle zlota (&6500&f)."
  1113. stop
  1114. if {_Magazyn::%player%} is 1:
  1115. if {_Gold::%player%} is greater or equal to 1000:
  1116. if {_Mana::%player%} is greater or equal to 50:
  1117. if {_Wood::%player%} is greater or equal to 1000:
  1118. set {_czas} to now
  1119. add 10 seconds to {_czas}
  1120. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1121. set {_Magazyn::%player%} to "b.2"
  1122. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1123. remove 50 from {_Mana::%player%}
  1124. remove 1000 from {_Gold::%player%}
  1125. remove 1000 from {_Wood::%player%}
  1126. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1127. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1128. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1129. send "{@Tag}: Rozpoczynasz budowe Magazyn II, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1130. stop
  1131. else:
  1132. send "{@Tag}: Nie masz tyle drewna (&61000&f)."
  1133. else:
  1134. send "{@Tag}: Nie masz tyle many (&650&f)."
  1135. stop
  1136. else:
  1137. send "{@Tag}: Nie masz tyle zlota (&61000&f)."
  1138. stop
  1139. if {_Magazyn::%player%} is 2:
  1140. if {_Gold::%player%} is greater or equal to 1500:
  1141. if {_Mana::%player%} is greater or equal to 75:
  1142. if {_Wood::%player%} is greater or equal to 1500:
  1143. set {_czas} to now
  1144. add 10 seconds to {_czas}
  1145. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1146. set {_Magazyn::%player%} to "b.3"
  1147. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1148. remove 75 from {_Mana::%player%}
  1149. remove 1500 from {_Gold::%player%}
  1150. remove 1500 from {_Wood::%player%}
  1151. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1152. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1153. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1154. send "{@Tag}: Rozpoczynasz budowe Magazyn III, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1155. stop
  1156. else:
  1157. send "{@Tag}: Nie masz tyle drewna (&61500&f)."
  1158. else:
  1159. send "{@Tag}: Nie masz tyle many (&675&f)."
  1160. stop
  1161. else:
  1162. send "{@Tag}: Nie masz tyle zlota (&61500&f)."
  1163. stop
  1164. if {_Magazyn::%player%} is 3:
  1165. if {_Gold::%player%} is greater or equal to 2000:
  1166. if {_Mana::%player%} is greater or equal to 100:
  1167. if {_Wood::%player%} is greater or equal to 2000:
  1168. set {_czas} to now
  1169. add 10 seconds to {_czas}
  1170. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1171. set {_Magazyn::%player%} to "b.4"
  1172. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1173. remove 100 from {_Mana::%player%}
  1174. remove 1000 from {_Gold::%player%}
  1175. remove 1000 from {_Wood::%player%}
  1176. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1177. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1178. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1179. send "{@Tag}: Rozpoczynasz budowe Magazyn IV, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1180. stop
  1181. else:
  1182. send "{@Tag}: Nie masz tyle drewna (&62000&f)."
  1183. else:
  1184. send "{@Tag}: Nie masz tyle many (&6100&f)."
  1185. stop
  1186. else:
  1187. send "{@Tag}: Nie masz tyle zlota (&62000&f)."
  1188. stop
  1189. if {_Magazyn::%player%} is 4:
  1190. if {_Gold::%player%} is greater or equal to 2500:
  1191. if {_Mana::%player%} is greater or equal to 150:
  1192. if {_Wood::%player%} is greater or equal to 2500:
  1193. set {_czas} to now
  1194. add 10 seconds to {_czas}
  1195. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1196. set {_Magazyn::%player%} to "b.5"
  1197. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1198. remove 150 from {_Mana::%player%}
  1199. remove 2500 from {_Gold::%player%}
  1200. remove 2500 from {_Wood::%player%}
  1201. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1202. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1203. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1204. send "{@Tag}: Rozpoczynasz budowe Magazyn V, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1205. stop
  1206. else:
  1207. send "{@Tag}: Nie masz tyle drewna (&61000&f)."
  1208. else:
  1209. send "{@Tag}: Nie masz tyle many (&650&f)."
  1210. stop
  1211. else:
  1212. send "{@Tag}: Nie masz tyle zlota (&61000&f)."
  1213. stop
  1214. if {_Magazyn::%player%} is 5:
  1215. if {_Gold::%player%} is greater or equal to 3000:
  1216. if {_Mana::%player%} is greater or equal to 200:
  1217. if {_Wood::%player%} is greater or equal to 3000:
  1218. set {_czas} to now
  1219. add 10 seconds to {_czas}
  1220. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1221. set {_Magazyn::%player%} to "b.6"
  1222. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1223. remove 200 from {_Mana::%player%}
  1224. remove 3000 from {_Gold::%player%}
  1225. remove 3000 from {_Wood::%player%}
  1226. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1227. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1228. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1229. send "{@Tag}: Rozpoczynasz budowe Magazyn VI, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1230. stop
  1231. else:
  1232. send "{@Tag}: Nie masz tyle drewna (&63000&f)."
  1233. else:
  1234. send "{@Tag}: Nie masz tyle many (&6200&f)."
  1235. stop
  1236. else:
  1237. send "{@Tag}: Nie masz tyle zlota (&63000&f)."
  1238. stop
  1239. if {_Magazyn::%player%} is 6:
  1240. if {_Gold::%player%} is greater or equal to 3500:
  1241. if {_Mana::%player%} is greater or equal to 250:
  1242. if {_Wood::%player%} is greater or equal to 3500:
  1243. set {_czas} to now
  1244. add 10 seconds to {_czas}
  1245. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1246. set {_Magazyn::%player%} to "b.7"
  1247. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1248. remove 250 from {_Mana::%player%}
  1249. remove 3500 from {_Gold::%player%}
  1250. remove 3500 from {_Wood::%player%}
  1251. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1252. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1253. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1254. send "{@Tag}: Rozpoczynasz budowe Magazyn VII, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1255. stop
  1256. else:
  1257. send "{@Tag}: Nie masz tyle drewna (&63500&f)."
  1258. else:
  1259. send "{@Tag}: Nie masz tyle many (&6250&f)."
  1260. stop
  1261. else:
  1262. send "{@Tag}: Nie masz tyle zlota (&63500&f)."
  1263. stop
  1264. if {_Magazyn::%player%} is 7:
  1265. if {_Gold::%player%} is greater or equal to 4000:
  1266. if {_Mana::%player%} is greater or equal to 300:
  1267. if {_Wood::%player%} is greater or equal to 4000:
  1268. set {_czas} to now
  1269. add 10 seconds to {_czas}
  1270. set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
  1271. set {_Magazyn::%player%} to "b.8"
  1272. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1273. remove 300 from {_Mana::%player%}
  1274. remove 4000 from {_Gold::%player%}
  1275. remove 4000 from {_Wood::%player%}
  1276. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1277. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1278. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1279. send "{@Tag}: Rozpoczynasz budowe Magazyn VIII, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
  1280. stop
  1281. else:
  1282. send "{@Tag}: Nie masz tyle drewna (&64000&f)."
  1283. else:
  1284. send "{@Tag}: Nie masz tyle many (&6300&f)."
  1285. stop
  1286. else:
  1287. send "{@Tag}: Nie masz tyle zlota (&64000&f)."
  1288. stop
  1289. if {_Magazyn::%player%} is 8:
  1290. send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
  1291. stop
  1292. else:
  1293. send "{@Tag}: Juz budujesz ta budowle."
  1294. stop
  1295. if arg 2 is "tartak":
  1296. set {_Tartak::%player%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  1297. if "%{_Tartak::%player%}%" doesn't contain "b.":
  1298. if {_Tartak::%player%} is 0:
  1299. if {_Gold::%player%} is greater or equal to 120:
  1300. if {_Mana::%player%} is greater or equal to 5:
  1301. set {_czas} to now
  1302. add 10 seconds to {_czas}
  1303. set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
  1304. set {_Tartak::%player%} to "b.1"
  1305. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1306. remove 5 from {_Mana::%player%}
  1307. remove 120 from {_Gold::%player%}
  1308. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1309. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1310. send "{@Tag}: Rozpoczynasz budowe Tartak I, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
  1311. stop
  1312. else:
  1313. send "{@Tag}: Nie masz tyle many (&65&f)."
  1314. stop
  1315. else:
  1316. send "{@Tag}: Nie masz tyle zlota (&6120&f)."
  1317. stop
  1318. if {_Tartak::%player%} is 1:
  1319. if {_Gold::%player%} is greater or equal to 300:
  1320. if {_Mana::%player%} is greater or equal to 20:
  1321. set {_czas} to now
  1322. add 10 seconds to {_czas}
  1323. set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
  1324. set {_Tartak::%player%} to "b.2"
  1325. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1326. remove 20 from {_Mana::%player%}
  1327. remove 300 from {_Gold::%player%}
  1328. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1329. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1330. send "{@Tag}: Rozpoczynasz budowe Tartak II, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
  1331. stop
  1332. else:
  1333. send "{@Tag}: Nie masz tyle many (&620&f)."
  1334. stop
  1335. else:
  1336. send "{@Tag}: Nie masz tyle zlota (&6300&f)."
  1337. stop
  1338. if {_Tartak::%player%} is 2:
  1339. if {_Gold::%player%} is greater or equal to 700:
  1340. if {_Mana::%player%} is greater or equal to 50:
  1341. if {_Wood::%player%} is greater or equal to 200:
  1342. set {_czas} to now
  1343. add 10 seconds to {_czas}
  1344. set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
  1345. set {_Tartak::%player%} to "b.3"
  1346. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1347. remove 50 from {_Mana::%player%}
  1348. remove 700 from {_Gold::%player%}
  1349. remove 200 from {_Wood::%player%}
  1350. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1351. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1352. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1353. send "{@Tag}: Rozpoczynasz budowe Tartak III, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
  1354. stop
  1355. else:
  1356. send "{@Tag}: Nie masz tyle drewna (&6200&f)."
  1357. stop
  1358. else:
  1359. send "{@Tag}: Nie masz tyle many (&650&f)."
  1360. stop
  1361. else:
  1362. send "{@Tag}: Nie masz tyle zlota (&6700&f)."
  1363. stop
  1364. if {_Tartak::%player%} is 3:
  1365. if {_Gold::%player%} is greater or equal to 1500:
  1366. if {_Mana::%player%} is greater or equal to 100:
  1367. if {_Wood::%player%} is greater or equal to 700:
  1368. set {_czas} to now
  1369. add 10 seconds to {_czas}
  1370. set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
  1371. set {_Tartak::%player%} to "b.4"
  1372. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1373. remove 100 from {_Mana::%player%}
  1374. remove 1500 from {_Gold::%player%}
  1375. remove 700 from {_Wood::%player%}
  1376. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1377. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1378. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  1379. send "{@Tag}: Rozpoczynasz budowe Tartak IV, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
  1380. stop
  1381. else:
  1382. send "{@Tag}: Nie masz tyle drewna (&6700&f)."
  1383. stop
  1384. else:
  1385. send "{@Tag}: Nie masz tyle many (&6100&f)."
  1386. stop
  1387. else:
  1388. send "{@Tag}: Nie masz tyle zlota (&61500&f)."
  1389. stop
  1390. if {_Tartak::%player%} is 4:
  1391. send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
  1392. stop
  1393. else:
  1394. send "{@Tag}: Juz budujesz ta budowle."
  1395. stop
  1396. if arg 2 is "alchemik":
  1397. set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  1398. if "%{_Alchemik::%player%}%" doesn't contain "b.":
  1399. if {_Alchemik::%player%} is 0:
  1400. if {_Gold::%player%} is greater or equal to 750:
  1401. if {_Mana::%player%} is greater or equal to 150:
  1402. set {_czas} to now
  1403. add 10 seconds to {_czas}
  1404. set {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%} to {_czas}
  1405. set {_Alchemik::%player%} to "b.1"
  1406. set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
  1407. remove 150 from {_Mana::%player%}
  1408. remove 750 from {_Gold::%player%}
  1409. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1410. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1411. send "{@Tag}: Rozpoczynasz budowe Alchemik I, koniec budowy: &6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f."
  1412. stop
  1413. else:
  1414. send "{@Tag}: Nie masz tyle many (&6150&f)."
  1415. stop
  1416. else:
  1417. send "{@Tag}: Nie masz tyle zlota (&6750&f)."
  1418. stop
  1419. if {_Alchemik::%player%} is 1:
  1420. if {_Gold::%player%} is greater or equal to 1500:
  1421. if {_Mana::%player%} is greater or equal to 300:
  1422. set {_czas} to now
  1423. add 10 seconds to {_czas}
  1424. set {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%} to {_czas}
  1425. set {_Alchemik::%player%} to "b.2"
  1426. set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
  1427. remove 300 from {_Mana::%player%}
  1428. remove 1500 from {_Gold::%player%}
  1429. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1430. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1431. send "{@Tag}: Rozpoczynasz budowe Alchemik II, koniec budowy: &6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f."
  1432. stop
  1433. else:
  1434. send "{@Tag}: Nie masz tyle many (&6300&f)."
  1435. stop
  1436. else:
  1437. send "{@Tag}: Nie masz tyle zlota (&61500&f)."
  1438. stop
  1439. if {_Alchemik::%player%} is 2:
  1440. if {_Gold::%player%} is greater or equal to 2500:
  1441. if {_Mana::%player%} is greater or equal to 500:
  1442. if {_Wood::%player%} is greater or equal to 500:
  1443. set {_czas} to now
  1444. add 10 seconds to {_czas}
  1445. set {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%} to {_czas}
  1446. set {_Alchemik::%player%} to "b.3"
  1447. set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
  1448. remove 500 from {_Mana::%player%}
  1449. remove 2500 from {_Gold::%player%}
  1450. remove 500 from {_Wood::%player%}
  1451. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  1452. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1453. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  1454. send "{@Tag}: Rozpoczynasz budowe Alchemik III, koniec budowy: &6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f."
  1455. stop
  1456. else:
  1457. send "{@Tag}: Nie masz tyle drewna (&6500&f)."
  1458. stop
  1459. else:
  1460. send "{@Tag}: Nie masz tyle many (&6500&f)."
  1461. stop
  1462. else:
  1463. send "{@Tag}: Nie masz tyle zlota (&62500&f)."
  1464. stop
  1465. if {_Alchemik::%player%} is 3:
  1466. send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
  1467. stop
  1468. else:
  1469. send "{@Tag}: Juz budujesz ta budowle."
  1470. stop
  1471. if arg 3 is not "ratusz" or "townhall" or "magazyn" or "tartak" or "alchemik":
  1472. send "{@Tag}: Nie ma takiego budynku."
  1473. stop
  1474. if arg 3 is not set:
  1475. send "{@Tag}: Musisz podac jaki budynek chcesz zbudowac."
  1476. stop
  1477. else:
  1478. send "{@Tag}: Nie jestes liderem tej gildii."
  1479. stop
  1480. else:
  1481. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  1482. clear {gb::gNamePlayer::%player%}
  1483. else:
  1484. send "{@Tag}: Nie nalezysz do zadnej gildii."
  1485. stop
  1486. else:
  1487. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zbuduj [<Budowla>]"
  1488. stop
  1489. else:
  1490. send "{@Tag}: Nie masz do tego uprawnien."
  1491. stop
  1492. # ============================================================================================================================================================================= #
  1493. # ===================================================================== Konczenie budowli: ==================================================================================== #
  1494. # ============================================================================================================================================================================= #
  1495. if arg 1 is "ukoncz" or "complete":
  1496. if player has permission "gb.complete" or "gb.*":
  1497. if arg 3 is not set:
  1498. if {gb::gNamePlayer::%player%} is set:
  1499. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  1500. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1501. if {_Lider::%player%} is "%player%":
  1502. if arg 2 is "ratusz" or "townhall":
  1503. set {_Ratusz::%player%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1504. if {_Ratusz::%player%} contain "b.":
  1505. set {_now} to now
  1506. if {_now} is greater or equal to {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}:
  1507. set {_MaxSlots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1508. clear {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}
  1509. if {_Ratusz::%player%} is "b.1":
  1510. set {_Ratusz::%player%} to 1
  1511. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1512. add 4 to {_MaxSlots::%player%}
  1513. set yaml value "MaxSlots" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_MaxSlots::%player%}%"
  1514. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz I&f."
  1515. stop
  1516. if {_Ratusz::%player%} is "b.2":
  1517. set {_Ratusz::%player%} to 2
  1518. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1519. add 4 to {_MaxSlots::%player%}
  1520. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz II&f."
  1521. stop
  1522. if {_Ratusz::%player%} is "b.3":
  1523. set {_Ratusz::%player%} to 3
  1524. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1525. add 4 to {_MaxSlots::%player%}
  1526. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz III&f."
  1527. stop
  1528. if {_Ratusz::%player%} is "b.4":
  1529. set {_Ratusz::%player%} to 4
  1530. set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
  1531. add 4 to {_MaxSlots::%player%}
  1532. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz IV&f."
  1533. stop
  1534. else:
  1535. send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f)."
  1536. stop
  1537. else:
  1538. send "{@Tag}: Nie rozpoczales budowy tego budynku."
  1539. stop
  1540. if arg 2 is "magazyn":
  1541. set {_Magazyn::%player%} to single value "Magazyn" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1542. if {_Magazyn::%player%} contain "b.":
  1543. set {_now} to now
  1544. if {_now} is greater or equal to {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}:
  1545. clear {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}
  1546. if {_Magazyn::%player%} is "b.1":
  1547. set {_Magazyn::%player%} to 1
  1548. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1549. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1550. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1551. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1552. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1553. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn I&f."
  1554. stop
  1555. if {_Magazyn::%player%} is "b.2":
  1556. set {_Magazyn::%player%} to 2
  1557. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1558. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1559. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1560. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1561. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1562. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn II&f."
  1563. stop
  1564. if {_Magazyn::%player%} is "b.3":
  1565. set {_Magazyn::%player%} to 3
  1566. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1567. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1568. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1569. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1570. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1571. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn III&f."
  1572. stop
  1573. if {_Magazyn::%player%} is "b.4":
  1574. set {_Magazyn::%player%} to 4
  1575. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1576. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1577. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1578. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1579. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1580. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn IV&f."
  1581. stop
  1582. if {_Magazyn::%player%} is "b.5":
  1583. set {_Magazyn::%player%} to 5
  1584. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1585. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1586. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1587. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1588. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1589. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn V&f."
  1590. stop
  1591. if {_Magazyn::%player%} is "b.6":
  1592. set {_Magazyn::%player%} to 6
  1593. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1594. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1595. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1596. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1597. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1598. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn VI&f."
  1599. stop
  1600. if {_Magazyn::%player%} is "b.7":
  1601. set {_Magazyn::%player%} to 7
  1602. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1603. add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1604. add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1605. add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1606. add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1607. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn VII&f."
  1608. stop
  1609. if {_Magazyn::%player%} is "b.8":
  1610. set {_Magazyn::%player%} to 8
  1611. set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
  1612. add 1000 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
  1613. add 1000 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
  1614. add 1000 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
  1615. add 1000 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
  1616. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn VIII&f."
  1617. stop
  1618. else:
  1619. send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f)."
  1620. stop
  1621. else:
  1622. send "{@Tag}: Nie rozpoczales budowy tego budynku."
  1623. stop
  1624. if arg 2 is "tartak":
  1625. set {_Tartak::%player%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1626. if {_Tartak::%player%} contain "b.":
  1627. set {_now} to now
  1628. if {_now} is greater or equal to {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}:
  1629. clear {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}
  1630. if {_Tartak::%player%} is "b.1":
  1631. set {_Tartak::%player%} to 1
  1632. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1633. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak I&f."
  1634. stop
  1635. if {_Tartak::%player%} is "b.2":
  1636. set {_Tartak::%player%} to 2
  1637. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1638. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak II&f."
  1639. stop
  1640. if {_Tartak::%player%} is "b.3":
  1641. set {_Tartak::%player%} to 3
  1642. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1643. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak III&f."
  1644. stop
  1645. if {_Tartak::%player%} is "b.4":
  1646. set {_Tartak::%player%} to 4
  1647. set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
  1648. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak IV&f."
  1649. stop
  1650. else:
  1651. send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f)."
  1652. stop
  1653. else:
  1654. send "{@Tag}: Nie rozpoczales budowy tego budynku."
  1655. stop
  1656. if arg 2 is "alchemik":
  1657. set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1658. if {_Alchemik::%player%} contain "b.":
  1659. set {_now} to now
  1660. if {_now} is greater or equal to {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}:
  1661. clear {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}
  1662. if {_Alchemik::%player%} is "b.1":
  1663. set {_Alchemik::%player%} to 1
  1664. set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
  1665. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Alchemik I&f."
  1666. stop
  1667. if {_Alchemik::%player%} is "b.2":
  1668. set {_Alchemik::%player%} to 2
  1669. set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
  1670. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Alchemik II&f."
  1671. stop
  1672. if {_Alchemik::%player%} is "b.3":
  1673. set {_Alchemik::%player%} to 3
  1674. set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
  1675. broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Alchemik III&f."
  1676. stop
  1677. else:
  1678. send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f)."
  1679. stop
  1680. else:
  1681. send "{@Tag}: Nie rozpoczales budowy tego budynku."
  1682. stop
  1683. if arg 3 is not "ratusz" or "townhall" or "magazyn" or "tartak" or "alchemik":
  1684. send "{@Tag}: Nie ma takiego budynku."
  1685. stop
  1686. if arg 3 is not set:
  1687. send "{@Tag}: Musisz podac jaki budynek chcesz ukonczyc."
  1688. stop
  1689. else:
  1690. send "{@Tag}: Nie jestes liderem tej gildii."
  1691. stop
  1692. else:
  1693. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  1694. clear {gb::gNamePlayer::%player%}
  1695. else:
  1696. send "{@Tag}: Nie nalezysz do zadnej gildii."
  1697. stop
  1698. else:
  1699. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Ukoncz [<Budowla>]"
  1700. stop
  1701. else:
  1702. send "{@Tag}: Nie masz do tego uprawnien."
  1703. stop
  1704. # ============================================================================================================================================================================= #
  1705. # ===================================================================== Magazyn gildii: ======================================================================================= #
  1706. # ============================================================================================================================================================================= #
  1707. if arg 1 is "magazyn" or "storage" or "surowce" or "zasoby":
  1708. if player has permission "gb.storage" or "gb.*":
  1709. if arg 2 is not set:
  1710. if arg 3 is not set:
  1711. if {gb::gNamePlayer::%player%} is set:
  1712. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  1713. send "&f============ &6Zasoby &f============"
  1714. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1715. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1716. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1717. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1718. send "&2Zloto: &6%{_Gold::%player%}%&2/&6%{gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}%"
  1719. send "&2Mana: &6%{_Mana::%player%}%&2/&6%{gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}%"
  1720. send "&2Drewno: &6%{_Wood::%player%}%&2/&6%{gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}%"
  1721. send "&2Zelazo: &6%{_Iron::%player%}%&2/&6%{gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}%"
  1722. else:
  1723. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  1724. clear {gb::gNamePlayer::%player%}
  1725. else:
  1726. send "{@Tag}: Nie nalezysz do zadnej gildii."
  1727. stop
  1728. else:
  1729. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zasoby"
  1730. stop
  1731. else:
  1732. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zasoby"
  1733. stop
  1734. else:
  1735. send "{@Tag}: Nie masz do tego uprawnien."
  1736. stop
  1737. # ============================================================================================================================================================================= #
  1738. # ===================================================================== Budynki gildii: ======================================================================================= #
  1739. # ============================================================================================================================================================================= #
  1740. if arg 1 is "budynki" or "budowle":
  1741. if player has permission "gb.builds" or "gb.*":
  1742. if arg 2 is not set:
  1743. if arg 3 is not set:
  1744. if {gb::gNamePlayer::%player%} is set:
  1745. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  1746. set {_Ratusz::%player%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1747. set {_Tartak::%player%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1748. set {_Magazyn::%player%} to single value "Magazyn" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1749. set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1750. send "&f============ &6Budynki &f============"
  1751. replace all "0" with "&4Brak" in {_Ratusz::%player%}
  1752. send "&6Ratusz &f- &2Ratusz %{_Ratusz::%player%}%"
  1753. replace all "0" with "&4Brak" in {_Tartak::%player%}
  1754. send "&6Tartak &f- &2Tartak %{_Tartak::%player%}%"
  1755. replace all "0" with "&4Brak" in {_Magazyn::%player%}
  1756. send "&6Magazyn &f- &2Magazyn %{_Magazyn::%player%}%"
  1757. replace all "0" with "&4Brak" in {_Alchemik::%player%}
  1758. send "&6Alchemik &f- &2Alchemik %{_Alchemik::%player%}%"
  1759. stop
  1760. else:
  1761. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  1762. clear {gb::gNamePlayer::%player%}
  1763. else:
  1764. send "{@Tag}: Nie nalezysz do zadnej gildii."
  1765. stop
  1766. else:
  1767. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Budowle"
  1768. stop
  1769. else:
  1770. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Budowle"
  1771. stop
  1772. else:
  1773. send "{@Tag}: Nie masz do tego uprawnien."
  1774. stop
  1775. # ============================================================================================================================================================================= #
  1776. # ===================================================================== Lista zaproszen do gildii: ============================================================================ #
  1777. # ============================================================================================================================================================================= #
  1778. if arg 1 is "zaproszenia" or "invites":
  1779. if player has permission "gb.invites" or "gb.*":
  1780. if {gb::gNamePlayer::%player%} is not set:
  1781. if {gb::Invites::%player%::*} is empty:
  1782. send "{@Tag}: Nie zostales zaproszony do zadnej gildii."
  1783. stop
  1784. else:
  1785. if arg 2 is not set:
  1786. set {_invites} to "%{gb::Invites::%player%::*}%"
  1787. replace all " and" with "," in {_invites}
  1788. send "{@Tag}: Zaproszenia do gildii: &6%{_invites}%"
  1789. stop
  1790. if arg 2 is "usun" or "clear":
  1791. if {zapro::clear::%player%} is not set:
  1792. send "{@Tag}: Czy na pewno chcesz usunac wszystkie zaproszenia do gildii?"
  1793. send "{@Tag}: Wpisz ta komende ponownie, aby potwierdzic"
  1794. set {zapro::clear::%player%} to true
  1795. wait 10 second
  1796. if {zapro::clear::%player%} is true:
  1797. clear {zapro::clear::%player%}
  1798. stop
  1799. if {zapro::clear::%player%} is true:
  1800. clear {gb::Invites::%player%::*}
  1801. clear {zapro::clear::%player%}
  1802. send "{@Tag}: Usunales wszystkie zaproszenia do gildii"
  1803. stop
  1804. if arg 2 is not "usun" or "clear":
  1805. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zaproszenia Usun"
  1806. stop
  1807. if arg 3 is set:
  1808. if arg 2 is set:
  1809. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zaproszenia Usun"
  1810. if arg 2 is not set:
  1811. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zaproszenia"
  1812.  
  1813. else:
  1814. send "{@Tag}: Jestes juz w gildii."
  1815. stop
  1816. else:
  1817. send "{@Tag}: Nie masz do tego uprawnien."
  1818. stop
  1819.  
  1820. # ============================================================================================================================================================================= #
  1821. # ====================================================================== Chat gildii: ========================================================================================= #
  1822. # ============================================================================================================================================================================= #
  1823. if arg 1 is "chat":
  1824. if player has permission "gb.chat" or "gb.*":
  1825. if arg 3 is not set:
  1826. if arg 2 is not set:
  1827. if {gb::gNamePlayer::%player%} is set:
  1828. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  1829. set {_Chat::%player%} to single value "Chat" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1830. if {_Chat::%player%} is "On":
  1831. if {gb::Chat::%name of player%} is not set:
  1832. set {gb::Chat::%name of player%} to true
  1833. send "{@Tag}: Pomyslnie wlaczono chat gildii."
  1834. stop
  1835. if {gb::Chat::%name of player%} is true:
  1836. clear {gb::Chat::%name of player%}
  1837. send "{@Tag}: Pomyslnie wlaczono chat ogolny."
  1838. stop
  1839. else:
  1840. send "{@Tag}: Zmienianie chatu w gildii &2%{gb::gNamePlayer::%player%}%&f jest wylaczone."
  1841. stop
  1842. else:
  1843. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  1844. clear {gb::gNamePlayer::%player%}
  1845. else:
  1846. send "{@Tag}: Nie jestes czlonkiem zadnej gildii."
  1847. stop
  1848. if arg 2 is "ustaw":
  1849. if {gb::gNamePlayer::%player%} is set:
  1850. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  1851. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1852. if {_Lider::%player%} is "%player%":
  1853. set {_Chat::%player%} to single value "Chat" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1854. if {_Chat::%player%} is "On":
  1855. set yaml value "Chat" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Off"
  1856. loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
  1857. send "{@Tag}: Gracz &2%name of player%&f wylaczyl chat dla gildii." to loop-value
  1858. stop
  1859. if {_Chat::%player%} is "Off":
  1860. set yaml value "Chat" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "On"
  1861. loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
  1862. send "{@Tag}: Gracz &2%name of player%&f wlaczyl chat dla gildii." to loop-value
  1863. stop
  1864. else:
  1865. send "{@Tag}: Nie jestes liderem tej gildii"
  1866. stop
  1867. else:
  1868. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  1869. clear {gb::gNamePlayer::%player%}
  1870. else:
  1871. send "{@Tag}: Nie jestes czlonkiem zadnej gildii"
  1872. stop
  1873. else:
  1874. send "{@Tag}: Poprawne uzycie: &6/GuildBattles Chat"
  1875. stop
  1876. else:
  1877. send "{@Tag}: Nie masz do tego uprawnien."
  1878. stop
  1879. # ============================================================================================================================================================================= #
  1880. # ===================================================================== Wojny gildii: ========================================================================================= #
  1881. # ============================================================================================================================================================================= #
  1882. if arg 1 is "wojna" or "walka" or "bitwa" or "war" or "battle":
  1883. if player has permission "gb.war" or "gb.*":
  1884. if {@warEnable} is true:
  1885. if {gb::gNamePlayer::%player%} is set:
  1886. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  1887. if arg 2 is "wypowiedz":
  1888. if arg 3 is set:
  1889. if {gb::Name::%arg 3%} is set:
  1890. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1891. if {_Wojna::%player%} is "Brak":
  1892. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml"
  1893. if {_Wojna::%player%} is "Brak":
  1894. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1895. if {_Lider::%player%} is "%player%":
  1896. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml" parsed as player
  1897. if {_Lider::%player%} is online:
  1898. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  1899. if {_Players::%player%} is greater or equal to {@warPlayersRequired}:
  1900. set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml" parsed as number
  1901. if {_Players::%player%} is greater or equal to {@warPlayersRequired}:
  1902. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
  1903. if {_Honor::%player%} is greater or equal to {@warHonorRequired}:
  1904. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml" parsed as number
  1905. if {_Honor::%player%} is greater or equal to {@warHonorRequired}:
  1906. if {gb::gWarInvites::%arg 3%::*} doesn't contain "%{gb::gNamePlayer::%player%}%":
  1907. add "%{gb::gNamePlayer::%player%}%" to {gb::gWarInvites::%arg 3%::*}
  1908. broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwypowiedziala wojne gildii &6%arg 3%&f."
  1909. send "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwypowiedziala wojne twojej gildii.||{@Tag}: Wpisz &6/GuildBattles Wojna Akceptuj %{gb::gNamePlayer::%player%}% &faby rozpoczac wojne." to {_Lider::%player%}
  1910. loop 180 times:
  1911. wait 1 second
  1912. if {gb::gWarInvites::%arg 3%::*} contain "%{gb::gNamePlayer::%player%}%":
  1913. add 1 to {_cooldown::%player%}
  1914. else:
  1915. exit loop
  1916. stop
  1917. if {_cooldown::%player%} is equal to 180:
  1918. remove "%{gb::gNamePlayer::%player%}%" from {gb::gWarInvites::%arg 3%::*}
  1919. stop
  1920. if "%{gb::gWarInvites::%arg 3%::*}%" is "<none>":
  1921. add "%{gb::gNamePlayer::%player%}%" to {gb::gWarInvites::%arg 3%::*}
  1922. broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwypowiedziala wojne gildii &6%arg 3%&f."
  1923. send "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwypowiedziala wojne twojej gildii.||{@Tag}: Wpisz &6/GuildBattles Wojna Akceptuj %{gb::gNamePlayer::%player%}% &faby rozpoczac wojne." to {_Lider::%player%}
  1924. loop 180 times:
  1925. wait 1 second
  1926. if {gb::gWarInvites::%arg 3%::*} contain "%{gb::gNamePlayer::%player%}%":
  1927. add 1 to {_cooldown::%player%}
  1928. else:
  1929. exit loop
  1930. stop
  1931. if {_cooldown::%player%} is equal to 180:
  1932. remove "%{gb::gNamePlayer::%player%}%" from {gb::gWarInvites::%arg 3%::*}
  1933. stop
  1934. if {gb::gWarInvites::%arg 3%::*} contain "%{gb::gNamePlayer::%player%}%":
  1935. send "{@Tag}: Zaproponowales juz wojne tej gildii."
  1936. stop
  1937. else:
  1938. send "{@Tag}: Ta gildia ma za malo punktow Honoru."
  1939. stop
  1940. else:
  1941. send "{@Tag}: Twoja gildia ma za malo punktow Honoru. Wymagane: &6{@warHonorRequired}&f."
  1942. stop
  1943. else:
  1944. send "{@Tag}: Ta gildia ma za malo czlonkow."
  1945. stop
  1946. else:
  1947. send "{@Tag}: Twoja gildia ma za malo czlonkow. Wymagane: &6{@warPlayersRequired}&f."
  1948. stop
  1949. else:
  1950. send "{@Tag}: Lider tej gildii jest offline."
  1951. stop
  1952. else:
  1953. send "{@Tag}: Nie jestes liderem tej gildii."
  1954. stop
  1955. else:
  1956. send "{@Tag}: Ta gildia prowadzi juz wojne."
  1957. stop
  1958. else:
  1959. send "{@Tag}: Twoja gildia prowadzi juz wojne"
  1960. stop
  1961. else:
  1962. send "{@Tag}: Nie ma takiej gildii."
  1963. stop
  1964. else:
  1965. send "{@Tag}: Musisz podac nazwe gildii, ktorej chcesz wypowiedziec wojne."
  1966. stop
  1967. if arg 2 is "akceptuj":
  1968. if arg 3 is set:
  1969. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1970. if {_Lider::%player%} is "%player%":
  1971. if {gb::Name::%arg 3%} is set:
  1972. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml"
  1973. if {_Wojna::%player%} is "Brak":
  1974. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  1975. if {_Wojna::%player%} is "Brak":
  1976. if {gb::gWarInvites::%{gb::gNamePlayer::%player%}%::*} contain "%arg 3%":
  1977. set yaml value "Wojna" from "GuildsBattles/Guilds/%arg 3%.yml" to "%{gb::gNamePlayer::%player%}%"
  1978. set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%arg 3%"
  1979. set {gb::warKills::%{gb::gNamePlayer::%player%}%} to 0
  1980. set {gb::warKills::%arg 3%} to 0
  1981. set {gb::warEnd::%arg 3%} to now
  1982. add 3 days to {gb::warEnd::%arg 3%}
  1983. set {gb::warEnd::%{gb::gNamePlayer::%player%}%} to {gb::warEnd::%arg 3%}
  1984. broadcast "{@Tag}: Wojna pomiedzy &6%{gb::gNamePlayer::%player%}%&f i &6%arg 3%&f rozpoczeta!"
  1985. else:
  1986. send "{@Tag}: Ta gildia nie proponuje Ci wojny, lub zaproszenie wygaslo."
  1987. stop
  1988. else:
  1989. send "{@Tag}: Twoja gildia prowadzi juz wojne."
  1990. stop
  1991. else:
  1992. send "{@Tag}: Ta gildia prowadzi juz wojne."
  1993. stop
  1994. else:
  1995. send "{@Tag}: Nie ma takiej gildii. %arg 3%"
  1996. stop
  1997. else:
  1998. send "{@Tag}: Nie jestes liderem tej gildii."
  1999. stop
  2000. else:
  2001. send "{@Tag}: Musisz podac nazwe gildii, z ktora chcesz miec wojne."
  2002. stop
  2003. if arg 2 is "statystyki" or "info" or "informacje":
  2004. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2005. if {_Wojna::%player%} isn't "Brak":
  2006. send "&f=======&6Informacje &4o wojnie&f======="
  2007. send "&2Przeciwnik: &6%{_Wojna::%player%}%"
  2008. send "&2Data zakonczenia: &6%{gb::warEnd::%{gb::gNamePlayer::%player%}%}%"
  2009. send "&2Zabojstwa twojej gildii: &6%{gb::warKills::%{gb::gNamePlayer::%player%}%}%"
  2010. send "&2Zabojstwa przciwnikow: &6%{gb::warKills::%{_Wojna::%player%}%}%"
  2011. else:
  2012. send "{@Tag}: Twoja gildia nie prowadzi wojny."
  2013. stop
  2014. if arg 2 is "zakoncz":
  2015. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2016. if {_Lider::%player%} is "%player%":
  2017. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2018. if {_Wojna::%player%} isn't "Brak":
  2019. set {_now::%player%} to now
  2020. if {_now::%player%} is greater than {gb::warEnd::%{gb::gNamePlayer::%player%}%}:
  2021. if {gb::warKills::%{gb::gNamePlayer::%player%}%} is greater than {gb::warKills::%{_Wojna::%player%}%}:
  2022. broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwygrala wojne przeciwko &6%{_Wojna::%player%}%&f."
  2023. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2024. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2025. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2026. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2027. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2028. add {@warGoldReward} to {_Gold::%player%}
  2029. add {@warManaReward} to {_Mana::%player%}
  2030. add {@warWoodReward} to {_Wood::%player%}
  2031. add {@warIronReward} to {_Iron::%player%}
  2032. add {@warHonorReward} to {_Honor::%player%}
  2033. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  2034. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  2035. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  2036. set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Iron::%player%}%"
  2037. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
  2038. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2039. remove {@warLoseHonor} from {_Honor::%player%}
  2040. set yaml value "Honor" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Honor::%player%}%"
  2041. set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
  2042. set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Brak"
  2043. clear {gb::warEnd::%{gb::gNamePlayer::%player%}%}
  2044. clear {gb::warEnd::%{_Wojna::%player%}%}
  2045. clear {gb::warKills::%{gb::gNamePlayer::%player%}%}
  2046. clear {gb::warKills::%{_Wojna::%player%}%}
  2047. stop
  2048. if {gb::warKills::%{gb::gNamePlayer::%player%}%} is smaller than {gb::warKills::%{_Wojna::%player%}%}:
  2049. broadcast "{@Tag}: Gildia &6%{_Wojna::%player%}% &fwygrala wojne przeciwko &6%{gb::gNamePlayer::%player%}%&f."
  2050. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2051. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2052. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2053. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2054. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2055. add {@warGoldReward} to {_Gold::%player%}
  2056. add {@warManaReward} to {_Mana::%player%}
  2057. add {@warWoodReward} to {_Wood::%player%}
  2058. add {@warIronReward} to {_Iron::%player%}
  2059. add {@warHonorReward} to {_Honor::%player%}
  2060. set yaml value "Gold" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Gold::%player%}%"
  2061. set yaml value "Mana" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Mana::%player%}%"
  2062. set yaml value "Wood" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Wood::%player%}%"
  2063. set yaml value "Iron" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Iron::%player%}%"
  2064. set yaml value "Honor" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Honor::%player%}%"
  2065. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2066. remove {@warLoseHonor} from {_Honor::%player%}
  2067. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
  2068. set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
  2069. set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Brak"
  2070. clear {gb::warEnd::%{gb::gNamePlayer::%player%}%}
  2071. clear {gb::warEnd::%{_Wojna::%player%}%}
  2072. clear {gb::warKills::%{gb::gNamePlayer::%player%}%}
  2073. clear {gb::warKills::%{_Wojna::%player%}%}
  2074. stop
  2075. if {gb::warKills::%{gb::gNamePlayer::%player%}%} is equal to {gb::warKills::%{_Wojna::%player%}%}:
  2076. broadcast "{@Tag}: Wojna pomiedzy gildia &6%{_Wojna::%player%}% &fi &6%{gb::gNamePlayer::%player%}%&f zostala zakonczona remisem."
  2077. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2078. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2079. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2080. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2081. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
  2082. add {@warRemisGoldReward} to {_Gold::%player%}
  2083. add {@warRemisManaReward} to {_Mana::%player%}
  2084. add {@warRemisWoodReward} to {_Wood::%player%}
  2085. add {@warRemisIronReward} to {_Iron::%player%}
  2086. add {@warRemisHonorReward} to {_Honor::%player%}
  2087. set yaml value "Gold" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Gold::%player%}%"
  2088. set yaml value "Mana" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Mana::%player%}%"
  2089. set yaml value "Wood" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Wood::%player%}%"
  2090. set yaml value "Iron" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Iron::%player%}%"
  2091. set yaml value "Honor" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Honor::%player%}%"
  2092. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2093. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2094. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2095. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2096. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2097. add {@warRemisGoldReward} to {_Gold::%player%}
  2098. add {@warRemisManaReward} to {_Mana::%player%}
  2099. add {@warRemisWoodReward} to {_Wood::%player%}
  2100. add {@warRemisIronReward} to {_Iron::%player%}
  2101. add {@warRemisHonorReward} to {_Honor::%player%}
  2102. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
  2103. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
  2104. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
  2105. set yaml value "Iron" from "GuildsBattles/Guilds%{gb::gNamePlayer::%player%}%.yml" to "%{_Iron::%player%}%"
  2106. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
  2107. set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
  2108. set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Brak"
  2109. clear {gb::warEnd::%{gb::gNamePlayer::%player%}%}
  2110. clear {gb::warEnd::%{_Wojna::%player%}%}
  2111. clear {gb::warKills::%{gb::gNamePlayer::%player%}%}
  2112. clear {gb::warKills::%{_Wojna::%player%}%}
  2113. stop
  2114. else:
  2115. send "{@Tag}: Wojna zakonczy sie: &6%{gb::warEnd::%{gb::gNamePlayer::%player%}%}%&f."
  2116. stop
  2117. else:
  2118. send "{@Tag}: Twoja gildia nie prowadzi wojny."
  2119. stop
  2120. else:
  2121. send "{@Tag}: Nie jestes liderem tej gildii."
  2122. stop
  2123. else:
  2124. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  2125. clear {gb::gNamePlayer::%player%}
  2126. else:
  2127. send "{@Tag}: Nie nalezysz do zadnej gildii."
  2128. stop
  2129. else:
  2130. send "{@Tag}: Nie masz do tego uprawnien."
  2131. stop
  2132. # ============================================================================================================================================================================= #
  2133. # ===================================================================== Sklep z efektami dla gildii: ========================================================================== #
  2134. # ============================================================================================================================================================================= #
  2135. if arg 1 is "alchemia":
  2136. if player has permission "gb.alchemia" or "gb.*":
  2137. if {gb::gNamePlayer::%player%} is set:
  2138. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  2139. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2140. if {_Lider::%player%} is "%player%":
  2141. set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2142. if "%{_Alchemik::%player%}%" isn't "0":
  2143. set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2144. if "%{_Efekt::%player%}%" is "Brak":
  2145. if "%{_Alchemik::%player%}%" is "1" or "b.2":
  2146. open chest with 5 rows named "&6Efekty:" to player
  2147. format slot 20 of player with 1 of diamond sword named "&eSila I" with lore "&6Nadaje efekt Sila I dla calej gildii||Czas trwania: 1 godzina||Koszt: 150 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% sila"
  2148. format slot 22 of player with 1 of diamond boots named "&eSzybkosc I" with lore "&6Nadaje efekt Szybkosc I dla calej gildii||Czas trwania: 1 godzina||Koszt: 150 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% szybkosc"
  2149. format slot 24 of player with 1 of golden apple:1 named "&eRegeneracja I" with lore "&6Nadaje efekt Regeneracja I dla calej gildii||Czas trwania: 1 godzina||Koszt: 200 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% regen"
  2150. if "%{_Alchemik::%player%}%" is "2" or "b.3":
  2151. open chest with 5 rows named "&6Efekty:" to player
  2152. format slot 20 of player with 1 of diamond sword named "&eSila I" with lore "&6Nadaje efekt Sila I dla calej gildii||Czas trwania: 1 godzina||Koszt: 150 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% sila"
  2153. format slot 22 of player with 1 of diamond boots named "&eSzybkosc I" with lore "&6Nadaje efekt Szybkosc I dla calej gildii||Czas trwania: 1 godzina||Koszt: 150 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% szybkosc"
  2154. format slot 24 of player with 1 of golden apple:1 named "&eRegeneracja I" with lore "&6Nadaje efekt Regeneracja I dla calej gildii||Czas trwania: 1 godzina||Koszt: 200 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% regen"
  2155. format slot 29 of player with 1 of diamond sword named "&eSila II" with lore "&6Nadaje efekt Sila II dla calej gildii||Czas trwania: 1 godzina||Koszt: 300 many" to run "guildeffects 2 %{gb::gNamePlayer::%player%}% sila"
  2156. format slot 31 of player with 1 of diamond boots named "&eSzybkosc II" with lore "&6Nadaje efekt Szybkosc II dla calej gildii||Czas trwania: 1 godzina||Koszt: 300 many" to run "guildeffects 2 %{gb::gNamePlayer::%player%}% szybkosc"
  2157. format slot 33 of player with 1 of golden apple:1 named "&eRegeneracja II" with lore "&6Nadaje efekt Regeneracja II dla calej gildii||Czas trwania: 1 godzina||Koszt: 400 many" to run "guildeffects 2 %{gb::gNamePlayer::%player%}% regen"
  2158. if "%{_Alchemik::%player%}%" is "3":
  2159. open chest with 5 rows named "&6Efekty:" to player
  2160. format slot 20 of player with 1 of diamond sword named "&eSila I" with lore "&6Nadaje efekt Sila I dla calej gildii||Czas trwania: 1 godzina||Koszt: 150 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% sila"
  2161. format slot 22 of player with 1 of diamond boots named "&eSzybkosc I" with lore "&6Nadaje efekt Szybkosc I dla calej gildii||Czas trwania: 1 godzina||Koszt: 150 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% szybkosc"
  2162. format slot 24 of player with 1 of golden apple:1 named "&eRegeneracja I" with lore "&6Nadaje efekt Regeneracja I dla calej gildii||Czas trwania: 1 godzina||Koszt: 200 many" to run "guildeffects 1 %{gb::gNamePlayer::%player%}% regen"
  2163. format slot 29 of player with 1 of diamond sword named "&eSila II" with lore "&6Nadaje efekt Sila II dla calej gildii||Czas trwania: 1 godzina||Koszt: 300 many" to run "guildeffects 2 %{gb::gNamePlayer::%player%}% sila"
  2164. format slot 31 of player with 1 of diamond boots named "&eSzybkosc II" with lore "&6Nadaje efekt Szybkosc II dla calej gildii||Czas trwania: 1 godzina||Koszt: 300 many" to run "guildeffects 2 %{gb::gNamePlayer::%player%}% szybkosc"
  2165. format slot 33 of player with 1 of golden apple:1 named "&eRegeneracja II" with lore "&6Nadaje efekt Regeneracja II dla calej gildii||Czas trwania: 1 godzina||Koszt: 400 many" to run "guildeffects 2 %{gb::gNamePlayer::%player%}% regen"
  2166. format slot 38 of player with 1 of diamond sword named "&eSila II" with lore "&6Nadaje efekt Sila II dla calej gildii||Czas trwania: 2 godziny||Koszt: 600 many" to run "guildeffects 3 %{gb::gNamePlayer::%player%}% sila"
  2167. format slot 40 of player with 1 of diamond boots named "&eSzybkosc II" with lore "&6Nadaje efekt Szybkosc II dla calej gildii||Czas trwania: 2 godziny||Koszt: 600 many" to run "guildeffects 3 %{gb::gNamePlayer::%player%}% szybkosc"
  2168. format slot 42 of player with 1 of golden apple:1 named "&eRegeneracja II" with lore "&6Nadaje efekt Regeneracja II dla calej gildii||Czas trwania: 2 godziny||Koszt: 800 many" to run "guildeffects 3 %{gb::gNamePlayer::%player%}% regen"
  2169. else:
  2170. send "{@Tag}: Juz wykupiles efekt dla gildii."
  2171. stop
  2172. if "%{_Alchemik::%player%}%" is "0":
  2173. send "{@Tag}: Aby kozystac ze sklup musisz wybudowac Alchemika."
  2174. stop
  2175. else:
  2176. send "{@Tag}: Nie jestes liderem tej gildii."
  2177. stop
  2178. else:
  2179. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  2180. clear {gb::gNamePlayer::%player%}
  2181. else:
  2182. send "{@Tag}: Nie nalezysz do zadnej gildii."
  2183. stop
  2184. else:
  2185. send "{@Tag}: Nie masz do tego uprawnien."
  2186. stop
  2187. # ============================================================================================================================================================================= #
  2188. # ===================================================================== Awansowanie gracza (rekrut->czlonek->dowodca): =================================================================================== #
  2189. # ============================================================================================================================================================================= #
  2190. if arg 1 is "awans":
  2191. if player has permission "gb.awans" or "gb.*":
  2192. if {gb::gNamePlayer::%player%} is set:
  2193. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  2194. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2195. if {_Lider::%player%} is "%player%":
  2196. if arg 2 is set:
  2197. set {_gracz} to arg 2 parsed as player
  2198. if arg 2 isn't "%player%":
  2199. if {_gracz} is online:
  2200. if {gb::gNamePlayer::%{_gracz}%} is {gb::gNamePlayer::%player%}:
  2201. if {gb::gRank::%{_gracz}%} is "rekrut":
  2202. clear {gb::gRank::%{_gracz}%}
  2203. send "{@Tag}: Awansowales gracza &6%{_gracz}% &fna czlonka gildii."
  2204. send "{@Tag}: Zostales awansowany na czlonka gildii." to {_gracz}
  2205. stop
  2206. if {gb::gRank::%{_gracz}%} is not set:
  2207. set {gb::gRank::%{_gracz}%} to "dowodca"
  2208. send "{@Tag}: Awansowales gracza &6%{_gracz}% &fna dowodce gildii."
  2209. send "{@Tag}: Zostales awansowany na dowodce gildii." to {_gracz}
  2210. stop
  2211. if {gb::gRank::%{_gracz}%} is "dowodca":
  2212. send "{@Tag}: Nie mozesz awansowac tego gracza."
  2213. stop
  2214. else:
  2215. send "{@Tag}: Ten gracz nie jest w twojej gildii."
  2216. stop
  2217. else:
  2218. send "{@Tag}: Tego gracza nie ma na serwerze."
  2219. stop
  2220. else:
  2221. send "{@Tag}: Nie mozesz awansowac samego siebie."
  2222. stop
  2223. else:
  2224. send "{@Tag}: Musisz podac gracza, ktorego chcesz awansowac."
  2225. stop
  2226. else:
  2227. send "{@Tag}: Nie jestes liderem tej gildii."
  2228. stop
  2229. else:
  2230. send "{@Tag}: Twoja gildia nie istnieje."
  2231. clear {gb::gNamePlayer::%player%}
  2232. stop
  2233. else:
  2234. send "{@Tag}: Nie nalezysz do zadnej gildii."
  2235. stop
  2236. else:
  2237. send "{@Tag}: Nie masz do tego uprawnien."
  2238. stop
  2239. if arg 1 is "degradacja" or "degrad":
  2240. if player has permission "gb.degrad" or "gb.*":
  2241. if {gb::gNamePlayer::%player%} is set:
  2242. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  2243. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2244. if {_Lider::%player%} is "%player%":
  2245. if arg 2 is set:
  2246. set {_gracz} to arg 2 parsed as player
  2247. if {_gracz} isn't "%player%":
  2248. if {gb::gNamePlayer::%{_gracz}%} is {gb::gNamePlayer::%player%}:
  2249. if {gb::gRank::%{_gracz}%} is "dowodca":
  2250. clear {gb::gRank::%{_gracz}%}
  2251. send "{@Tag}: Zdegradowales gracza &6%{_gracz}%&f."
  2252. if {_gracz} is online:
  2253. send "{@Tag}: Zostales zdegradowany." to {_gracz}
  2254. stop
  2255. if {gb::gRank::%{_gracz}%} is not set:
  2256. set {gb::gRank::%{_gracz}%} to "rekrut"
  2257. send "{@Tag}: Zdegradowales gracza &6%{_gracz}%&f."
  2258. if {_gracz} is online:
  2259. send "{@Tag}: Zostales zdegradowany." to {_gracz}
  2260. stop
  2261. if {gb::gRank::%{_gracz}%} is "rekrut":
  2262. send "{@Tag}: Nie mozesz zdegradowac tego gracza."
  2263. stop
  2264. else:
  2265. send "{@Tag}: Ten gracz nie jest w twojej gildii."
  2266. stop
  2267. else:
  2268. send "{@Tag}: Nie mozesz zdegradowac samego siebie."
  2269. stop
  2270. else:
  2271. send "{@Tag}: Musisz podac gracza, ktorego chcesz zdegradowac."
  2272. stop
  2273. else:
  2274. send "{@Tag}: Nie jestes liderem tej gildii."
  2275. stop
  2276. else:
  2277. send "{@Tag}: Twoja gildia nie istnieje."
  2278. clear {gb::gNamePlayer::%player%}
  2279. stop
  2280. else:
  2281. send "{@Tag}: Nie nalezysz do zadnej gildii."
  2282. stop
  2283. else:
  2284. send "{@Tag}: Nie masz do tego uprawnien."
  2285. stop
  2286. # ============================================================================================================================================================================= #
  2287. # ===================================================================== Surowce dla gildii: =================================================================================== #
  2288. # ============================================================================================================================================================================= #
  2289.  
  2290. every 15 second:
  2291. loop {gb::gName::*}:
  2292. set {_Lider::%loop-value%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as player
  2293. set {_Ratusz::%loop-value%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml"
  2294. set {_Tartak::%loop-value%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml"
  2295. set {_Alchemik::%loop-value%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml"
  2296. if {_Lider::%loop-value%} is online:
  2297. if "%{_Ratusz::%loop-value%}%" is "1":
  2298. set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2299. if 50+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
  2300. add 50 to {_Gold::%loop-value%}
  2301. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2302. else:
  2303. add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
  2304. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2305. if "%{_Ratusz::%loop-value%}%" is "2" or "b.2":
  2306. set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2307. if 100+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
  2308. add 100 to {_Gold::%loop-value%}
  2309. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2310. else:
  2311. add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
  2312. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2313. if "%{_Ratusz::%loop-value%}%" is "3" or "b.3":
  2314. set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2315. if 150+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
  2316. add 150 to {_Gold::%loop-value%}
  2317. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2318. else:
  2319. add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
  2320. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2321. if "%{_Ratusz::%loop-value%}%" is "4":
  2322. set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2323. if 200+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
  2324. add 200 to {_Gold::%loop-value%}
  2325. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2326. else:
  2327. add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
  2328. set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
  2329. if "%{_Tartak::%loop-value%}%" is "1":
  2330. set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2331. if 50+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
  2332. add 50 to {_Wood::%loop-value%}
  2333. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2334. else:
  2335. add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
  2336. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2337. if "%{_Tartak::%loop-value%}%" is "2" or "b.2":
  2338. set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2339. if 100+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
  2340. add 100 to {_Wood::%loop-value%}
  2341. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2342. else:
  2343. add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
  2344. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2345. if "%{_Tartak::%loop-value%}%" is "3" or "b.3":
  2346. set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2347. if 150+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
  2348. add 150 to {_Wood::%loop-value%}
  2349. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2350. else:
  2351. add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
  2352. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2353. if "%{_Tartak::%loop-value%}%" is "4":
  2354. set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2355. if 200+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
  2356. add 500 to {_Wood::%loop-value%}
  2357. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2358. else:
  2359. add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
  2360. set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
  2361. if "%{_Alchemik::%loop-value%}%" is "1":
  2362. set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2363. if 5+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
  2364. add 5 to {_Mana::%loop-value%}
  2365. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2366. else:
  2367. add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
  2368. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2369. if "%{_Alchemik::%loop-value%}%" is "2" or "b.2":
  2370. set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2371. if 10+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
  2372. add 10 to {_Mana::%loop-value%}
  2373. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2374. else:
  2375. add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
  2376. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2377. if "%{_Alchemik::%loop-value%}%" is "3" or "b.3":
  2378. set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2379. if 15+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
  2380. add 15 to {_Mana::%loop-value%}
  2381. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2382. else:
  2383. add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
  2384. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2385. if "%{_Alchemik::%loop-value%}%" is "4":
  2386. set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
  2387. if 20+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
  2388. add 20 to {_Mana::%loop-value%}
  2389. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2390. else:
  2391. add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
  2392. set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
  2393. stop
  2394. # ============================================================================================================================================================================= #
  2395. # ===================================================================== Chat dla gildii: ====================================================================================== #
  2396. # ============================================================================================================================================================================= #
  2397. on chat:
  2398. if {gb::gNamePlayer::%player%} is set:
  2399. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  2400. if {gb::gDescPlayer::%player%} is not set:
  2401. {gb::Chat::%name of player%} is true:
  2402. cancel event
  2403. set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2404. if {_Lider::%player%} is "%player%":
  2405. send "&2[&6Gildia&2] &4%name of player%&f: &2&l%message%" to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  2406. else:
  2407. send "&2[&6Gildia&2] &6%name of player%&f: &2&l%message%" to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
  2408. stop
  2409. if {gb::gDescPlayer::%player%} is true:
  2410. if "%message%" contain "&":
  2411. send "{@Tag}: Opis zawiera niedozwolone znaki. (''&'')."
  2412. cancel event
  2413. clear {gb::gDescPlayer::%player%}
  2414. else:
  2415. if length of "%message%" is smaller or equal to 50:
  2416. cancel event
  2417. set yaml value "Desc" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%message%"
  2418. send "{@Tag}: Ustawiles opis gildii: %message%"
  2419. clear {gb::gDescPlayer::%player%}
  2420. stop
  2421. else:
  2422. send "{@Tag}: Opis nie moze zawierac wiecej niz 50 znakow."
  2423. cancel event
  2424. clear {gb::gDescPlayer::%player%}
  2425. stop
  2426. else:
  2427. send "{@Tag}: Gildia w ktorej byles nie istnieje."
  2428. clear {gb::gNamePlayer::%player%}
  2429. # ============================================================================================================================================================================= #
  2430. # ===================================================================== Zabojstwa i zgony: ==================================================================================== #
  2431. # ============================================================================================================================================================================= #
  2432. on death of player:
  2433. if attacker is not set:
  2434. if damage was caused by fall:
  2435. if {gb::gNamePlayer::%victim%} is set:
  2436. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2437. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2438. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2439. remove 5 from {_Honor::%victim%}
  2440. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2441. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fzginal przez upadek."
  2442. else:
  2443. broadcast "{@Tag}: Gracz &6%victim% &fzginal przez upadek."
  2444. clear {gb::gNamePlayer::%victim%}
  2445. else:
  2446. broadcast "{@Tag}: Gracz &6%victim% &fzginal przez upadek."
  2447. stop
  2448. if damage was caused by lava:
  2449. if {gb::gNamePlayer::%victim%} is set:
  2450. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2451. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2452. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2453. remove 5 from {_Honor::%victim%}
  2454. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2455. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &futopil sie w lawie."
  2456. else:
  2457. broadcast "{@Tag}: Gracz &6%victim% &futopil sie w lawie."
  2458. clear {gb::gNamePlayer::%victim%}
  2459. else:
  2460. broadcast "{@Tag}: Gracz &6%victim% &futopil sie w lawie."
  2461. stop
  2462. if damage was caused by fire:
  2463. if {gb::gNamePlayer::%victim%} is set:
  2464. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2465. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2466. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2467. remove 5 from {_Honor::%victim%}
  2468. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2469. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fsplonal."
  2470. else:
  2471. broadcast "{@Tag}: Gracz &6%victim% &fsplonal."
  2472. clear {gb::gNamePlayer::%victim%}
  2473. else:
  2474. broadcast "{@Tag}: Gracz &6%victim% &fsplonal."
  2475. stop
  2476. if damage was caused by drown:
  2477. if {gb::gNamePlayer::%victim%} is set:
  2478. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2479. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2480. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2481. remove 5 from {_Honor::%victim%}
  2482. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2483. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &futona."
  2484. else:
  2485. broadcast "{@Tag}: Gracz &6%victim% &futona."
  2486. clear {gb::gNamePlayer::%victim%}
  2487. else:
  2488. broadcast "{@Tag}: Gracz &6%victim% &futona."
  2489. if attacker is player:
  2490. if {gb::gNamePlayer::%attacker%} is set:
  2491. if {gb::gNamePlayer::%victim%} is set:
  2492. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2493. if {gb::Name::%{gb::gNamePlayer::%attacker%}%} is set:
  2494. if {gb::gNamePlayer::%attacker%} is {gb::gNamePlayer::%victim%}:
  2495. if {@guildPvp} is true:
  2496. set {_Lider::%attacker%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2497. if {_Lider::%player%} is "%attacker%":
  2498. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" parsed as number
  2499. remove 20 from {_Honor::%attacker%}
  2500. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2501. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&4-&225&6)&f."
  2502. stop
  2503. else:
  2504. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" parsed as number
  2505. remove 15 from {_Honor::%attacker%}
  2506. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2507. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&4-&215&6)&f."
  2508. stop
  2509. else:
  2510. set {_Wojna::%attacker%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2511. if {_Wojna::%attacker%} is "Brak":
  2512. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" parsed as number
  2513. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" parsed as number
  2514. add 5 to {_Honor::%attacker%}
  2515. remove 5 from {_Honor::%victim%}
  2516. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2517. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2518. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&25&6)&f."
  2519. stop
  2520. if {_Wojna::%attacker%} isn't "Brak":
  2521. set {_Wojna::%victim%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2522. if {_Wojna::%victim%} is "Brak":
  2523. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2524. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2525. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2526. set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
  2527. add 5 to {_Honor::%attacker%}
  2528. remove 5 from {_Honor::%victim%}
  2529. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2530. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2531. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&25&6)&f."
  2532. stop
  2533. if {_Wojna::%victim%} isn't "Brak":
  2534. if {_Wojna::%attacker%} isn't {gb::gNamePlayer::%victim%}:
  2535. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2536. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2537. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2538. set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
  2539. add 5 to {_Honor::%attacker%}
  2540. remove 5 from {_Honor::%victim%}
  2541. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2542. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2543. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&25&6)&f."
  2544. stop
  2545. if {_Wojna::%attacker%} is {gb::gNamePlayer::%victim%}:
  2546. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2547. set {_Gold::%attacker%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2548. set {_Mana::%attacker%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2549. set {_Wood::%attacker%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2550. set {_Iron::%attacker%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2551. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2552. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2553. set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
  2554. add {@warKillHonorReward} to {_Honor::%attacker%}
  2555. add {@warKillGoldReward} to {_Gold::%attacker%}
  2556. add {@warKillWoodReward} to {_Wood::%attacker%}
  2557. add {@warKillIronReward} to {_Iron::%attacker%}
  2558. add {@warKillManaReward} to {_Mana::%attacker%}
  2559. remove {@warKillHonorReward} from {_Honor::%victim%}
  2560. add 1 to {gb::warKills::%{gb::gNamePlayer::%attacker%}%}
  2561. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2562. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Gold::%attacker%}%"
  2563. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Mana::%attacker%}%"
  2564. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Wood::%attacker%}%"
  2565. set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Iron::%attacker%}%"
  2566. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2567. broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&215&6) &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&215&6)&f."
  2568. stop
  2569. else:
  2570. clear {gb::gNamePlayer::%attacker%}
  2571. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2572. set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
  2573. add 1 to {_Honor::%attacker%}
  2574. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2575. broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&21&6)&f."
  2576. stop
  2577. else:
  2578. clear {gb::gNamePlayer::%victim%}
  2579. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2580. set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
  2581. add 1 to {_Honor::%attacker%}
  2582. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2583. broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&21&6)&f."
  2584. stop
  2585. else:
  2586. set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2587. set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
  2588. add 1 to {_Honor::%attacker%}
  2589. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
  2590. broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&21&6)&f."
  2591. stop
  2592. else:
  2593. if {gb::gNamePlayer::%victim%} is set:
  2594. set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2595. set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
  2596. remove 5 from {_Honor::%victim%}
  2597. set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
  2598. broadcast "{@Tag}: Gracz &2[&6%{gb::gTag::%{_gName::%victim%}%}%&2]&6&6%victim% &6(&4-&25&6) &fzostal zabity przez %attacker%."
  2599. stop
  2600. else:
  2601. broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &6%attacker%."
  2602. stop
  2603. # ============================================================================================================================================================================= #
  2604. # ===================================================================== Pvp w gildii: ===================================================================================== #
  2605. # ============================================================================================================================================================================= #
  2606. on damage:
  2607. if victim is player:
  2608. if attacker is player:
  2609. if {gb::gNamePlayer::%attacker%} is set:
  2610. if {gb::gNamePlayer::%victim%} is set:
  2611. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2612. if {gb::Name::%{gb::gNamePlayer::%attacker%}%} is set:
  2613. if {gb::gNamePlayer::%attacker%} is {gb::gNamePlayer::%victim%}:
  2614. if {@guildPvp} is false:
  2615. cancel event
  2616. send "{@Tag}: Nie mozesz uderzyc gracza z gildii"
  2617. stop
  2618. else:
  2619. clear {gb::gNamePlayer::%attacker%}
  2620. stop
  2621. else:
  2622. clear {gb::gNamePlayer::%victim%}
  2623. stop
  2624.  
  2625. # ============================================================================================================================================================================= #
  2626. # ===================================================================== Tworzenie plikow konfiguracyjnych: ==================================================================== #
  2627. # ============================================================================================================================================================================= #
  2628. on load:
  2629. if folder "plugins/Skript/scripts/GuildsBattles" doesn't exists:
  2630. create folder "plugins/Skript/scripts/GuildsBattles"
  2631. create folder "plugins/Skript/scripts/GuildsBattles/Guilds"
  2632. create file "plugins/Skript/scripts/GuildsBattles/config.yml"
  2633. if folder "plugins/Skript/scripts/GuildsBattles" exists:
  2634. if folder "plugins/Skript/scripts/GuildsBattles/Guilds" doesn't exists:
  2635. create folder "plugins/Skript/scripts/GuildsBattles/Guilds"
  2636. if file "plugins/Skript/scripts/GuildsBattles/config.yml" doesn't exists:
  2637. create file "plugins/Skript/scripts/GuildsBattles/config.yml"
  2638.  
  2639. # ============================================================================================================================================================================= #
  2640. # ===================================================================== Sklep z efektami p.2 ================================================================================== #
  2641. # ============================================================================================================================================================================= #
  2642. command /guildeffects [<number>] [<text>] [<text>]:
  2643. executable by: console
  2644. trigger:
  2645. if arg 1 is set:
  2646. if arg 2 is set:
  2647. if arg 3 is "sila":
  2648. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2649. if "%{_Efekt::%arg 2%}%" is "Brak":
  2650. set {_number} to arg 1
  2651. if {_number} is "1":
  2652. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2653. if {_Mana::%arg 2%} is greater or equal to 150:
  2654. remove 150 from {_Mana::%arg 2%}
  2655. set {_Efekt::%arg 2%} to "Sila I"
  2656. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2657. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2658. set {gb::Efekt::TimeOut::%arg 2%} to now
  2659. add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
  2660. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Sila I na 1 godzine."
  2661. stop
  2662. else:
  2663. send "{@Tag}: Nie masz tyle many. (&6150&f)."
  2664. stop
  2665. if {_number} is "2":
  2666. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2667. if {_Mana::%arg 2%} is greater or equal to 300:
  2668. remove 300 from {_Mana::%arg 2%}
  2669. set {_Efekt::%arg 2%} to "Sila II"
  2670. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2671. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2672. set {gb::Efekt::TimeOut::%arg 2%} to now
  2673. add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
  2674. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Sila II na 1 godzine."
  2675. stop
  2676. else:
  2677. send "{@Tag}: Nie masz tyle many. (&6300&f)."
  2678. stop
  2679. if {_number} is "3":
  2680. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2681. if {_Mana::%arg 2%} is greater or equal to 600:
  2682. remove 600 from {_Mana::%arg 2%}
  2683. set {_Efekt::%arg 2%} to "Sila II"
  2684. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2685. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2686. set {gb::Efekt::TimeOut::%arg 2%} to now
  2687. add 2 hours to {gb::Efekt::TimeOut::%arg 2%}
  2688. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Sila II na 2 godziny."
  2689. stop
  2690. else:
  2691. send "{@Tag}: Nie masz tyle many. (&6600&f)."
  2692. stop
  2693. if arg 3 is "szybkosc":
  2694. set {_number} to arg 1
  2695. if {_number} is "1":
  2696. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2697. if "%{_Efekt::%arg 2%}%" is "Brak":
  2698. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2699. if {_Mana::%arg 2%} is greater or equal to 150:
  2700. remove 150 from {_Mana::%arg 2%}
  2701. set {_Efekt::%arg 2%} to "Szybkosc I"
  2702. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2703. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2704. set {gb::Efekt::TimeOut::%arg 2%} to now
  2705. add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
  2706. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Szybkosc I na 1 godzine."
  2707. loop {gb::gPlayers::%arg 2%::*}:
  2708. run loop-value command "/speed 1.5" as op
  2709. wait 1 hour
  2710. loop {gb::gPlayers::%arg 2%::*}:
  2711. run loop-value command "/speed 1" as op
  2712. stop
  2713. else:
  2714. send "{@Tag}: Nie masz tyle many. (&6150&f)."
  2715. stop
  2716. if {_number} is "2":
  2717. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2718. if "%{_Efekt::%arg 2%}%" is "Brak":
  2719. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2720. if {_Mana::%arg 2%} is greater or equal to 300:
  2721. remove 300 from {_Mana::%arg 2%}
  2722. set {_Efekt::%arg 2%} to "Szybkosc I"
  2723. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2724. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2725. set {gb::Efekt::TimeOut::%arg 2%} to now
  2726. add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
  2727. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Szybkosc II na 1 godzine."
  2728. loop {gb::gPlayers::%arg 2%::*}:
  2729. run loop-value command "/speed 2" as op
  2730. wait 2 hours
  2731. loop {gb::gPlayers::%arg 2%::*}:
  2732. run loop-value command "/speed 1" as op
  2733. stop
  2734. else:
  2735. send "{@Tag}: Nie masz tyle many. (&6300&f)."
  2736. stop
  2737. if {_number} is "3":
  2738. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2739. if "%{_Efekt::%arg 2%}%" is "Brak":
  2740. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2741. if {_Mana::%arg 2%} is greater or equal to 600:
  2742. remove 150 from {_Mana::%arg 2%}
  2743. set {_Efekt::%arg 2%} to "Szybkosc I"
  2744. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2745. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2746. set {gb::Efekt::TimeOut::%arg 2%} to now
  2747. add 2 hours to {gb::Efekt::TimeOut::%arg 2%}
  2748. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Szybkosc II na 2 godziny."
  2749. loop {gb::gPlayers::%arg 2%::*}:
  2750. run loop-value command "/speed 2" as op
  2751. wait 2 hours
  2752. loop {gb::gPlayers::%arg 2%::*}:
  2753. run loop-value command "/speed 1" as op
  2754. stop
  2755. else:
  2756. send "{@Tag}: Nie masz tyle many. (&6600&f)."
  2757. stop
  2758. if arg 2 is "regen":
  2759. set {_number} to arg 1
  2760. if {_number} is "1":
  2761. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2762. if "%{_Efekt::%arg 2%}%" is "Brak":
  2763. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2764. if {_Mana::%arg 2%} is greater or equal to 200:
  2765. remove 200 from {_Mana::%arg 2%}
  2766. set {_Efekt::%arg 2%} to "Regen I"
  2767. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2768. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2769. set {gb::Efekt::TimeOut::%arg 2%} to now
  2770. add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
  2771. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Regeneracja I na 1 godzine."
  2772. stop
  2773. else:
  2774. send "{@Tag}: Nie masz tyle many. (&6200&f)."
  2775. stop
  2776. if {_number} is "2":
  2777. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2778. if "%{_Efekt::%arg 2%}%" is "Brak":
  2779. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2780. if {_Mana::%arg 2%} is greater or equal to 400:
  2781. remove 400 from {_Mana::%arg 2%}
  2782. set {_Efekt::%arg 2%} to "Regen II"
  2783. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2784. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2785. set {gb::Efekt::TimeOut::%arg 2%} to now
  2786. add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
  2787. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Regeneracja II na 1 godzine."
  2788. stop
  2789. else:
  2790. send "{@Tag}: Nie masz tyle many. (&6400&f)."
  2791. stop
  2792. if {_number} is "3":
  2793. set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
  2794. if "%{_Efekt::%arg 2%}%" is "Brak":
  2795. set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
  2796. if {_Mana::%arg 2%} is greater or equal to 800:
  2797. remove 800 from {_Mana::%arg 2%}
  2798. set {_Efekt::%arg 2%} to "Regen II"
  2799. set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
  2800. set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
  2801. set {gb::Efekt::TimeOut::%arg 2%} to now
  2802. add 2 hours to {gb::Efekt::TimeOut::%arg 2%}
  2803. broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Regeneracja II na 2 godziny."
  2804. stop
  2805. else:
  2806. send "{@Tag}: Nie masz tyle many. (&6800&f)."
  2807. stop
  2808. # ============================================================================================================================================================================= #
  2809. # ===================================================================== Wlasne efekty: ======================================================================================== #
  2810. # ============================================================================================================================================================================= #
  2811. on damage:
  2812. if attacker is player:
  2813. if {gb::gNamePlayer::%attacker%} is set:
  2814. if {gb::Name::%{gb::gNamePlayer::%attacker%}%} is set:
  2815. set {_Efekt::%attacker%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
  2816. if "%{_Efekt::%attacker%}%" is "Sila I":
  2817. set {_now} to now
  2818. if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%attacker%}%}:
  2819. set {_Efekt::%attacker%} to "Brak"
  2820. set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Efekt::%attacker%}%"
  2821. stop
  2822. else:
  2823. set damage to damage*1.3
  2824. stop
  2825. if "%{_Efekt::%attacker%}%" is "Sila I":
  2826. set {_now} to now
  2827. if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%attacker%}%}:
  2828. set {_Efekt::%attacker%} to "Brak"
  2829. set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Efekt::%attacker%}%"
  2830. stop
  2831. else:
  2832. set damage to damage*1.8
  2833. stop
  2834. else:
  2835. clear {gb::gNamePlayer::%attacker%}
  2836. stop
  2837. if victim is player:
  2838. if {gb::gNamePlayer::%victim%} is set:
  2839. if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
  2840. set {_Efekt::%victim%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
  2841. if "%{_Efekt::%victim%}%" is "Regen I":
  2842. set {_now} to now
  2843. if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%victim%}%}:
  2844. set {_Efekt::%victim%} to "Brak"
  2845. set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Efekt::%victim%}%"
  2846. stop
  2847. else:
  2848. apply regeneration 1 to victim
  2849. stop
  2850. if "%{_Efekt::%victim%}%" is "Regen II":
  2851. set {_now} to now
  2852. if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%victim%}%}:
  2853. set {_Efekt::%victim%} to "Brak"
  2854. set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Efekt::%victim%}%"
  2855. stop
  2856. else:
  2857. apply regeneration 2 to victim
  2858. stop
  2859. else:
  2860. clear {gb::gNamePlayer::%victim%}
  2861. stop
  2862. if victim is player:
  2863. if attacker is player:
  2864. if {teleport::%victim%} is true:
  2865. clear {teleport::%victim%}
  2866. send "{@Tag}: Teleportacja anulowana." to victim
  2867. if {teleport::%attacker%} is true:
  2868. clear {teleport::%attacker%}
  2869. send "{@Tag}: Teleportacja anulowana." to attacker
  2870. stop
  2871. on login:
  2872. if {gb::gNamePlayer::%player%} is set:
  2873. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  2874. set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2875. if "%{_Efekt::%player%}%" is "Szybkosc I":
  2876. set {_now} to now
  2877. if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%player%}%}:
  2878. set {_Efekt::%player%} to "Brak"
  2879. set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%player%}%.yml" to "%{_Efekt::%player%}%"
  2880. run player command "/speed 1" as op
  2881. stop
  2882. else:
  2883. run player command "/speed 1.5" as op
  2884. stop
  2885. if "%{_Efekt::%player%}%" is "Szybkosc II":
  2886. set {_now} to now
  2887. if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%player%}%}:
  2888. set {_Efekt::%player%} to "Brak"
  2889. set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%player%}%.yml" to "%{_Efekt::%player%}%"
  2890. run player command "/speed 1" as op
  2891. stop
  2892. else:
  2893. run player command "/speed 2" as op
  2894. stop
  2895. else:
  2896. clear {gb::gNamePlayer::%player%}
  2897. stop
  2898. # ============================================================================================================================================================================= #
  2899. # ===================================================================== Akcje na terenie gildii: ============================================================================== #
  2900. # ============================================================================================================================================================================= #
  2901. on place:
  2902. if {@enableCuboids} is true:
  2903. if player is op:
  2904. stop
  2905. else:
  2906. if location of event-block is in any region:
  2907. set {_region::%player%} to Region.getAt{location of player};
  2908. if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
  2909. stop
  2910. else:
  2911. send "{@Tag}: Nie jestes na terenie swojej gildii."
  2912. cancel event
  2913. stop
  2914. on break:
  2915. if {@enableCuboids} is true:
  2916. if player is op:
  2917. stop
  2918. else:
  2919. if location of event-block is in any region:
  2920. set {_region::%player%} to Region.getAt{location of player};
  2921. if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
  2922. stop
  2923. else:
  2924. send "{@Tag}: Nie jestes na terenie swojej gildii."
  2925. cancel event
  2926. stop
  2927. on rightclick:
  2928. if clicked block is chest or furnace or hopper or trapped chest or dispenser or dropper or brewing stand or lever:
  2929. if {@enableCuboids} is true:
  2930. if {@openChests} is false:
  2931. if player is op:
  2932. stop
  2933. else:
  2934. if location of clicked block is in any region:
  2935. set {_region::%player%} to Region.getAt{location of player};
  2936. if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
  2937. stop
  2938. else:
  2939. send "{@Tag}: Nie jestes na terenie swojej gildii."
  2940. cancel event
  2941. stop
  2942. else:
  2943. stop
  2944. else:
  2945. stop
  2946. # ============================================================================================================================================================================= #
  2947. # ===================================================================== Niszczenie obsydianu/wody: ============================================================================ #
  2948. # ============================================================================================================================================================================= #
  2949. on explode:
  2950. loop blocks in radius 2:
  2951. if loop-block is obsidian:
  2952. if {@tntDestroy} is true:
  2953. chance of {@tntChance}%:
  2954. set loop-block to air
  2955. loop blocks in radius 5:
  2956. if loop-block is water:
  2957. if {@tntDestroy} is true:
  2958. set loop-block to air
  2959. # ============================================================================================================================================================================= #
  2960. # ===================================================================== Akcje zwiazane z jajkiem: ============================================================================= #
  2961. # ============================================================================================================================================================================= #
  2962. on leftclick:
  2963. if {@enableCuboids} is true:
  2964. if {@guildDestroy} is true:
  2965. if clicked block is dragon egg:
  2966. if location of clicked block is in any region:
  2967. set {_region::%player%} to Region.getAt{location of player};
  2968. if {gb::Name::%{_region::%player%}%} is set:
  2969. if "%{_region::%player%}%" isn't "%{gb::gNamePlayer::%player%}%":
  2970. if {gb::gNamePlayer::%player%} is set:
  2971. if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
  2972. if {gb::gNamePlayer::%player%} isn't "%{_region::%player%}%":
  2973. if {gb::Egglife::%{_region::%player%}%} is greater than 0:
  2974. remove {@eggDamage} from {gb::Egglife::%{_region::%player%}%}
  2975. send "{@Tag}: Zycie jajka: %{gb::Egglife::%{_region::%player%}%}%"
  2976. if {gb::Egglife::%{_region::%player%}%} is smaller or equal to 0:
  2977. broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}%&f podbila gildie %{_region::%player%}%"
  2978. broadcast "{@Tag}: Pozycja tej gildii to: &6x:%x-coordinate of player% y:%y-coordinate of player% z:%z-coordinate of player%&f."
  2979. set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2980. add 150 to {_Honor::%player%}
  2981. set yaml value "Honor" from "GuildsBattles/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
  2982. loop blocks in radius 3 of clicked block:
  2983. if loop-block is bedrock:
  2984. add 1 to {_bedrock::%player%}
  2985. if {_bedrock::%player%} is 1:
  2986. set block below {gb::gCubiudCenter::%{_region::%player%}%} to air
  2987. set block at {gb::gCubiudCenter::%{_region::%player%}%} to air
  2988. clear {gb::eggLife::%{_region::%player%}%}
  2989. clear {gb::gCubiudCenter::%{_region::%player%}%}
  2990. if {@dropMaterials} is true:
  2991. chance of {@dropChance}%:
  2992. set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  2993. set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  2994. set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  2995. set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  2996. set {_myGold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2997. set {_myMana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2998. set {_myWood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  2999. set {_myIron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
  3000. if {_myGold::%player%}+{_Gold::%player%} is smaller or equal to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}:
  3001. add {_Gold::%player%} to {_myGold::%player%}
  3002. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myGold::%player%}%"
  3003. else:
  3004. add {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}-{_Gold::%player%} to {_myGold::%player%}
  3005. set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myGold::%player%}%"
  3006. if {_myMana::%player%}+{_Mana::%player%} is smaller or equal to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}:
  3007. add {_mana::%player%} to {_myMana::%player%}
  3008. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myMana::%player%}%"
  3009. else:
  3010. add {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}-{_Mana::%player%} to {_myMana::%player%}
  3011. set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myMana::%player%}%"
  3012. if {_myIron::%player%}+{_Iron::%player%} is smaller or equal to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}:
  3013. add {_Iron::%player%} to {_myIron::%player%}
  3014. set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myIron::%player%}%"
  3015. else:
  3016. add {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}-{_Iron::%player%} to {_myIron::%player%}
  3017. set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myIron::%player%}%"
  3018. if {_myWood::%player%}+{_Wood::%player%} is smaller or equal to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}:
  3019. add {_Wood::%player%} to {_myWood::%player%}
  3020. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myWood::%player%}%"
  3021. else:
  3022. add {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}-{_Wood::%player%} to {_myWood::%player%}
  3023. set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myWood::%player%}%"
  3024. send "{@Tag}: Udalo Ci sie przejac magazyn przeciwnikow!"
  3025. else:
  3026. send "{@Tag}: Magazyn przeciwnikow spłona."
  3027. set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  3028. "%{_region::%player%}%".Region.delete{};
  3029. if "%{_Efekt::%player%}%" is "Regen I" or "Regen II":
  3030. loop {gb::gPlayers::%{_region::%player%}%::*}:
  3031. set {_x::%player%} to loop-value parsed as player
  3032. remove regeneration from {_x::%player%}
  3033. if {@warEnable} is true:
  3034. set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  3035. if {_Wojna::%player%} isn't "Brak":
  3036. set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
  3037. loop {gb::gName::*}:
  3038. if {gb::gWarInvites::%loop-value%::*} contain "%{_region::%player%}%":
  3039. remove "%{_region::%player%}%" from {gb::gWarInvites::%loop-value%::*}
  3040. clear {gb::gWarInvites::%{_region::%player%}%::*}
  3041. remove {_region::%player%} from {gb::gName::*}
  3042. clear {gb::Efekt::TimeOut::%{_region::%player%}%}
  3043. clear {gb:gBuildsTime::Ratusz::%{_region::%player%}%}
  3044. clear {gb:gBuildsTime::Magazyn::%{_region::%player%}%}
  3045. clear {gb:gBuildsTime::Tartak::%{_region::%player%}%}
  3046. clear {gb:gBuildsTime::Alchemik::%{_region::%player%}%}
  3047. clear {gb::Name::%{_region::%player%}%}
  3048. clear {gb::gHome::%{_region::%player%}%}
  3049. df "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
  3050. loop {gb::gPlayers::%{_region::%player%}%::*}:
  3051. clear {gb::gNamePlayer::%loop-value%}
  3052. clear {gb::gRank::%loop-value%}
  3053. delete {gb::gPlayers::%{_region::%player%}%::*}
  3054. else:
  3055. cancel event
  3056. else:
  3057. send "{@Tag}: Aby zaatakowac ta gildie musisz byc w gildii."
  3058. stop
  3059. on rightclick on dragon egg:
  3060. if {@enableCuboids} is true:
  3061. if {@guildDestroy} is true:
  3062. if location of clicked block is in any region:
  3063. set {_region::%player%} to Region.getAt{location of clicked block};
  3064. if {gb::Name::%{_region}%} is set:
  3065. cancel event
  3066. on break:
  3067. if {@enableCuboids} is true:
  3068. if {@guildDestroy} is true:
  3069. if event-block is dragon egg:
  3070. if location of event-block is in any region:
  3071. set {_region} to Region.getAt{location of event-block};
  3072. if {gb::Name::%{_region}%} is set:
  3073. cancel event
  3074. if block below event-block is dragon egg:
  3075. if location of event-block is in any region:
  3076. set {_region} to Region.getAt{location of event-block};
  3077. if {gb::Name::%{_region}%} is set:
  3078. cancel event
  3079. if block under event-block is dragon egg:
  3080. if location of event-block is in any region:
  3081. set {_region} to Region.getAt{location of event-block};
  3082. if {gb::Name::%{_region}%} is set:
  3083. cancel event
  3084. if block east of event-block is dragon egg:
  3085. if location of event-block is in any region:
  3086. set {_region} to Region.getAt{location of event-block};
  3087. if {gb::Name::%{_region}%} is set:
  3088. cancel event
  3089. if block west of event-block is dragon egg:
  3090. if location of event-block is in any region:
  3091. set {_region} to Region.getAt{location of event-block};
  3092. if {gb::Name::%{_region}%} is set:
  3093. cancel event
  3094. if block north of event-block is dragon egg:
  3095. if location of event-block is in any region:
  3096. set {_region} to Region.getAt{location of event-block};
  3097. if {gb::Name::%{_region}%} is set:
  3098. cancel event
  3099. if block south of event-block is dragon egg:
  3100. if location of event-block is in any region:
  3101. set {_region} to Region.getAt{location of event-block};
  3102. if {gb::Name::%{_region}%} is set:
  3103. cancel event
  3104. on explode:
  3105. if {@enableCuboids} is true:
  3106. if {@guildDestroy} is true:
  3107. loop blocks in radius 5:
  3108. if loop-block is dragon egg:
  3109. if location of loop-block is in any region:
  3110. set {_region::%loop-block%} to Region.getAt{location of loop-block};
  3111. if {gb::Name::%{_region::%loop-block%}%} is set:
  3112. set {_loc} to location of loop-block
  3113. wait 1 tick
  3114. set loop-block to dragon egg
  3115. remove {@eggExplodeDamage} from {gb::Egglife::%{_region::%loop-block%}%}
  3116. on place:
  3117. if {@enableCuboids} is true:
  3118. if {@guildDestroy} is true:
  3119. if block under event-block is dragon egg:
  3120. if location of event-block is in any region:
  3121. set {_region} to Region.getAt{location of event-block};
  3122. if {gb::Name::%{_region}%} is set:
  3123. cancel event
  3124. if block east of event-block is dragon egg:
  3125. if location of event-block is in any region:
  3126. set {_region} to Region.getAt{location of event-block};
  3127. if {gb::Name::%{_region}%} is set:
  3128. cancel event
  3129. if block west of event-block is dragon egg:
  3130. if location of event-block is in any region:
  3131. set {_region} to Region.getAt{location of event-block};
  3132. if {gb::Name::%{_region}%} is set:
  3133. cancel event
  3134. if block north of event-block is dragon egg:
  3135. if location of event-block is in any region:
  3136. set {_region} to Region.getAt{location of event-block};
  3137. if {gb::Name::%{_region}%} is set:
  3138. cancel event
  3139. if block south of event-block is dragon egg:
  3140. if location of event-block is in any region:
  3141. set {_region} to Region.getAt{location of event-block};
  3142. if {gb::Name::%{_region}%} is set:
  3143. cancel event
  3144. # ============================================================================================================================================================================= #
  3145. # =========================================================================== AntyLogout: ===================================================================================== #
  3146. # ============================================================================================================================================================================= #
  3147. on damage of player:
  3148. if attacker is player:
  3149. if {@antyLog} is true:
  3150. set {gb::AntyLog::%attacker%} to now
  3151. set {gb::AntyLog::%victim%} to now
  3152. add {@antyLogTime} seconds to {gb::AntyLog::%attacker%}
  3153. add {@antyLogTime} seconds to {gb::AntyLog::%victim%}
  3154. display "&6AntyLogout - &fNie mozesz sie wylogowac" on bossbar with 100 percent by {@antyLogTime} seconds for attacker
  3155. display "&6AntyLogout - &fNie mozesz sie wylogowac" on bossbar with 100 percent by {@antyLogTime} seconds for victim
  3156. wait {@antyLogTime} seconds
  3157. set {_now} to now
  3158. if {_now} is greater than {gb::AntyLog::%attacker%}:
  3159. clear {gb::AntyLog::%attacker%}
  3160. if now is greater than {gb::AntyLog::%victim%}:
  3161. clear {gb::AntyLog::%victim%}
  3162. on quit:
  3163. if {@antyLog} is true:
  3164. if {gb::AntyLog::%player%} is set:
  3165. clear {gb::AntyLog::%player%}
  3166. if {@antyLogType} is "dropeq":
  3167. drop items of player's inventory at location of player
  3168. drop player's helmet at location of player
  3169. drop player's chestplate at location of player
  3170. drop player's leggings at location of player
  3171. drop player's boots at location of player
  3172. clear player's inventory
  3173. broadcast "{@Tag}: Gracz &6%player% &fwylogowal sie podczas walki, a jego przedmioty zostaly wyrzucone na ziemie."
  3174. stop
  3175. if {@antyLogType} is "death":
  3176. kill player
  3177. broadcast "{@Tag}: Gracz &6%player% &fwylogowal sie podczas walki i zginal."
  3178. stop
  3179. on command "/spawn" or "/tpaccept":
  3180. if {@antyLog} is true:
  3181. if {gb::AntyLog::%player%} is set:
  3182. cancel event
  3183. # ============================================================================================================================================================================= #
  3184. # =========================================================================== Teleport: ======================================================================================= #
  3185. # ============================================================================================================================================================================= #
  3186. on command:
  3187. if {teleport::%player%} is true:
  3188. send "{@Tag}: Teleportacja anulowana"
  3189. clear {teleport::%player%}
  3190. stop
  3191. on chat:
  3192. if {teleport::%player%} is true:
  3193. send "{@Tag}: Teleportacja anulowana"
  3194. clear {teleport::%player%}
  3195. stop
  3196. on quit:
  3197. if {teleport::%player%} is true:
  3198. clear {teleport::%player%}
  3199. stop
  3200. on kick:
  3201. if {teleport::%player%} is true:
  3202. clear {teleport::%player%}
  3203. stop
  3204. on rightclick:
  3205. if {teleport::%player%} is true:
  3206. send "{@Tag}: Teleportacja anulowana"
  3207. clear {teleport::%player%}
  3208. stop
  3209. on leftclick:
  3210. if {teleport::%player%} is true:
  3211. send "{@Tag}: Teleportacja anulowana"
  3212. clear {teleport::%player%}
  3213. stop
  3214. # ============================================================================================================================================================================= #
  3215. # ======================================================================= Blokoada akcji po wybuchu: ========================================================================== #
  3216. # ============================================================================================================================================================================= #
  3217. on explode:
  3218. if event-location is in any region:
  3219. set {_region} to Region.getAt{location of event-location};
  3220. if {gb::Name::%{_region}%} is set:
  3221. if {@explodeBlock} is true:
  3222. set {gb::Explode::%{_region}%} to now
  3223. add {@explodeTime} seconds to {gb::Explode::%{_region}%}
  3224. wait {@explodeTime} seconds
  3225. set {_now} to now
  3226. if {_now} is greater than {gb::Explode::%{_region}%}:
  3227. clear {gb::Explode::%{_region}%}
  3228. on place:
  3229. if event-block is in any region:
  3230. set {_region} to Region.getAt{location of event-block};
  3231. if {gb::Name::%{_region}%} is set:
  3232. if {@explodeBlock} is true:
  3233. if {gb::Explode::%{_region}%} is set:
  3234. cancel event
  3235. on break:
  3236. if event-block is in any region:
  3237. set {_region:} to Region.getAt{location of event-block};
  3238. if {gb::Name::%{_region}%} is set:
  3239. if {@explodeBlock} is true:
  3240. if {gb::Explode::%{_region}%} is set:
  3241. cancel event
  3242.  
  3243. # ============================================================================================================================================================================= #
  3244. # ======================================================================= Blokada dla nowych czlonkow: ======================================================================== #
  3245. # ============================================================================================================================================================================= #
  3246. on place:
  3247. if {gb::gNamePlayer::%player%} is set:
  3248. if event-block is in any region:
  3249. set {_region} to Region.getAt{location of event-block};
  3250. if {gb::Name::%{_region}%} is set:
  3251. if {gb::Name::%{_region}%} is {gb::gNamePlayer::%player%}:
  3252. if {gb::gRank::%player%} is "rekrut":
  3253. cancel event
  3254. on break:
  3255. if {gb::gNamePlayer::%player%} is set:
  3256. if event-block is in any region:
  3257. set {_region} to Region.getAt{location of event-block};
  3258. if {gb::Name::%{_region}%} is set:
  3259. if {gb::Name::%{_region}%} is {gb::gNamePlayer::%player%}:
  3260. if {gb::gRank::%player%} is "rekrut":
  3261. cancel event
  3262. on rightclick:
  3263. if clicked block is chest or furnace or hopper or trapped chest or dispenser or dropper or brewing stand or lever:
  3264. if {gb::gNamePlayer::%player%} is set:
  3265. if clicked block is in any region:
  3266. set {_region} to Region.getAt{location of clicked block};
  3267. if {gb::Name::%{_region}%} is set:
  3268. if {gb::Name::%{_region}%} is {gb::gNamePlayer::%player%}:
  3269. if {gb::gRank::%player%} is "rekrut":
  3270. cancel event
  3271. # ============================================================================================================================================================================= #
  3272. # ===================================================================== Koniec skryptu. ======================================================================================= #
  3273. # ============================================================================================================================================================================= #
  3274. # ============================================ #
  3275. # ============ Code by (c) GrimoN =========== #
  3276. # =========== All Rights Reserved ============ #
  3277. # ============================================ #
  3278. # ================= Kontak: ================== #
  3279. # ================ Skript.pl ================= #
  3280. # ============================================ #
Advertisement
Add Comment
Please, Sign In to add comment