Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ============================================================================================================================================================================= #
- # ==================================================================== GuildBattles 0.0.2 BETA ================================================================================ #
- # ============================================================================================================================================================================= #
- # ================================================= Konfiguracja, po zmianie czegoś zapisz plik, następnie zrestartuj serwer. ================================================= #
- # ============================================================================================================================================================================= #
- options:
- Tag: &2[&6Guild&4Battles&2]&f # Prefix przed wiadomością #
- startSlot: 4 # Początkowa ilość slotów po założeniu gildii #
- startGold: 100 # Początkowa ilość złota po założeniu gildii #
- startMana: 10 # Początkowa ilość many po założeniu gildii #
- startWood: 0 # Początkowa ilość drewna po założeniu gildii #
- startIron: 0 # Początkowa ilość żelaza po założeniu gildii #
- startHonor: 1000 # Początkowa ilość honoru po zalożeniu gildii #
- warEnable: true # Wlaczyc wojny? (true/false)
- warKills: 50 # Do ilu zabójst prowadzona jest wojna
- warHonorRequired: 1200 # Wymagana ilosc punktów honoru na wojne
- warPlayersRequired: 1 # Wymagana liczba graczy na wojne
- # Nagrody za wygranie wojny
- warGoldReward: 100 # Złota za wygraną
- warManaReward: 50 # Many za wygraną
- warWoodReward: 100 # Drewna za wygraną
- warIronReward: 50 # Żelaza za wygraną
- warHonorReward: 150 # Punktów honoru za wygraną
- # Nagrody za zabósjtwo gracza na wojnie
- warKillGoldReward: 0 # Złota za zabójstwo
- warKillManaReward: 0 # Many za zabójstwo
- warKillWoodReward: 0 # Drewna za zabójstwo
- warKillIronReward: 0 # Żelaza za zabójstwo
- warKillHonorReward: 15 # Punktów honoru za zabójstwo
- # Nagrody za remis
- warRemisGoldReward: 0 # Złota za zabójstwo
- warRemisManaReward: 0 # Many za zabójstwo
- warRemisWoodReward: 0 # Drewna za zabójstwo
- warRemisIronReward: 0 # Żelaza za zabójstwo
- warRemisHonorReward: 25 # Punktów honoru za zabójstwo
- warLoseHonor: 100 # Strata punktow honoru po przegranej wojnie
- #Cuboidy
- enableCuboids: true # Wlaczyc cuboidy ? (true/false)
- Cuboid: 50 # Rozmiar cuboida
- cubSpawnDist: 200 # Odleglosc od punktu /spawn
- cubOtherDist: 150 # Odelglosc od innej gildi (polecam rozmiar cuboida+100)
- enableHomes: true # Wlaczyc teleportacje do gildii przez /g dom? (true/false)
- enableSetHomes: true #Wlaczyc usawienie pozycji /g dom ? (true/false)
- teleportCooldown: 5 # Jak dlugo czekac na teleport? (w sekundach)
- openChests: false # Czy inna gildia moze otwierac skrzynki, piece itp. na terenie innych gildii? (true/false)
- # Podbijanie gildii
- guildDestroy: true # Czy wlaczyc podbijanie gildii? (true/false)
- lifeEgg: 30 # Zycie jajka
- eggDamage: 3 # Obrazenia zadawane jajku
- eggExplodeDamage: 20 # Obrazenia zadane jajku przez tnt lub creepera
- dropMaterials: true # Czy surowce po podbiciu enemy gildii trafiaja na konto gildii. (true/false)
- dropChance: 17.5 # Szanse na przejecie surowcow przeciwnej gildii. (bez procenta)
- #
- guildPvp: true # Pvp między członkami gildii. (true/false)
- # TNT
- tntDestroy: true # TNT ma niszczyc obsydian i wode? (true/false)
- tntChance: 5.7 # Szansa na zniszczenie obsydianu (bez procenta)
- # Antylogout
- antyLog: true # Czy wlaczy AntyLogout (true/false)
- antyLogType: "dropeq" # Kara za wylogowanie sie podczas walki. (death/dropeq)
- antyLogTime: 15 # Czas przez ktory nie mozna sie wylogowac. (w sekundach)
- #
- explodeBlock: true # Blokada budowania/niszczenia podczas wybuchy TNT lub Creepera na terenie gildii. (true/false)
- explodeTime: 10 # Czas przez jaki nie moze budowac/niszczyc po wybuchu tnt. (w sekundach)
- # ============================================================================================================================================================================= #
- # ========================================================== Kod skryptu, jesli sie nie znasz to nie ruszaj :) ================================================================ #
- # ============================================================================================================================================================================= #
- # =============================================================================== Kod ========================================================================================= #
- # ============================================================================================================================================================================= #
- command /GuildBattles [<text>] [<text>] [<text>]:
- aliases: g, gb, gildia, f, guild, guilds, gildie
- trigger:
- # ============================================================================================================================================================================= #
- # ============================================================================== Inne: ======================================================================================== #
- # ============================================================================================================================================================================= #
- 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":
- send "{@Tag}: Nie ma takiej komendy. /GuildBattles Pomoc."
- stop
- if arg 1 is not set:
- if player has permission "gb.help" or "gb.*":
- send "&f==========&6Guild&4Battles&f=========="
- send "{@Tag}: /GuildBattles Zaloz [<Nazwa>] [<Tag>] - Tworzy gildie."
- send "{@Tag}: /GuildBattles Usun - Usuwa gildie."
- send "{@Tag}: /GuildBattles Opis [<Opis>] - Ustawia opis gildii."
- send "{@Tag}: /GuildBattles Zapros [<Gracz>] - Zaprasza gracza do gildii."
- send "{@Tag}: /GuildBattles Dolacz [<Gildia>] - Akceptuje zaproszenie do gildii."
- send "{@Tag}: /GuildBattles Wyrzuc [<Gracz>] - Wyrzuca gracza z gildii."
- send "{@Tag}: /GuildBattles Opusc - Opuszcza gildie."
- send "{@Tag}: /GuildBattles Dom - Teleportuje do domu gildii."
- send "{@Tag}: /GuildBattles UstawDom - Ustawia dom gildii."
- send "{@Tag}: /GuildBattles NaprawDom - Resetuje lokalizacje domu."
- send "{@Tag}: /GuildBattles Info - Informacje o gildii."
- send "{@Tag}: /GuildBattles Zbuduj [<Budynek>] - Rozpoczyna budowe budynku."
- send "{@Tag}: /GuildBattles Ukoncz [<Budynek>] - Konczy budowe budynku."
- send "{@Tag}: /GuildBattles Zasoby - Zasoby gildii."
- send "{@Tag}: /GuildBattles Budynki - Lista budynkow gildii."
- send "{@Tag}: /GuildBattles Zaproszenia - Wyswietla zaproszenia gracza do gildii."
- send "{@Tag}: /GuildBattles Chat - Wlacza lub wylacza czat dla gildii."
- send "{@Tag}: Strona 2 - /GuildBattles Pomoc 2"
- send "&f==========&6Guild&4Battles&f=========="
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- if arg 1 is "help" or "pomoc":
- if arg 2 is not set:
- if player has permission "gb.help" or "gb.*":
- send "&f==========&6Guild&4Battles&f=========="
- send "{@Tag}: /GuildBattles Zaloz [<Nazwa>] [<Tag>] - Tworzy gildie."
- send "{@Tag}: /GuildBattles Usun - Usuwa gildie."
- send "{@Tag}: /GuildBattles Opis [<Opis>] - Ustawia opis gildii."
- send "{@Tag}: /GuildBattles Zapros [<Gracz>] - Zaprasza gracza do gildii."
- send "{@Tag}: /GuildBattles Dolacz [<Gildia>] - Akceptuje zaproszenie do gildii."
- send "{@Tag}: /GuildBattles Wyrzuc [<Gracz>] - Wyrzuca gracza z gildii."
- send "{@Tag}: /GuildBattles Opusc - Opuszcza gildie."
- send "{@Tag}: /GuildBattles Dom - Teleportuje do domu gildii."
- send "{@Tag}: /GuildBattles UstawDom - Ustawia dom gildii."
- send "{@Tag}: /GuildBattles NaprawDom - Resetuje lokalizacje domu."
- send "{@Tag}: /GuildBattles Info - Informacje o gildii."
- send "{@Tag}: /GuildBattles Zbuduj [<Budynek>] - Rozpoczyna budowe budynku."
- send "{@Tag}: /GuildBattles Ukoncz [<Budynek>] - Konczy budowe budynku."
- send "{@Tag}: /GuildBattles Zasoby - Zasoby gildii."
- send "{@Tag}: /GuildBattles Budynki - Lista budynkow gildii."
- send "{@Tag}: /GuildBattles Zaproszenia - Wyswietla zaproszenia gracza do gildii."
- send "{@Tag}: /GuildBattles Chat - Wlacza lub wylacza czat dla gildii."
- send "{@Tag}: Strona 2 - /GuildBattles Pomoc 2"
- send "&f==========&6Guild&4Battles&f=========="
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- if arg 2 is "1":
- if player has permission "gb.help" or "gb.*":
- execute player command "/g help"
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- if arg 2 is "2":
- if player has permission "gb.help" or "gb.*":
- send "&f==========&6Guild&4Battles&f=========="
- send "{@Tag}: /GuildBattles Chat Ustaw - Daje mozliwosc wlaczenia czatu dla gildii."
- send "{@Tag}: /GuildBattles Alchemia - Otwiera sklep z efektami dla gildii."
- send "{@Tag}: /GuildBattles Wojna [<Wypowiedz/Akceptuj/Zakoncz/Info>] - Akcje zwiazane z wojnami gildii."
- send "{@Tag}: /GuildBattles Awans [<Gracz>] - Awansuje gracza z rang Rekrut->Czlonek->Dowodca."
- send "{@Tag}: /GuildBattles Degrad [<Gracz>] - Degraduje gracza z rang Dowodca->Czlonek->Rekrut."
- send "{@Tag}: /GuildBattles Wplac [<Surowiec>] [<Ilosc>] - Wplaca dowolna ilosc surowca do gildii."
- send "&f==========&6Guild&4Battles&f=========="
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Tworzenie gildii: ===================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "zaloz" or "stworz" or "create":
- if player has permission "gb.create" or "gb.*":
- if {gb::gNamePlayer::%player%} is not set:
- if arg 2 is set:
- if {gb::Name::%arg 2%} is not set:
- if length of arg 2 is greater or equal to 4:
- if length of arg 2 is smaller or equal to 12:
- if arg 3 is set:
- if length of arg 3 is greater or equal to 3:
- if length of arg 3 is smaller or equal to 4:
- if {@enableCuboids} is false:
- add arg 2 to {gb::gName::*}
- set {gb::gNamePlayer::%player%} to arg 2
- create file "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- add player to {gb::gPlayers::%arg 2%::*}
- set {gb::gMagazyn::Mana::%arg 2%} to 500
- set {gb::gMagazyn::Gold::%arg 2%} to 500
- set {gb::gMagazyn::Wood::%arg 2%} to 500
- set {gb::gMagazyn::Iron::%arg 2%} to 500
- set {gb::Name::%arg 2%} to arg 2
- wf "Name: '%arg 2%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Tag: '%arg 3%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Lider: '%player%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Desc: '&fUstaw opis. &6/GuildBattles Opis [<Opis>]'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Gold: '{@startGold}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Mana: '{@startMana}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Wood: '{@startWood}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Iron: '{@startIron}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Honor: '{@startHonor}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Efekt: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "MaxSlots: '{@startSlot}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Players: '1'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Chat: 'Off'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Ratusz: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Magazyn: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Tartak: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Alchemik: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Wojna: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- broadcast "{@Tag}: Gracz &6%name of player%&f zalozyl gildie &6%arg 2%&f."
- stop
- if {@enableCuboids} is true:
- if distance between player and spawn is greater or equal to {@cubSpawnDist}:
- if {gb::gName::*} is not set:
- set {gb::gCuboidCenter::spawn} to location of spawn
- add "spawn" to {gb::gName::*}
- loop {gb::gName::*}:
- if distance between player and {gb::gCuboidCenter::%loop-value%} is greater or equal to {@cubOtherDist}:
- add arg 2 to {gb::gName::*}
- set {gb::gNamePlayer::%player%} to arg 2
- create file "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- add player to {gb::gPlayers::%arg 2%::*}
- set {gb::gMagazyn::Mana::%arg 2%} to 500
- set {gb::gMagazyn::Gold::%arg 2%} to 500
- set {gb::gMagazyn::Wood::%arg 2%} to 500
- set {gb::gMagazyn::Iron::%arg 2%} to 500
- set {gb::gCubiudCenter::%arg 2%} to location of player
- set {gb::gHome::%arg 2%} to location above {gb::gCubiudCenter::%arg 2%}
- set {gb::Name::%arg 2%} to arg 2
- "%arg 2%".Region.selectLS{{gb::gCubiudCenter::%arg 2%}, {@Cuboid}};
- wf "Name: '%arg 2%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Tag: '%arg 3%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Lider: '%player%'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Desc: '&fUstaw opis. &6/GuildBattles Opis [<Opis>]'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Gold: '{@startGold}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Mana: '{@startMana}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Wood: '{@startWood}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Iron: '{@startIron}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Honor: '{@startHonor}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Efekt: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "MaxSlots: '{@startSlot}'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Players: '1'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Chat: 'Off'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Ratusz: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Magazyn: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Tartak: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Alchemik: '0'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- wf "Wojna: 'Brak'" to "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if {@guildDestroy} is true:
- set block at location of player to dragon egg
- set block below location of player to bedrock
- set {gb::eggLife::%arg 2%} to {@lifeEgg}
- broadcast "{@Tag}: Gracz &6%name of player%&f zalozyl gildie &6%arg 2%&f."
- stop
- else:
- send "{@Tag}: Jestes zbyt blisko innej gildii."
- stop
- else:
- send "{@Tag}: Jestes zbyt blisko spawna."
- stop
- else:
- send "{@Tag}: Liczba znakow w tagu nie moze przekraczac 4."
- stop
- else:
- send "{@Tag}: Liczba znakow w tagu nie moze byc mniejsza niz 3."
- stop
- else:
- send "{@Tag}: Musisz podac tag gildii."
- stop
- else:
- send "{@Tag}: Liczba znakow w nazwie nie moze przekraczac 12."
- stop
- else:
- send "{@Tag}: Liczba znakow w nazwie nie moze byc mniejsza niz 4."
- stop
- else:
- send "{@Tag}: Taka gildia juz istnieje."
- stop
- else:
- send "{@Tag}: Musisz podac nazwe gildii."
- stop
- else:
- send "{@Tag}: Jestes juz w gildii."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Teleportacja do gildii: =============================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "dom" or "home":
- if player has permission "gb.home" or "gb.*":
- if {@enableCuboids} is true:
- if {@enableHomes} is true:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if {teleport::%player%} is not set:
- set {teleport::%player%} to true
- set {_pos::%player%} to position of player
- send "{@Tag}: Teleportuje... Czekaj {@teleportCooldown} sekund. Nie zmieniaj swojej lokalizacji."
- loop {@teleportCooldown} times:
- wait 1 second
- if position of player is not {_pos::%player%}:
- clear {teleport::%player%}
- send "{@Tag}: Poruszyles sie, teleportacja anulowana."
- stop
- if position of player is {_pos::%player%}:
- if {teleport::%player%} is true:
- set {_pozostalo::%player%} to "%{@teleportCooldown}-loop-number%"
- send "{@Tag}: Pozostalo: &6%{_pozostalo::%player%}% &fsekund/a."
- add 1 to {_teleport::%player%}
- else:
- stop
- if {_teleport::%player%} is {@teleportCooldown}:
- if {teleport::%player%} is true:
- clear {teleport::%player%}
- if block under {gb::gHome::%{gb::gNamePlayer::%player%}%} isn't air or lava:
- if block at {gb::gHome::%{gb::gNamePlayer::%player%}%} is air:
- if block above {gb::gHome::%{gb::gNamePlayer::%player%}%} is air:
- if {gb::AntyLog::%player%} is not set:
- send "{@Tag}: Teleportuje..."
- wait 2 tick
- teleport player to {gb::gHome::%{gb::gNamePlayer::%player%}%}
- stop
- else:
- stop
- else:
- send "{@Tag}: Twoj dom jest niedostepny. Wpisz /g fixhome"
- stop
- else:
- send "{@Tag}: Twoj dom jest niedostepny. Wpisz /g fixhome"
- stop
- else:
- send "{@Tag}: Twoj dom jest niedostepny. Wpisz /g fixhome"
- stop
- else:
- send "{@Tag}: Juz sie teleportujesz."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Ta opcja jest wylaczona."
- stop
- else:
- send "{@Tag}: Ta opcja jest wylaczona."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Ustawianie domu gildii: =============================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "sethome" or "ustawdom":
- if player has permission "gb.sethome" or "gb.*":
- if {@enableCuboids} is true:
- if {@enableHomes} is true:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- if location of player is in any region:
- set {_region::%player%} to Region.getAt{location of player};
- if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
- if block at player isn't lava:
- if block under player isn't lava:
- if block under player isn't air:
- set {gb::gHome::%{gb::gNamePlayer::%player%}%} to location of player
- send "{@Tag}: Pomyslnie ustawiono nowy dom."
- stop
- else:
- send "{@Tag}: Nie mozesz ustawic domu, gdy nie stoisz na ziemi"
- stop
- else:
- send "{@Tag}: Nie mozesz ustawic domu, gdy pod toba jest lava."
- stop
- else:
- send "{@Tag}: Nie mozesz ustawic domu, gdy jestes w lavie."
- stop
- else:
- send "{@Tag}: Nie jestes na swoim terenie gildii."
- stop
- else:
- send "{@Tag}: Nie jestes na swoim terenie gildii."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Ta opcja jest wylaczona."
- stop
- else:
- send "{@Tag}: Ta opcja jest wylaczona."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Naprawianie domu gildii: ============================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "fixhome" or "naprawdom":
- if player has permission "gb.fixhome" or "gb.*":
- if {@enableCuboids} is true:
- if {@enableHomes} is true:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {gb::gHome::%{gb::gNamePlayer::%player%}%} to block above {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%}
- send "{@Tag}: Pomyslnie zresetowano dom."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Ta opcja jest wylaczona."
- stop
- else:
- send "{@Tag}: Ta opcja jest wylaczona."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Usuwanie gildii: ====================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "usun" or "delete" or "disband" or "rozwiaz":
- if player has permission "gb.delete" or "gb.*":
- if arg 2 is not set:
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {@enableCuboids} is true:
- "%{gb::gNamePlayer::%player%}%".Region.delete{};
- if {@guildDestroy} is true:
- loop blocks in radius 3 of {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%}:
- if loop-block is bedrock:
- add 1 to {_bedrock::%player%}
- if {_bedrock::%player%} is 1:
- set block below {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%} to air
- set block at {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%} to air
- clear {gb::eggLife::%{gb::gNamePlayer::%player%}%}
- clear {gb::gCubiudCenter::%{gb::gNamePlayer::%player%}%}
- if "%{_Efekt::%player%}%" is "Regen I" or "Regen II":
- loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
- set {_x::%player%} to loop-value parsed as player
- remove regeneration from {_x::%player%}
- if {@warEnable} is true:
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Wojna::%player%} isn't "Brak":
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
- loop {gb::gName::*}:
- if {gb::gWarInvites::%loop-value%::*} contain "%{gb::gNamePlayer::%player%}%":
- remove "%{gb::gNamePlayer::%player%}%" from {gb::gWarInvites::%loop-value%::*}
- clear {gb::gWarInvites::%{gb::gNamePlayer::%player%}%::*}
- remove {gb::gNamePlayer::%player%} from {gb::gName::*}
- clear {gb::Efekt::TimeOut::%{gb::gNamePlayer::%player%}%}
- clear {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}
- clear {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}
- clear {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}
- clear {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}
- clear {gb::gHome::%{gb::gNamePlayer::%player%}%}
- clear {gb::Name::%{gb::gNamePlayer::%player%}%}
- set {_name::%player%} to {gb::gNamePlayer::%player%}
- broadcast "{@Tag}: Gracz &6%name of player%&f rozwiazal gildie &6%{gb::gNamePlayer::%player%}%&f."
- df "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
- clear {gb::gNamePlayer::%loop-value%}
- clear {gb::gRank::%loop-value%}
- delete {gb::gPlayers::%{_name::%player%}%::*}
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie jestes w zadnej gidlii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Usun"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Usun"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Informacje o gildii: ================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "info" or "informacje":
- if player has permission "gb.info" or "gb.*":
- if arg 3 is not set:
- if arg 2 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- send "&f=======&6Informacje &4o gildii&f======="
- set {_Name::%player%} to single value "Name" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Nazwa: &6%{_Name::%player%}%"
- set {_Tag::%player%} to single value "Tag" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Tag: &6%{_Tag::%player%}%"
- set {_Desc::%player%} to single value "Desc" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Opis: &6%{_Desc::%player%}%"
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Lider: &6%{_Lider::%player%}%"
- set {_gracze} to "%{gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}%"
- if {_gracze} contain " and":
- replace all " and" with "," in {_gracze}
- send "&2Czlonkowie: &6%{_gracze}%"
- loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
- if loop-value is online:
- add "%loop-value%" to {_online::*}
- set {_online} to "%{_online::*}%"
- if {_online} is empty:
- add "&fBrak" to {_online}
- replace all " and" with "," in {_online}
- send "&2Online: &6%{_online}%"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Punkty honoru: &6%{_Honor::%player%}%"
- set {_Slots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Miejsca: &6%{_Players::%player%}%&2/&6%{_Slots::%player%}%"
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Wojna: &6%{_Wojna::%player%}%"
- if {@enableCuboids} is true:
- if {@guildDestroy} is true:
- send "&2Zycie jajka: &6%{gb::eggLife::%{gb::gNamePlayer::%player%}%}%"
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- if arg 2 is "%{gb::gNamePlayer::%player%}%":
- execute player command "/gb info"
- stop
- else:
- if {gb::Name::%arg 2%} is set:
- send "&f=======&6Informacje &4o gildii&f======="
- set {_Name::%player%} to single value "Name" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- send "&2Nazwa: &6%{_Name::%player%}%"
- set {_Tag::%player%} to single value "Tag" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- send "&2Tag: &6%{_Tag::%player%}%"
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- send "&2Lider: &6%{_Lider::%player%}%"
- set {_gracze} to "%{gb::gPlayers::%arg 2%::*}%"
- if {_gracze} contain " and":
- replace all " and" with "," in {_gracze}
- send "&2Czlonkowie: &6%{_gracze}%"
- set {_Honor::%player%} to single value "Tag" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- send "&2Punkty honoru: &6%{_Honor::%player%}%"
- set {_Slots::%player%} to single value "Slots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- send "&2Miejsca: &6%{_Players::%player%}%&2/&6%{_Slots::%player%}%"
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- send "&2Wojna: %{_Wojna::%player%}%"
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Informacje"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Opis gildii: ========================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "opis" or "desc" or "description":
- if player has permission "gb.desc" or "gb.*":
- if arg 2 is not set:
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- send "{@Tag}: Napisz swoj opis na chacie."
- set {gb::gDescPlayer::%player%} to true
- set {_Desc::%player%} to single value "Desc" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- wait 30 second
- if {gb::gDescPlayer::%player%} is true:
- if {gb::gDesc::%{gb::gNamePlayer::%player%}%} is {_Desc::%player%}:
- clear {gb::gDescPlayer::%player%}
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opis"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opis"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Wplata surowcow do gildii: ============================================================================ #
- # ============================================================================================================================================================================= #
- if arg 1 is "wplac":
- if player has permission "gb.donate" or "gb.*":
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if arg 2 is "zloto" or "gold":
- if arg 3 is set:
- set {_gold::%player%} to arg 3 parsed as number
- if {_gold::%player%} is greater than 0:
- if player has {_gold::%player%} of gold ingot:
- set {_GoldG::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if {_gold::%player%}+{_GoldG::%player%} is smaller or equal to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}:
- add {_gold::%player%} to {_GoldG::%player%}
- remove {_gold::%player%} of gold ingot from player
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_GoldG::%player%}%"
- send "{@Tag}: Gracz &6%name of player%&f wplacil &6%{_gold::%player%}%&f zlota do gildii." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- stop
- else:
- send "{@Tag}: W twoim magazynie nie ma miejsca."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota."
- stop
- else:
- send "{@Tag}: Minimalna wplata to 0."
- stop
- else:
- send "{@Tag}: Musisz podac kwote jaka chcesz wplacic."
- stop
- if arg 2 is "mana":
- if arg 3 is set:
- set {_mana::%player%} to arg 3 parsed as number
- if {_mana::%player%} is greater than 0:
- if level of player is greater or equal to {_mana::%player%}:
- set {_ManaG::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if {_mana::%player%}+{_ManaG::%player%} is smaller or equal to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}:
- add {_mana::%player%} to {_ManaG::%player%}
- reduce player's level by {_mana::%player%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_ManaG::%player%}%"
- send "{@Tag}: Gracz &6%name of player%&f wplacil &6%{_mana::%player%}%&f many do gildii." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- stop
- else:
- send "{@Tag}: W twoim magazynie nie ma miejsca"
- else:
- send "{@Tag}: Nie masz tyle many."
- stop
- else:
- send "{@Tag}: Minimalna wplata to 0."
- stop
- else:
- send "{@Tag}: Musisz podac kwote jaka chcesz wplacic."
- stop
- if arg 2 is "zelazo" or "iron":
- if arg 3 is set:
- set {_iron::%player%} to arg 3 parsed as number
- if {_iron::%player%} is greater than 0:
- if player has {_iron::%player%} of iron ingot:
- set {_IronG::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if {_iron::%player%}+{_IronG::%player%} is smaller or equal to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}:
- add {_iron::%player%} to {_IronG::%player%}
- remove {_iron::%player%} of iron ingot from player
- set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_IronG::%player%}%"
- send "{@Tag}: Gracz &6%name of player%&f wplacil &6%{_iron::%player%}%&f zelaza do gildii." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- stop
- else:
- send "{@Tag}: W twoim magazynie nie ma miejsca"
- else:
- send "{@Tag}: Nie masz tyle zelaza."
- stop
- else:
- send "{@Tag}: Minimalna wplata to 0."
- stop
- else:
- send "{@Tag}: Musisz podac kwote jaka chcesz wplacic."
- stop
- if arg 2 is not "mana" or "gold" or "zloto" or "zelazo" or "iron":
- send "{@Tag}: Nie ma takiego zasobu."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Nie ma do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Zaproszenia do gildii: ================================================================================ #
- # ============================================================================================================================================================================= #
- if arg 1 is "zapros" or "dodaj" or "ivite":
- if player has permission "gb.invite" or "gb.*":
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if arg 2 is set:
- if arg 2 is not "%player%":
- set {_gracz} to arg 2 parsed as player
- if {gb::gNamePlayer::%{_gracz}%} is not set:
- if {_gracz} is online:
- set {_Slots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if {_Players::%player%} is smaller than {_Slots::%player%}:
- if {gb::Invites::%{_gracz}%::*} contain {gb::gNamePlayer::%player%}:
- send "{@Tag}: Zaprosiles juz tego gracza do gidlii."
- stop
- else:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} isn't "%player%":
- if {gb::gRank::%player%} isn't "dowodca":
- send "{@Tag}: Nie jestes liderem ani dowdca tej gildii."
- stop
- if {_Lider::%player%} isn't "%player%":
- if {gb::gRank::%player%} is "dowodca":
- add {gb::gNamePlayer::%player%} to {gb::Invites::%{_gracz}%::*}
- send "{@Tag}: Gracz &6%name of player%&f zaprasza Cie do gildii &6%{gb::gNamePlayer::%player%}%&f." to {_gracz}
- send "{@Tag}: Wyslano zaproszenie do gracza &6%{_gracz}%&f."
- wait 180 second
- if {gb::Invites::%{_gracz}%::*} contain {gb::gNamePlayer::%player%}:
- remove {gb::gNamePlayer::%player%} from {gb::Invites::%{_gracz}%::*}
- send "{@Tag}: Zaproszenie od gildii &6%{gb::gNamePlayer::%player%}%&f wygaslo." to {_gracz}
- stop
- if {_Lider::%player%} is "%player%":
- add {gb::gNamePlayer::%player%} to {gb::Invites::%{_gracz}%::*}
- send "{@Tag}: Gracz &6%name of player%&f zaprasza Cie do gildii &6%{gb::gNamePlayer::%player%}%&f." to {_gracz}
- send "{@Tag}: Wyslano zaproszenie do gracza &6%{_gracz}%&f."
- wait 180 second
- if {gb::Invites::%{_gracz}%::*} contain {gb::gNamePlayer::%player%}:
- remove {gb::gNamePlayer::%player%} from {gb::Invites::%{_gracz}%::*}
- send "{@Tag}: Zaproszenie od gildii &6%{gb::gNamePlayer::%player%}%&f wygaslo." to {_gracz}
- stop
- else:
- send "{@Tag}: W twojej gildii nie ma wolnego miejsca."
- stop
- else:
- send "{@Tag}: Tego gracza nie ma na serwersze."
- stop
- else:
- send "{@Tag}: Ten gracz jest juz w gildii."
- stop
- else:
- send "{@Tag}: Nie mozesz zaprosic samego siebie do gildii."
- stop
- else:
- send "{@Tag}: Musisz podac nazwe gracza, ktorego chcesz zaprosic."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Dodaj [<Gracz>]"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Anulowanie zaproszenia do gildii: ===================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "anuluj":
- if player has permission "gb.cancel" or "gb.*":
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if arg 2 is set:
- if {gb::Invites::%arg 2%::*} contain {gb::gNamePlayer::%player%}:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} isn't "%player%":
- if {gb::gRank::%player%} isn't "dowodca":
- send "{@Tag}: Nie jestes liderem ani dowodca tej gildii."
- stop
- if {gb::gRank::%player%} is "dowodca":
- remove {gb::gNamePlayer::%player%} from {gb::Invites::%arg 2%::*}
- send "{@Tag}: Anulowales zaproszenie do gildii gracza &6%arg 2%"
- set {_gracz} to arg 2 parsed as player
- if {_gracz} is online:
- send "{@Tag}: Gracz &6%player% &fanulowal zaproszenie do gildii &6%{gb::gNamePlayer::%player%}%&f."
- stop
- if {_Lider::%player%} is "%player%":
- remove {gb::gNamePlayer::%player%} from {gb::Invites::%arg 2%::*}
- send "{@Tag}: Anulowales zaproszenie do gildii gracza &6%arg 2%"
- set {_gracz} to arg 2 parsed as player
- if {_gracz} is online:
- send "{@Tag}: Gracz &6%player% &fanulowal zaproszenie do gildii &6%{gb::gNamePlayer::%player%}%&f."
- stop
- else:
- send "{@Tag}: Nie zaprosiles tego gracza do gildii, lub zaproszenie wygaslo."
- stop
- if arg 2 is not set:
- send "{@Tag}: Musisz podac nazwe gracza, ktorego zaproszenie chcesz anulowac."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Anuluj [<Gracz>]"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien"
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Dolaczenie do gildii: ================================================================================= #
- # ============================================================================================================================================================================= #
- if arg 1 is "dolacz" or "join":
- if player has permission "gb.join" or "gb.*":
- if arg 3 is not set:
- if arg 2 is set:
- if {gb::Name::%arg 2%} is set:
- if {gb::gNamePlayer::%player%} is not set:
- if {gb::Invites::%player%::*} contain arg 2:
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- set {_MaxSlots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Players::%player%} is smaller than {_MaxSlots::%player%}:
- send "{@Tag}: Gracz &6%name of player%&f dolaczyl do twojej gildii." to {gb::gPlayers::%arg 2%::*}
- delete {gb::Invites::%player%::*}
- set {_gName::%player%} to single value "Name" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- set {gb::gNamePlayer::%player%} to {_gName::%player%}
- add player to {gb::gPlayers::%arg 2%::*}
- set {gb::gRank::%player%} to "rekrut"
- add 1 to {_Players::%player%}
- set yaml value "Players" from "GuildsBattles/%{_gName::%player%}%.yml" to "%{_Players::%player%}%"
- send "{@Tag}: Dolaczyles do gildii &6%{_gName::%player%}%&f."
- stop
- else:
- send "{@Tag}: W tej gildii nie ma wolnego miejsca."
- remove {_gName::%player%} from {gb::Invites::%player%::*}
- stop
- else:
- send "{@Tag}: Nie zostales zaproszony do tej gildii."
- stop
- else:
- send "{@Tag}: Jestes juz w gildii."
- remove {_gName::%player%} from {gb::Invites::%player%::*}
- stop
- else:
- send "{@Tag}: Nie ma takiej gildii."
- stop
- else:
- send "{@Tag}: Musisz podac nazwe gildii, do ktorej chcesz dolaczyc"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Dolacz [<Gildia>]"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Wyrzucanie z gildii: ================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "wyrzuc" or "kick":
- if player has permission "gb.kick" or "gb.*":
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if arg 2 is set:
- if arg 2 is not "%player%":
- set {_gracz} to arg 2 parsed as player
- if {gb::gNamePlayer::%player%} is {gb::gNamePlayer::%{_gracz}%}:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} isn't "%player%":
- if {gb::gRank::%player%} isn't "dowodca":
- send "{@Tag}: Nie jestes liderem ani dowodca tej gildii."
- stop
- if {gb::gRank::%player%} is "dowodca":
- if {gb::gRank::%{_gracz}%} isn't "dowodca":
- if {_Lider::%player%} isn't "%{_gracz}%":
- remove {_gracz} from {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- send "{@Tag}: Gracz &6%arg 2%&f zostal wyrzcony z twojej gildii przez &6%name of player%&f." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- send "{@Tag}: Zostales wyrzucony z gildii przez &6%name of player%&f." to {_gracz}
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- remove 1 from {_Players::%player%}
- clear {gb::gRank::%{_gracz}%}
- teleport {_gracz} to spawn
- set yaml value "Players" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Players::%player%}%"
- clear {gb::gNamePlayer::%{_gracz}%}
- else:
- send "{@Tag}: Nie mozesz wyrzucic lidera z gildii."
- stop
- else:
- send "{@Tag}: Nie mozesz wyrzucic innego dowodcy z gildii."
- stop
- if {_Lider::%player%} is "%player%":
- remove {_gracz} from {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- send "{@Tag}: Gracz &6%arg 2%&f zostal wyrzcony z twojej gildii przez &6%name of player%&f." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- send "{@Tag}: Zostales wyrzucony z gildii przez &6%name of player%&f." to {_gracz}
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- remove 1 from {_Players::%player%}
- teleport {_gracz} to spawn
- set yaml value "Players" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Players::%player%}%"
- clear {gb::gNamePlayer::%{_gracz}%}
- else:
- send "{@Tag}: Ten gracz nie jest w twojej gildii."
- stop
- else:
- send "{@Tag}: Nie mozesz wyrzucic samego siebie."
- stop
- else:
- send "{@Tag}: Musisz podac nick gracza, ktorego chcesz wyrzucic."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Wyrzuc [<Gracz>]"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Odejscie z gildii: ==================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "wyjdz" or "opusc" or "exit" or "leave":
- if player has permission "gb.exit" or "gb.*":
- if arg 2 is not set:
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} isn't "%player%":
- if {gb::gNameEnemy::%{gb::gNamePlayer::%player%}%} is not set:
- remove player from {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- send "{@Tag}: Gracz &6%name of player%&f opuscil twoja gildie." to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- send "{@Tag}: Opusciles gildie &6%{gb::gNamePlayer::%player%}%&f."
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- remove 1 from {_Players::%player%}
- clear {gb::gRank::%player%}
- set yaml value "Players" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Players::%player%}%"
- clear {gb::gNamePlayer::%player%}
- stop
- else:
- send "{@Tag}: Twoja gildia prowadzi w tej chwili wojne."
- stop
- else:
- send "{@Tag}: Nie mozesz opuscic tej gildii, poniewaz jestes jej liderem."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opusc"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Opusc"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Budowle gildii: ======================================================================================= #
- # ============================================================================================================================================================================= #
- if arg 1 is "zbuduj" or "build":
- if player has permission "gb.build" or "gb.*":
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if arg 2 is "ratusz" or "townhall":
- set {_Ratusz::%player%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if "%{_Ratusz::%player%}%" doesn't contain "b.":
- if {_Ratusz::%player%} is 0:
- if {_Gold::%player%} is greater or equal to 50:
- if {_Mana::%player%} is greater or equal to 5:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Ratusz::%player%} to "b.1"
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- remove 5 from {_Mana::%player%}
- remove 50 from {_Gold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Ratusz I, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&65&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&650&f)."
- stop
- if {_Ratusz::%player%} is 1:
- if {_Gold::%player%} is greater or equal to 500:
- if {_Mana::%player%} is greater or equal to 15:
- if {_Wood::%player%} is greater or equal to 150:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Ratusz::%player%} to "b.2"
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- remove 15 from {_Mana::%player%}
- remove 500 from {_Gold::%player%}
- remove 150 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Ratusz II, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&6150&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&615&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&6500&f)."
- stop
- if {_Ratusz::%player%} is 2:
- if {_Gold::%player%} is greater or equal to 2000:
- if {_Mana::%player%} is greater or equal to 50:
- if {_Wood::%player%} is greater or equal to 500:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Ratusz::%player%} to "b.3"
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- remove 50 from {_Mana::%player%}
- remove 2000 from {_Gold::%player%}
- remove 500 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Ratusz III, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&6500&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&650&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&62000&f)."
- stop
- if {_Ratusz::%player%} is 3:
- if {_Gold::%player%} is greater or equal to 5000:
- if {_Mana::%player%} is greater or equal to 150:
- if {_Wood::%player%} is greater or equal to 1500:
- if {_Iron::%player%} is greater or equal to 100:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Ratusz::%player%} to "b.4"
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- remove 15 from {_Mana::%player%}
- remove 5000 from {_Gold::%player%}
- remove 1500 from {_Wood::%player%}
- remove 100 from {_Iron::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Iron::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Ratusz IV, koniec budowy: &6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle zelaza (&6100&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&61500&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&6150&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&65000&f)."
- stop
- if {_Tartak::%player%} is 4:
- send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
- stop
- else:
- send "{@Tag}: Juz budujesz ta budowle."
- stop
- if arg 2 is "magazyn":
- set {_Magazyn::%player%} to single value "Magazyn" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if "%{_Magazyn::%player%}%" doesn't contain "b.":
- if {_Magazyn::%player%} is 0:
- if {_Gold::%player%} is greater or equal to 500:
- if {_Mana::%player%} is greater or equal to 25:
- if {_Wood::%player%} is greater or equal to 500:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.1"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 25 from {_Mana::%player%}
- remove 500 from {_Gold::%player%}
- remove 500 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn I, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&6500&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&625&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&6500&f)."
- stop
- if {_Magazyn::%player%} is 1:
- if {_Gold::%player%} is greater or equal to 1000:
- if {_Mana::%player%} is greater or equal to 50:
- if {_Wood::%player%} is greater or equal to 1000:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.2"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 50 from {_Mana::%player%}
- remove 1000 from {_Gold::%player%}
- remove 1000 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn II, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&61000&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&650&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&61000&f)."
- stop
- if {_Magazyn::%player%} is 2:
- if {_Gold::%player%} is greater or equal to 1500:
- if {_Mana::%player%} is greater or equal to 75:
- if {_Wood::%player%} is greater or equal to 1500:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.3"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 75 from {_Mana::%player%}
- remove 1500 from {_Gold::%player%}
- remove 1500 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn III, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&61500&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&675&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&61500&f)."
- stop
- if {_Magazyn::%player%} is 3:
- if {_Gold::%player%} is greater or equal to 2000:
- if {_Mana::%player%} is greater or equal to 100:
- if {_Wood::%player%} is greater or equal to 2000:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.4"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 100 from {_Mana::%player%}
- remove 1000 from {_Gold::%player%}
- remove 1000 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn IV, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&62000&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&6100&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&62000&f)."
- stop
- if {_Magazyn::%player%} is 4:
- if {_Gold::%player%} is greater or equal to 2500:
- if {_Mana::%player%} is greater or equal to 150:
- if {_Wood::%player%} is greater or equal to 2500:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.5"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 150 from {_Mana::%player%}
- remove 2500 from {_Gold::%player%}
- remove 2500 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn V, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&61000&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&650&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&61000&f)."
- stop
- if {_Magazyn::%player%} is 5:
- if {_Gold::%player%} is greater or equal to 3000:
- if {_Mana::%player%} is greater or equal to 200:
- if {_Wood::%player%} is greater or equal to 3000:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.6"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 200 from {_Mana::%player%}
- remove 3000 from {_Gold::%player%}
- remove 3000 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn VI, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&63000&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&6200&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&63000&f)."
- stop
- if {_Magazyn::%player%} is 6:
- if {_Gold::%player%} is greater or equal to 3500:
- if {_Mana::%player%} is greater or equal to 250:
- if {_Wood::%player%} is greater or equal to 3500:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.7"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 250 from {_Mana::%player%}
- remove 3500 from {_Gold::%player%}
- remove 3500 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn VII, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&63500&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&6250&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&63500&f)."
- stop
- if {_Magazyn::%player%} is 7:
- if {_Gold::%player%} is greater or equal to 4000:
- if {_Mana::%player%} is greater or equal to 300:
- if {_Wood::%player%} is greater or equal to 4000:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Magazyn::%player%} to "b.8"
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- remove 300 from {_Mana::%player%}
- remove 4000 from {_Gold::%player%}
- remove 4000 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Magazyn VIII, koniec budowy: &6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&64000&f)."
- else:
- send "{@Tag}: Nie masz tyle many (&6300&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&64000&f)."
- stop
- if {_Magazyn::%player%} is 8:
- send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
- stop
- else:
- send "{@Tag}: Juz budujesz ta budowle."
- stop
- if arg 2 is "tartak":
- set {_Tartak::%player%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if "%{_Tartak::%player%}%" doesn't contain "b.":
- if {_Tartak::%player%} is 0:
- if {_Gold::%player%} is greater or equal to 120:
- if {_Mana::%player%} is greater or equal to 5:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Tartak::%player%} to "b.1"
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- remove 5 from {_Mana::%player%}
- remove 120 from {_Gold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Tartak I, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&65&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&6120&f)."
- stop
- if {_Tartak::%player%} is 1:
- if {_Gold::%player%} is greater or equal to 300:
- if {_Mana::%player%} is greater or equal to 20:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Tartak::%player%} to "b.2"
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- remove 20 from {_Mana::%player%}
- remove 300 from {_Gold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Tartak II, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&620&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&6300&f)."
- stop
- if {_Tartak::%player%} is 2:
- if {_Gold::%player%} is greater or equal to 700:
- if {_Mana::%player%} is greater or equal to 50:
- if {_Wood::%player%} is greater or equal to 200:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Tartak::%player%} to "b.3"
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- remove 50 from {_Mana::%player%}
- remove 700 from {_Gold::%player%}
- remove 200 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Tartak III, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&6200&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&650&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&6700&f)."
- stop
- if {_Tartak::%player%} is 3:
- if {_Gold::%player%} is greater or equal to 1500:
- if {_Mana::%player%} is greater or equal to 100:
- if {_Wood::%player%} is greater or equal to 700:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Tartak::%player%} to "b.4"
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- remove 100 from {_Mana::%player%}
- remove 1500 from {_Gold::%player%}
- remove 700 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Tartak IV, koniec budowy: &6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&6700&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&6100&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&61500&f)."
- stop
- if {_Tartak::%player%} is 4:
- send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
- stop
- else:
- send "{@Tag}: Juz budujesz ta budowle."
- stop
- if arg 2 is "alchemik":
- set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if "%{_Alchemik::%player%}%" doesn't contain "b.":
- if {_Alchemik::%player%} is 0:
- if {_Gold::%player%} is greater or equal to 750:
- if {_Mana::%player%} is greater or equal to 150:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Alchemik::%player%} to "b.1"
- set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
- remove 150 from {_Mana::%player%}
- remove 750 from {_Gold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Alchemik I, koniec budowy: &6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&6150&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&6750&f)."
- stop
- if {_Alchemik::%player%} is 1:
- if {_Gold::%player%} is greater or equal to 1500:
- if {_Mana::%player%} is greater or equal to 300:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Alchemik::%player%} to "b.2"
- set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
- remove 300 from {_Mana::%player%}
- remove 1500 from {_Gold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Alchemik II, koniec budowy: &6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&6300&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&61500&f)."
- stop
- if {_Alchemik::%player%} is 2:
- if {_Gold::%player%} is greater or equal to 2500:
- if {_Mana::%player%} is greater or equal to 500:
- if {_Wood::%player%} is greater or equal to 500:
- set {_czas} to now
- add 10 seconds to {_czas}
- set {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%} to {_czas}
- set {_Alchemik::%player%} to "b.3"
- set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
- remove 500 from {_Mana::%player%}
- remove 2500 from {_Gold::%player%}
- remove 500 from {_Wood::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- send "{@Tag}: Rozpoczynasz budowe Alchemik III, koniec budowy: &6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Nie masz tyle drewna (&6500&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle many (&6500&f)."
- stop
- else:
- send "{@Tag}: Nie masz tyle zlota (&62500&f)."
- stop
- if {_Alchemik::%player%} is 3:
- send "{@Tag}: Ulepszyles ten budynek do maksymalnego poziomu."
- stop
- else:
- send "{@Tag}: Juz budujesz ta budowle."
- stop
- if arg 3 is not "ratusz" or "townhall" or "magazyn" or "tartak" or "alchemik":
- send "{@Tag}: Nie ma takiego budynku."
- stop
- if arg 3 is not set:
- send "{@Tag}: Musisz podac jaki budynek chcesz zbudowac."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zbuduj [<Budowla>]"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Konczenie budowli: ==================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "ukoncz" or "complete":
- if player has permission "gb.complete" or "gb.*":
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- if arg 2 is "ratusz" or "townhall":
- set {_Ratusz::%player%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Ratusz::%player%} contain "b.":
- set {_now} to now
- if {_now} is greater or equal to {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}:
- set {_MaxSlots::%player%} to single value "MaxSlots" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- clear {gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}
- if {_Ratusz::%player%} is "b.1":
- set {_Ratusz::%player%} to 1
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- add 4 to {_MaxSlots::%player%}
- set yaml value "MaxSlots" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_MaxSlots::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz I&f."
- stop
- if {_Ratusz::%player%} is "b.2":
- set {_Ratusz::%player%} to 2
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- add 4 to {_MaxSlots::%player%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz II&f."
- stop
- if {_Ratusz::%player%} is "b.3":
- set {_Ratusz::%player%} to 3
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- add 4 to {_MaxSlots::%player%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz III&f."
- stop
- if {_Ratusz::%player%} is "b.4":
- set {_Ratusz::%player%} to 4
- set yaml value "Ratusz" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Ratusz::%player%}%"
- add 4 to {_MaxSlots::%player%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Ratusz IV&f."
- stop
- else:
- send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Ratusz::%{gb::gNamePlayer::%player%}%}%&f)."
- stop
- else:
- send "{@Tag}: Nie rozpoczales budowy tego budynku."
- stop
- if arg 2 is "magazyn":
- set {_Magazyn::%player%} to single value "Magazyn" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Magazyn::%player%} contain "b.":
- set {_now} to now
- if {_now} is greater or equal to {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}:
- clear {gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}
- if {_Magazyn::%player%} is "b.1":
- set {_Magazyn::%player%} to 1
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn I&f."
- stop
- if {_Magazyn::%player%} is "b.2":
- set {_Magazyn::%player%} to 2
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn II&f."
- stop
- if {_Magazyn::%player%} is "b.3":
- set {_Magazyn::%player%} to 3
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn III&f."
- stop
- if {_Magazyn::%player%} is "b.4":
- set {_Magazyn::%player%} to 4
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn IV&f."
- stop
- if {_Magazyn::%player%} is "b.5":
- set {_Magazyn::%player%} to 5
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn V&f."
- stop
- if {_Magazyn::%player%} is "b.6":
- set {_Magazyn::%player%} to 6
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn VI&f."
- stop
- if {_Magazyn::%player%} is "b.7":
- set {_Magazyn::%player%} to 7
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 500 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 500 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn VII&f."
- stop
- if {_Magazyn::%player%} is "b.8":
- set {_Magazyn::%player%} to 8
- set yaml value "Magazyn" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Magazyn::%player%}%"
- add 1000 to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}
- add 1000 to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}
- add 1000 to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}
- add 1000 to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Magazyn VIII&f."
- stop
- else:
- send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Magazyn::%{gb::gNamePlayer::%player%}%}%&f)."
- stop
- else:
- send "{@Tag}: Nie rozpoczales budowy tego budynku."
- stop
- if arg 2 is "tartak":
- set {_Tartak::%player%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Tartak::%player%} contain "b.":
- set {_now} to now
- if {_now} is greater or equal to {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}:
- clear {gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}
- if {_Tartak::%player%} is "b.1":
- set {_Tartak::%player%} to 1
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak I&f."
- stop
- if {_Tartak::%player%} is "b.2":
- set {_Tartak::%player%} to 2
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak II&f."
- stop
- if {_Tartak::%player%} is "b.3":
- set {_Tartak::%player%} to 3
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak III&f."
- stop
- if {_Tartak::%player%} is "b.4":
- set {_Tartak::%player%} to 4
- set yaml value "Tartak" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Tartak::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Tartak IV&f."
- stop
- else:
- send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Tartak::%{gb::gNamePlayer::%player%}%}%&f)."
- stop
- else:
- send "{@Tag}: Nie rozpoczales budowy tego budynku."
- stop
- if arg 2 is "alchemik":
- set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Alchemik::%player%} contain "b.":
- set {_now} to now
- if {_now} is greater or equal to {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}:
- clear {gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}
- if {_Alchemik::%player%} is "b.1":
- set {_Alchemik::%player%} to 1
- set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Alchemik I&f."
- stop
- if {_Alchemik::%player%} is "b.2":
- set {_Alchemik::%player%} to 2
- set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Alchemik II&f."
- stop
- if {_Alchemik::%player%} is "b.3":
- set {_Alchemik::%player%} to 3
- set yaml value "Alchemik" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Alchemik::%player%}%"
- broadcast "{@Tag}: Gracz &6%player%&f z gildii &6%{gb::gNamePlayer::%player%}%&f ukonczyl budowe: &6Alchemik III&f."
- stop
- else:
- send "{@Tag}: Ten budynek nie zostal jeszcze ukonczony. (&6%{gb:gBuildsTime::Alchemik::%{gb::gNamePlayer::%player%}%}%&f)."
- stop
- else:
- send "{@Tag}: Nie rozpoczales budowy tego budynku."
- stop
- if arg 3 is not "ratusz" or "townhall" or "magazyn" or "tartak" or "alchemik":
- send "{@Tag}: Nie ma takiego budynku."
- stop
- if arg 3 is not set:
- send "{@Tag}: Musisz podac jaki budynek chcesz ukonczyc."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Ukoncz [<Budowla>]"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Magazyn gildii: ======================================================================================= #
- # ============================================================================================================================================================================= #
- if arg 1 is "magazyn" or "storage" or "surowce" or "zasoby":
- if player has permission "gb.storage" or "gb.*":
- if arg 2 is not set:
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- send "&f============ &6Zasoby &f============"
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&2Zloto: &6%{_Gold::%player%}%&2/&6%{gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}%"
- send "&2Mana: &6%{_Mana::%player%}%&2/&6%{gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}%"
- send "&2Drewno: &6%{_Wood::%player%}%&2/&6%{gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}%"
- send "&2Zelazo: &6%{_Iron::%player%}%&2/&6%{gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}%"
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zasoby"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zasoby"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Budynki gildii: ======================================================================================= #
- # ============================================================================================================================================================================= #
- if arg 1 is "budynki" or "budowle":
- if player has permission "gb.builds" or "gb.*":
- if arg 2 is not set:
- if arg 3 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Ratusz::%player%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Tartak::%player%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Magazyn::%player%} to single value "Magazyn" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- send "&f============ &6Budynki &f============"
- replace all "0" with "&4Brak" in {_Ratusz::%player%}
- send "&6Ratusz &f- &2Ratusz %{_Ratusz::%player%}%"
- replace all "0" with "&4Brak" in {_Tartak::%player%}
- send "&6Tartak &f- &2Tartak %{_Tartak::%player%}%"
- replace all "0" with "&4Brak" in {_Magazyn::%player%}
- send "&6Magazyn &f- &2Magazyn %{_Magazyn::%player%}%"
- replace all "0" with "&4Brak" in {_Alchemik::%player%}
- send "&6Alchemik &f- &2Alchemik %{_Alchemik::%player%}%"
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Budowle"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Budowle"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Lista zaproszen do gildii: ============================================================================ #
- # ============================================================================================================================================================================= #
- if arg 1 is "zaproszenia" or "invites":
- if player has permission "gb.invites" or "gb.*":
- if {gb::gNamePlayer::%player%} is not set:
- if {gb::Invites::%player%::*} is empty:
- send "{@Tag}: Nie zostales zaproszony do zadnej gildii."
- stop
- else:
- if arg 2 is not set:
- set {_invites} to "%{gb::Invites::%player%::*}%"
- replace all " and" with "," in {_invites}
- send "{@Tag}: Zaproszenia do gildii: &6%{_invites}%"
- stop
- if arg 2 is "usun" or "clear":
- if {zapro::clear::%player%} is not set:
- send "{@Tag}: Czy na pewno chcesz usunac wszystkie zaproszenia do gildii?"
- send "{@Tag}: Wpisz ta komende ponownie, aby potwierdzic"
- set {zapro::clear::%player%} to true
- wait 10 second
- if {zapro::clear::%player%} is true:
- clear {zapro::clear::%player%}
- stop
- if {zapro::clear::%player%} is true:
- clear {gb::Invites::%player%::*}
- clear {zapro::clear::%player%}
- send "{@Tag}: Usunales wszystkie zaproszenia do gildii"
- stop
- if arg 2 is not "usun" or "clear":
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zaproszenia Usun"
- stop
- if arg 3 is set:
- if arg 2 is set:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zaproszenia Usun"
- if arg 2 is not set:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Zaproszenia"
- else:
- send "{@Tag}: Jestes juz w gildii."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ====================================================================== Chat gildii: ========================================================================================= #
- # ============================================================================================================================================================================= #
- if arg 1 is "chat":
- if player has permission "gb.chat" or "gb.*":
- if arg 3 is not set:
- if arg 2 is not set:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Chat::%player%} to single value "Chat" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Chat::%player%} is "On":
- if {gb::Chat::%name of player%} is not set:
- set {gb::Chat::%name of player%} to true
- send "{@Tag}: Pomyslnie wlaczono chat gildii."
- stop
- if {gb::Chat::%name of player%} is true:
- clear {gb::Chat::%name of player%}
- send "{@Tag}: Pomyslnie wlaczono chat ogolny."
- stop
- else:
- send "{@Tag}: Zmienianie chatu w gildii &2%{gb::gNamePlayer::%player%}%&f jest wylaczone."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie jestes czlonkiem zadnej gildii."
- stop
- if arg 2 is "ustaw":
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {_Chat::%player%} to single value "Chat" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Chat::%player%} is "On":
- set yaml value "Chat" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Off"
- loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
- send "{@Tag}: Gracz &2%name of player%&f wylaczyl chat dla gildii." to loop-value
- stop
- if {_Chat::%player%} is "Off":
- set yaml value "Chat" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "On"
- loop {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}:
- send "{@Tag}: Gracz &2%name of player%&f wlaczyl chat dla gildii." to loop-value
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii"
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie jestes czlonkiem zadnej gildii"
- stop
- else:
- send "{@Tag}: Poprawne uzycie: &6/GuildBattles Chat"
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Wojny gildii: ========================================================================================= #
- # ============================================================================================================================================================================= #
- if arg 1 is "wojna" or "walka" or "bitwa" or "war" or "battle":
- if player has permission "gb.war" or "gb.*":
- if {@warEnable} is true:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if arg 2 is "wypowiedz":
- if arg 3 is set:
- if {gb::Name::%arg 3%} is set:
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Wojna::%player%} is "Brak":
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml"
- if {_Wojna::%player%} is "Brak":
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml" parsed as player
- if {_Lider::%player%} is online:
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if {_Players::%player%} is greater or equal to {@warPlayersRequired}:
- set {_Players::%player%} to single value "Players" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml" parsed as number
- if {_Players::%player%} is greater or equal to {@warPlayersRequired}:
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" parsed as number
- if {_Honor::%player%} is greater or equal to {@warHonorRequired}:
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml" parsed as number
- if {_Honor::%player%} is greater or equal to {@warHonorRequired}:
- if {gb::gWarInvites::%arg 3%::*} doesn't contain "%{gb::gNamePlayer::%player%}%":
- add "%{gb::gNamePlayer::%player%}%" to {gb::gWarInvites::%arg 3%::*}
- broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwypowiedziala wojne gildii &6%arg 3%&f."
- 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%}
- loop 180 times:
- wait 1 second
- if {gb::gWarInvites::%arg 3%::*} contain "%{gb::gNamePlayer::%player%}%":
- add 1 to {_cooldown::%player%}
- else:
- exit loop
- stop
- if {_cooldown::%player%} is equal to 180:
- remove "%{gb::gNamePlayer::%player%}%" from {gb::gWarInvites::%arg 3%::*}
- stop
- if "%{gb::gWarInvites::%arg 3%::*}%" is "<none>":
- add "%{gb::gNamePlayer::%player%}%" to {gb::gWarInvites::%arg 3%::*}
- broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwypowiedziala wojne gildii &6%arg 3%&f."
- 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%}
- loop 180 times:
- wait 1 second
- if {gb::gWarInvites::%arg 3%::*} contain "%{gb::gNamePlayer::%player%}%":
- add 1 to {_cooldown::%player%}
- else:
- exit loop
- stop
- if {_cooldown::%player%} is equal to 180:
- remove "%{gb::gNamePlayer::%player%}%" from {gb::gWarInvites::%arg 3%::*}
- stop
- if {gb::gWarInvites::%arg 3%::*} contain "%{gb::gNamePlayer::%player%}%":
- send "{@Tag}: Zaproponowales juz wojne tej gildii."
- stop
- else:
- send "{@Tag}: Ta gildia ma za malo punktow Honoru."
- stop
- else:
- send "{@Tag}: Twoja gildia ma za malo punktow Honoru. Wymagane: &6{@warHonorRequired}&f."
- stop
- else:
- send "{@Tag}: Ta gildia ma za malo czlonkow."
- stop
- else:
- send "{@Tag}: Twoja gildia ma za malo czlonkow. Wymagane: &6{@warPlayersRequired}&f."
- stop
- else:
- send "{@Tag}: Lider tej gildii jest offline."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Ta gildia prowadzi juz wojne."
- stop
- else:
- send "{@Tag}: Twoja gildia prowadzi juz wojne"
- stop
- else:
- send "{@Tag}: Nie ma takiej gildii."
- stop
- else:
- send "{@Tag}: Musisz podac nazwe gildii, ktorej chcesz wypowiedziec wojne."
- stop
- if arg 2 is "akceptuj":
- if arg 3 is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- if {gb::Name::%arg 3%} is set:
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 3%.yml"
- if {_Wojna::%player%} is "Brak":
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Wojna::%player%} is "Brak":
- if {gb::gWarInvites::%{gb::gNamePlayer::%player%}%::*} contain "%arg 3%":
- set yaml value "Wojna" from "GuildsBattles/Guilds/%arg 3%.yml" to "%{gb::gNamePlayer::%player%}%"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%arg 3%"
- set {gb::warKills::%{gb::gNamePlayer::%player%}%} to 0
- set {gb::warKills::%arg 3%} to 0
- set {gb::warEnd::%arg 3%} to now
- add 3 days to {gb::warEnd::%arg 3%}
- set {gb::warEnd::%{gb::gNamePlayer::%player%}%} to {gb::warEnd::%arg 3%}
- broadcast "{@Tag}: Wojna pomiedzy &6%{gb::gNamePlayer::%player%}%&f i &6%arg 3%&f rozpoczeta!"
- else:
- send "{@Tag}: Ta gildia nie proponuje Ci wojny, lub zaproszenie wygaslo."
- stop
- else:
- send "{@Tag}: Twoja gildia prowadzi juz wojne."
- stop
- else:
- send "{@Tag}: Ta gildia prowadzi juz wojne."
- stop
- else:
- send "{@Tag}: Nie ma takiej gildii. %arg 3%"
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Musisz podac nazwe gildii, z ktora chcesz miec wojne."
- stop
- if arg 2 is "statystyki" or "info" or "informacje":
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Wojna::%player%} isn't "Brak":
- send "&f=======&6Informacje &4o wojnie&f======="
- send "&2Przeciwnik: &6%{_Wojna::%player%}%"
- send "&2Data zakonczenia: &6%{gb::warEnd::%{gb::gNamePlayer::%player%}%}%"
- send "&2Zabojstwa twojej gildii: &6%{gb::warKills::%{gb::gNamePlayer::%player%}%}%"
- send "&2Zabojstwa przciwnikow: &6%{gb::warKills::%{_Wojna::%player%}%}%"
- else:
- send "{@Tag}: Twoja gildia nie prowadzi wojny."
- stop
- if arg 2 is "zakoncz":
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Wojna::%player%} isn't "Brak":
- set {_now::%player%} to now
- if {_now::%player%} is greater than {gb::warEnd::%{gb::gNamePlayer::%player%}%}:
- if {gb::warKills::%{gb::gNamePlayer::%player%}%} is greater than {gb::warKills::%{_Wojna::%player%}%}:
- broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}% &fwygrala wojne przeciwko &6%{_Wojna::%player%}%&f."
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- add {@warGoldReward} to {_Gold::%player%}
- add {@warManaReward} to {_Mana::%player%}
- add {@warWoodReward} to {_Wood::%player%}
- add {@warIronReward} to {_Iron::%player%}
- add {@warHonorReward} to {_Honor::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Iron::%player%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- remove {@warLoseHonor} from {_Honor::%player%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Honor::%player%}%"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Brak"
- clear {gb::warEnd::%{gb::gNamePlayer::%player%}%}
- clear {gb::warEnd::%{_Wojna::%player%}%}
- clear {gb::warKills::%{gb::gNamePlayer::%player%}%}
- clear {gb::warKills::%{_Wojna::%player%}%}
- stop
- if {gb::warKills::%{gb::gNamePlayer::%player%}%} is smaller than {gb::warKills::%{_Wojna::%player%}%}:
- broadcast "{@Tag}: Gildia &6%{_Wojna::%player%}% &fwygrala wojne przeciwko &6%{gb::gNamePlayer::%player%}%&f."
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- add {@warGoldReward} to {_Gold::%player%}
- add {@warManaReward} to {_Mana::%player%}
- add {@warWoodReward} to {_Wood::%player%}
- add {@warIronReward} to {_Iron::%player%}
- add {@warHonorReward} to {_Honor::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Wood::%player%}%"
- set yaml value "Iron" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Iron::%player%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Honor::%player%}%"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- remove {@warLoseHonor} from {_Honor::%player%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Brak"
- clear {gb::warEnd::%{gb::gNamePlayer::%player%}%}
- clear {gb::warEnd::%{_Wojna::%player%}%}
- clear {gb::warKills::%{gb::gNamePlayer::%player%}%}
- clear {gb::warKills::%{_Wojna::%player%}%}
- stop
- if {gb::warKills::%{gb::gNamePlayer::%player%}%} is equal to {gb::warKills::%{_Wojna::%player%}%}:
- broadcast "{@Tag}: Wojna pomiedzy gildia &6%{_Wojna::%player%}% &fi &6%{gb::gNamePlayer::%player%}%&f zostala zakonczona remisem."
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_Wojna::%player%}%.yml"
- add {@warRemisGoldReward} to {_Gold::%player%}
- add {@warRemisManaReward} to {_Mana::%player%}
- add {@warRemisWoodReward} to {_Wood::%player%}
- add {@warRemisIronReward} to {_Iron::%player%}
- add {@warRemisHonorReward} to {_Honor::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Wood::%player%}%"
- set yaml value "Iron" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Iron::%player%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "%{_Honor::%player%}%"
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- add {@warRemisGoldReward} to {_Gold::%player%}
- add {@warRemisManaReward} to {_Mana::%player%}
- add {@warRemisWoodReward} to {_Wood::%player%}
- add {@warRemisIronReward} to {_Iron::%player%}
- add {@warRemisHonorReward} to {_Honor::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Gold::%player%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Mana::%player%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Wood::%player%}%"
- set yaml value "Iron" from "GuildsBattles/Guilds%{gb::gNamePlayer::%player%}%.yml" to "%{_Iron::%player%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "Brak"
- clear {gb::warEnd::%{gb::gNamePlayer::%player%}%}
- clear {gb::warEnd::%{_Wojna::%player%}%}
- clear {gb::warKills::%{gb::gNamePlayer::%player%}%}
- clear {gb::warKills::%{_Wojna::%player%}%}
- stop
- else:
- send "{@Tag}: Wojna zakonczy sie: &6%{gb::warEnd::%{gb::gNamePlayer::%player%}%}%&f."
- stop
- else:
- send "{@Tag}: Twoja gildia nie prowadzi wojny."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Sklep z efektami dla gildii: ========================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "alchemia":
- if player has permission "gb.alchemia" or "gb.*":
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- set {_Alchemik::%player%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if "%{_Alchemik::%player%}%" isn't "0":
- set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if "%{_Efekt::%player%}%" is "Brak":
- if "%{_Alchemik::%player%}%" is "1" or "b.2":
- open chest with 5 rows named "&6Efekty:" to player
- 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"
- 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"
- 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"
- if "%{_Alchemik::%player%}%" is "2" or "b.3":
- open chest with 5 rows named "&6Efekty:" to player
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
- if "%{_Alchemik::%player%}%" is "3":
- open chest with 5 rows named "&6Efekty:" to player
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
- else:
- send "{@Tag}: Juz wykupiles efekt dla gildii."
- stop
- if "%{_Alchemik::%player%}%" is "0":
- send "{@Tag}: Aby kozystac ze sklup musisz wybudowac Alchemika."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Awansowanie gracza (rekrut->czlonek->dowodca): =================================================================================== #
- # ============================================================================================================================================================================= #
- if arg 1 is "awans":
- if player has permission "gb.awans" or "gb.*":
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- if arg 2 is set:
- set {_gracz} to arg 2 parsed as player
- if arg 2 isn't "%player%":
- if {_gracz} is online:
- if {gb::gNamePlayer::%{_gracz}%} is {gb::gNamePlayer::%player%}:
- if {gb::gRank::%{_gracz}%} is "rekrut":
- clear {gb::gRank::%{_gracz}%}
- send "{@Tag}: Awansowales gracza &6%{_gracz}% &fna czlonka gildii."
- send "{@Tag}: Zostales awansowany na czlonka gildii." to {_gracz}
- stop
- if {gb::gRank::%{_gracz}%} is not set:
- set {gb::gRank::%{_gracz}%} to "dowodca"
- send "{@Tag}: Awansowales gracza &6%{_gracz}% &fna dowodce gildii."
- send "{@Tag}: Zostales awansowany na dowodce gildii." to {_gracz}
- stop
- if {gb::gRank::%{_gracz}%} is "dowodca":
- send "{@Tag}: Nie mozesz awansowac tego gracza."
- stop
- else:
- send "{@Tag}: Ten gracz nie jest w twojej gildii."
- stop
- else:
- send "{@Tag}: Tego gracza nie ma na serwerze."
- stop
- else:
- send "{@Tag}: Nie mozesz awansowac samego siebie."
- stop
- else:
- send "{@Tag}: Musisz podac gracza, ktorego chcesz awansowac."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Twoja gildia nie istnieje."
- clear {gb::gNamePlayer::%player%}
- stop
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- if arg 1 is "degradacja" or "degrad":
- if player has permission "gb.degrad" or "gb.*":
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- if arg 2 is set:
- set {_gracz} to arg 2 parsed as player
- if {_gracz} isn't "%player%":
- if {gb::gNamePlayer::%{_gracz}%} is {gb::gNamePlayer::%player%}:
- if {gb::gRank::%{_gracz}%} is "dowodca":
- clear {gb::gRank::%{_gracz}%}
- send "{@Tag}: Zdegradowales gracza &6%{_gracz}%&f."
- if {_gracz} is online:
- send "{@Tag}: Zostales zdegradowany." to {_gracz}
- stop
- if {gb::gRank::%{_gracz}%} is not set:
- set {gb::gRank::%{_gracz}%} to "rekrut"
- send "{@Tag}: Zdegradowales gracza &6%{_gracz}%&f."
- if {_gracz} is online:
- send "{@Tag}: Zostales zdegradowany." to {_gracz}
- stop
- if {gb::gRank::%{_gracz}%} is "rekrut":
- send "{@Tag}: Nie mozesz zdegradowac tego gracza."
- stop
- else:
- send "{@Tag}: Ten gracz nie jest w twojej gildii."
- stop
- else:
- send "{@Tag}: Nie mozesz zdegradowac samego siebie."
- stop
- else:
- send "{@Tag}: Musisz podac gracza, ktorego chcesz zdegradowac."
- stop
- else:
- send "{@Tag}: Nie jestes liderem tej gildii."
- stop
- else:
- send "{@Tag}: Twoja gildia nie istnieje."
- clear {gb::gNamePlayer::%player%}
- stop
- else:
- send "{@Tag}: Nie nalezysz do zadnej gildii."
- stop
- else:
- send "{@Tag}: Nie masz do tego uprawnien."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Surowce dla gildii: =================================================================================== #
- # ============================================================================================================================================================================= #
- every 15 second:
- loop {gb::gName::*}:
- set {_Lider::%loop-value%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as player
- set {_Ratusz::%loop-value%} to single value "Ratusz" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml"
- set {_Tartak::%loop-value%} to single value "Tartak" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml"
- set {_Alchemik::%loop-value%} to single value "Alchemik" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml"
- if {_Lider::%loop-value%} is online:
- if "%{_Ratusz::%loop-value%}%" is "1":
- set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 50+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
- add 50 to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- else:
- add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- if "%{_Ratusz::%loop-value%}%" is "2" or "b.2":
- set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 100+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
- add 100 to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- else:
- add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- if "%{_Ratusz::%loop-value%}%" is "3" or "b.3":
- set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 150+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
- add 150 to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- else:
- add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- if "%{_Ratusz::%loop-value%}%" is "4":
- set {_Gold::%loop-value%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 200+{_Gold::%loop-value%} is smaller or equal to {gb::gMagazyn::Gold::%loop-value%}:
- add 200 to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- else:
- add {gb::gMagazyn::Gold::%loop-value%}-{_Gold::%loop-value%} to {_Gold::%loop-value%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Gold::%loop-value%}%"
- if "%{_Tartak::%loop-value%}%" is "1":
- set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 50+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
- add 50 to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- else:
- add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- if "%{_Tartak::%loop-value%}%" is "2" or "b.2":
- set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 100+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
- add 100 to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- else:
- add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- if "%{_Tartak::%loop-value%}%" is "3" or "b.3":
- set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 150+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
- add 150 to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- else:
- add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- if "%{_Tartak::%loop-value%}%" is "4":
- set {_Wood::%loop-value%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 200+{_Wood::%loop-value%} is smaller or equal to {gb::gMagazyn::Wood::%loop-value%}:
- add 500 to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- else:
- add {gb::gMagazyn::Wood::%loop-value%}-{_Wood::%loop-value%} to {_Wood::%loop-value%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Wood::%loop-value%}%"
- if "%{_Alchemik::%loop-value%}%" is "1":
- set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 5+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
- add 5 to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- else:
- add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- if "%{_Alchemik::%loop-value%}%" is "2" or "b.2":
- set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 10+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
- add 10 to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- else:
- add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- if "%{_Alchemik::%loop-value%}%" is "3" or "b.3":
- set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 15+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
- add 15 to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- else:
- add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- if "%{_Alchemik::%loop-value%}%" is "4":
- set {_Mana::%loop-value%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%loop-value%.yml" parsed as number
- if 20+{_Mana::%loop-value%} is smaller or equal to {gb::gMagazyn::Mana::%loop-value%}:
- add 20 to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- else:
- add {gb::gMagazyn::Mana::%loop-value%}-{_Mana::%loop-value%} to {_Mana::%loop-value%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%loop-value%.yml" to "%{_Mana::%loop-value%}%"
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Chat dla gildii: ====================================================================================== #
- # ============================================================================================================================================================================= #
- on chat:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if {gb::gDescPlayer::%player%} is not set:
- {gb::Chat::%name of player%} is true:
- cancel event
- set {_Lider::%player%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_Lider::%player%} is "%player%":
- send "&2[&6Gildia&2] &4%name of player%&f: &2&l%message%" to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- else:
- send "&2[&6Gildia&2] &6%name of player%&f: &2&l%message%" to {gb::gPlayers::%{gb::gNamePlayer::%player%}%::*}
- stop
- if {gb::gDescPlayer::%player%} is true:
- if "%message%" contain "&":
- send "{@Tag}: Opis zawiera niedozwolone znaki. (''&'')."
- cancel event
- clear {gb::gDescPlayer::%player%}
- else:
- if length of "%message%" is smaller or equal to 50:
- cancel event
- set yaml value "Desc" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%message%"
- send "{@Tag}: Ustawiles opis gildii: %message%"
- clear {gb::gDescPlayer::%player%}
- stop
- else:
- send "{@Tag}: Opis nie moze zawierac wiecej niz 50 znakow."
- cancel event
- clear {gb::gDescPlayer::%player%}
- stop
- else:
- send "{@Tag}: Gildia w ktorej byles nie istnieje."
- clear {gb::gNamePlayer::%player%}
- # ============================================================================================================================================================================= #
- # ===================================================================== Zabojstwa i zgony: ==================================================================================== #
- # ============================================================================================================================================================================= #
- on death of player:
- if attacker is not set:
- if damage was caused by fall:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fzginal przez upadek."
- else:
- broadcast "{@Tag}: Gracz &6%victim% &fzginal przez upadek."
- clear {gb::gNamePlayer::%victim%}
- else:
- broadcast "{@Tag}: Gracz &6%victim% &fzginal przez upadek."
- stop
- if damage was caused by lava:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &futopil sie w lawie."
- else:
- broadcast "{@Tag}: Gracz &6%victim% &futopil sie w lawie."
- clear {gb::gNamePlayer::%victim%}
- else:
- broadcast "{@Tag}: Gracz &6%victim% &futopil sie w lawie."
- stop
- if damage was caused by fire:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &fsplonal."
- else:
- broadcast "{@Tag}: Gracz &6%victim% &fsplonal."
- clear {gb::gNamePlayer::%victim%}
- else:
- broadcast "{@Tag}: Gracz &6%victim% &fsplonal."
- stop
- if damage was caused by drown:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- broadcast "{@Tag}: Gracz &2[&6%{gb::gNamePlayer::%victim%}%&2]&6%victim% &6(&4-&25&6) &futona."
- else:
- broadcast "{@Tag}: Gracz &6%victim% &futona."
- clear {gb::gNamePlayer::%victim%}
- else:
- broadcast "{@Tag}: Gracz &6%victim% &futona."
- if attacker is player:
- if {gb::gNamePlayer::%attacker%} is set:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- if {gb::Name::%{gb::gNamePlayer::%attacker%}%} is set:
- if {gb::gNamePlayer::%attacker%} is {gb::gNamePlayer::%victim%}:
- if {@guildPvp} is true:
- set {_Lider::%attacker%} to single value "Lider" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- if {_Lider::%player%} is "%attacker%":
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" parsed as number
- remove 20 from {_Honor::%attacker%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- 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."
- stop
- else:
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" parsed as number
- remove 15 from {_Honor::%attacker%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- 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."
- stop
- else:
- set {_Wojna::%attacker%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- if {_Wojna::%attacker%} is "Brak":
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" parsed as number
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" parsed as number
- add 5 to {_Honor::%attacker%}
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- 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."
- stop
- if {_Wojna::%attacker%} isn't "Brak":
- set {_Wojna::%victim%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- if {_Wojna::%victim%} is "Brak":
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
- add 5 to {_Honor::%attacker%}
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- 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."
- stop
- if {_Wojna::%victim%} isn't "Brak":
- if {_Wojna::%attacker%} isn't {gb::gNamePlayer::%victim%}:
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
- add 5 to {_Honor::%attacker%}
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- 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."
- stop
- if {_Wojna::%attacker%} is {gb::gNamePlayer::%victim%}:
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Gold::%attacker%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Mana::%attacker%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Wood::%attacker%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Iron::%attacker%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
- add {@warKillHonorReward} to {_Honor::%attacker%}
- add {@warKillGoldReward} to {_Gold::%attacker%}
- add {@warKillWoodReward} to {_Wood::%attacker%}
- add {@warKillIronReward} to {_Iron::%attacker%}
- add {@warKillManaReward} to {_Mana::%attacker%}
- remove {@warKillHonorReward} from {_Honor::%victim%}
- add 1 to {gb::warKills::%{gb::gNamePlayer::%attacker%}%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Gold::%attacker%}%"
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Mana::%attacker%}%"
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Wood::%attacker%}%"
- set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Iron::%attacker%}%"
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- 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."
- stop
- else:
- clear {gb::gNamePlayer::%attacker%}
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
- add 1 to {_Honor::%attacker%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&21&6)&f."
- stop
- else:
- clear {gb::gNamePlayer::%victim%}
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
- add 1 to {_Honor::%attacker%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&21&6)&f."
- stop
- else:
- set {_Honor::%attacker%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- set {_Honor::%attacker%} to {_Honor::%attacker%} parsed as number
- add 1 to {_Honor::%attacker%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Honor::%attacker%}%"
- broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &2[&6%{gb::gNamePlayer::%attacker%}%&2]&6%attacker% &6(&2+&21&6)&f."
- stop
- else:
- if {gb::gNamePlayer::%victim%} is set:
- set {_Honor::%victim%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- set {_Honor::%victim%} to {_Honor::%victim%} parsed as number
- remove 5 from {_Honor::%victim%}
- set yaml value "Honor" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Honor::%victim%}%"
- broadcast "{@Tag}: Gracz &2[&6%{gb::gTag::%{_gName::%victim%}%}%&2]&6&6%victim% &6(&4-&25&6) &fzostal zabity przez %attacker%."
- stop
- else:
- broadcast "{@Tag}: Gracz &6%victim% &fzostal zabity przez &6%attacker%."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Pvp w gildii: ===================================================================================== #
- # ============================================================================================================================================================================= #
- on damage:
- if victim is player:
- if attacker is player:
- if {gb::gNamePlayer::%attacker%} is set:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- if {gb::Name::%{gb::gNamePlayer::%attacker%}%} is set:
- if {gb::gNamePlayer::%attacker%} is {gb::gNamePlayer::%victim%}:
- if {@guildPvp} is false:
- cancel event
- send "{@Tag}: Nie mozesz uderzyc gracza z gildii"
- stop
- else:
- clear {gb::gNamePlayer::%attacker%}
- stop
- else:
- clear {gb::gNamePlayer::%victim%}
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Tworzenie plikow konfiguracyjnych: ==================================================================== #
- # ============================================================================================================================================================================= #
- on load:
- if folder "plugins/Skript/scripts/GuildsBattles" doesn't exists:
- create folder "plugins/Skript/scripts/GuildsBattles"
- create folder "plugins/Skript/scripts/GuildsBattles/Guilds"
- create file "plugins/Skript/scripts/GuildsBattles/config.yml"
- if folder "plugins/Skript/scripts/GuildsBattles" exists:
- if folder "plugins/Skript/scripts/GuildsBattles/Guilds" doesn't exists:
- create folder "plugins/Skript/scripts/GuildsBattles/Guilds"
- if file "plugins/Skript/scripts/GuildsBattles/config.yml" doesn't exists:
- create file "plugins/Skript/scripts/GuildsBattles/config.yml"
- # ============================================================================================================================================================================= #
- # ===================================================================== Sklep z efektami p.2 ================================================================================== #
- # ============================================================================================================================================================================= #
- command /guildeffects [<number>] [<text>] [<text>]:
- executable by: console
- trigger:
- if arg 1 is set:
- if arg 2 is set:
- if arg 3 is "sila":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_number} to arg 1
- if {_number} is "1":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 150:
- remove 150 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Sila I"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Sila I na 1 godzine."
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6150&f)."
- stop
- if {_number} is "2":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 300:
- remove 300 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Sila II"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Sila II na 1 godzine."
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6300&f)."
- stop
- if {_number} is "3":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 600:
- remove 600 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Sila II"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 2 hours to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Sila II na 2 godziny."
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6600&f)."
- stop
- if arg 3 is "szybkosc":
- set {_number} to arg 1
- if {_number} is "1":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 150:
- remove 150 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Szybkosc I"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Szybkosc I na 1 godzine."
- loop {gb::gPlayers::%arg 2%::*}:
- run loop-value command "/speed 1.5" as op
- wait 1 hour
- loop {gb::gPlayers::%arg 2%::*}:
- run loop-value command "/speed 1" as op
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6150&f)."
- stop
- if {_number} is "2":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 300:
- remove 300 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Szybkosc I"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Szybkosc II na 1 godzine."
- loop {gb::gPlayers::%arg 2%::*}:
- run loop-value command "/speed 2" as op
- wait 2 hours
- loop {gb::gPlayers::%arg 2%::*}:
- run loop-value command "/speed 1" as op
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6300&f)."
- stop
- if {_number} is "3":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 600:
- remove 150 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Szybkosc I"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 2 hours to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Szybkosc II na 2 godziny."
- loop {gb::gPlayers::%arg 2%::*}:
- run loop-value command "/speed 2" as op
- wait 2 hours
- loop {gb::gPlayers::%arg 2%::*}:
- run loop-value command "/speed 1" as op
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6600&f)."
- stop
- if arg 2 is "regen":
- set {_number} to arg 1
- if {_number} is "1":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 200:
- remove 200 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Regen I"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Regeneracja I na 1 godzine."
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6200&f)."
- stop
- if {_number} is "2":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 400:
- remove 400 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Regen II"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 1 hour to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Regeneracja II na 1 godzine."
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6400&f)."
- stop
- if {_number} is "3":
- set {_Efekt::%arg 2%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml"
- if "%{_Efekt::%arg 2%}%" is "Brak":
- set {_Mana::%arg 2%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%arg 2%.yml" parsed as number
- if {_Mana::%arg 2%} is greater or equal to 800:
- remove 800 from {_Mana::%arg 2%}
- set {_Efekt::%arg 2%} to "Regen II"
- set yaml value "Mana" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Mana::%arg 2%}%"
- set yaml value "Efekt" from "GuildsBattles/Guilds/%arg 2%.yml" to "%{_Efekt::%arg 2%}%"
- set {gb::Efekt::TimeOut::%arg 2%} to now
- add 2 hours to {gb::Efekt::TimeOut::%arg 2%}
- broadcast "{@Tag}: Gildia &6%arg 2% &fwykupila Regeneracja II na 2 godziny."
- stop
- else:
- send "{@Tag}: Nie masz tyle many. (&6800&f)."
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Wlasne efekty: ======================================================================================== #
- # ============================================================================================================================================================================= #
- on damage:
- if attacker is player:
- if {gb::gNamePlayer::%attacker%} is set:
- if {gb::Name::%{gb::gNamePlayer::%attacker%}%} is set:
- set {_Efekt::%attacker%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%attacker%}%.yml"
- if "%{_Efekt::%attacker%}%" is "Sila I":
- set {_now} to now
- if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%attacker%}%}:
- set {_Efekt::%attacker%} to "Brak"
- set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Efekt::%attacker%}%"
- stop
- else:
- set damage to damage*1.3
- stop
- if "%{_Efekt::%attacker%}%" is "Sila I":
- set {_now} to now
- if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%attacker%}%}:
- set {_Efekt::%attacker%} to "Brak"
- set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%attacker%}%.yml" to "%{_Efekt::%attacker%}%"
- stop
- else:
- set damage to damage*1.8
- stop
- else:
- clear {gb::gNamePlayer::%attacker%}
- stop
- if victim is player:
- if {gb::gNamePlayer::%victim%} is set:
- if {gb::Name::%{gb::gNamePlayer::%victim%}%} is set:
- set {_Efekt::%victim%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%victim%}%.yml"
- if "%{_Efekt::%victim%}%" is "Regen I":
- set {_now} to now
- if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%victim%}%}:
- set {_Efekt::%victim%} to "Brak"
- set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Efekt::%victim%}%"
- stop
- else:
- apply regeneration 1 to victim
- stop
- if "%{_Efekt::%victim%}%" is "Regen II":
- set {_now} to now
- if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%victim%}%}:
- set {_Efekt::%victim%} to "Brak"
- set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%victim%}%.yml" to "%{_Efekt::%victim%}%"
- stop
- else:
- apply regeneration 2 to victim
- stop
- else:
- clear {gb::gNamePlayer::%victim%}
- stop
- if victim is player:
- if attacker is player:
- if {teleport::%victim%} is true:
- clear {teleport::%victim%}
- send "{@Tag}: Teleportacja anulowana." to victim
- if {teleport::%attacker%} is true:
- clear {teleport::%attacker%}
- send "{@Tag}: Teleportacja anulowana." to attacker
- stop
- on login:
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if "%{_Efekt::%player%}%" is "Szybkosc I":
- set {_now} to now
- if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%player%}%}:
- set {_Efekt::%player%} to "Brak"
- set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%player%}%.yml" to "%{_Efekt::%player%}%"
- run player command "/speed 1" as op
- stop
- else:
- run player command "/speed 1.5" as op
- stop
- if "%{_Efekt::%player%}%" is "Szybkosc II":
- set {_now} to now
- if {_now} is greater than {gb::Efekt::TimeOut::%{gb::gNamePlayer::%player%}%}:
- set {_Efekt::%player%} to "Brak"
- set yaml value "Efekt" from "GuildsBattles/%{gb::gNamePlayer::%player%}%.yml" to "%{_Efekt::%player%}%"
- run player command "/speed 1" as op
- stop
- else:
- run player command "/speed 2" as op
- stop
- else:
- clear {gb::gNamePlayer::%player%}
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Akcje na terenie gildii: ============================================================================== #
- # ============================================================================================================================================================================= #
- on place:
- if {@enableCuboids} is true:
- if player is op:
- stop
- else:
- if location of event-block is in any region:
- set {_region::%player%} to Region.getAt{location of player};
- if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
- stop
- else:
- send "{@Tag}: Nie jestes na terenie swojej gildii."
- cancel event
- stop
- on break:
- if {@enableCuboids} is true:
- if player is op:
- stop
- else:
- if location of event-block is in any region:
- set {_region::%player%} to Region.getAt{location of player};
- if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
- stop
- else:
- send "{@Tag}: Nie jestes na terenie swojej gildii."
- cancel event
- stop
- on rightclick:
- if clicked block is chest or furnace or hopper or trapped chest or dispenser or dropper or brewing stand or lever:
- if {@enableCuboids} is true:
- if {@openChests} is false:
- if player is op:
- stop
- else:
- if location of clicked block is in any region:
- set {_region::%player%} to Region.getAt{location of player};
- if "%{_region::%player%}%" is "%{gb::gNamePlayer::%player%}%":
- stop
- else:
- send "{@Tag}: Nie jestes na terenie swojej gildii."
- cancel event
- stop
- else:
- stop
- else:
- stop
- # ============================================================================================================================================================================= #
- # ===================================================================== Niszczenie obsydianu/wody: ============================================================================ #
- # ============================================================================================================================================================================= #
- on explode:
- loop blocks in radius 2:
- if loop-block is obsidian:
- if {@tntDestroy} is true:
- chance of {@tntChance}%:
- set loop-block to air
- loop blocks in radius 5:
- if loop-block is water:
- if {@tntDestroy} is true:
- set loop-block to air
- # ============================================================================================================================================================================= #
- # ===================================================================== Akcje zwiazane z jajkiem: ============================================================================= #
- # ============================================================================================================================================================================= #
- on leftclick:
- if {@enableCuboids} is true:
- if {@guildDestroy} is true:
- if clicked block is dragon egg:
- if location of clicked block is in any region:
- set {_region::%player%} to Region.getAt{location of player};
- if {gb::Name::%{_region::%player%}%} is set:
- if "%{_region::%player%}%" isn't "%{gb::gNamePlayer::%player%}%":
- if {gb::gNamePlayer::%player%} is set:
- if {gb::Name::%{gb::gNamePlayer::%player%}%} is set:
- if {gb::gNamePlayer::%player%} isn't "%{_region::%player%}%":
- if {gb::Egglife::%{_region::%player%}%} is greater than 0:
- remove {@eggDamage} from {gb::Egglife::%{_region::%player%}%}
- send "{@Tag}: Zycie jajka: %{gb::Egglife::%{_region::%player%}%}%"
- if {gb::Egglife::%{_region::%player%}%} is smaller or equal to 0:
- broadcast "{@Tag}: Gildia &6%{gb::gNamePlayer::%player%}%&f podbila gildie %{_region::%player%}%"
- broadcast "{@Tag}: Pozycja tej gildii to: &6x:%x-coordinate of player% y:%y-coordinate of player% z:%z-coordinate of player%&f."
- set {_Honor::%player%} to single value "Honor" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- add 150 to {_Honor::%player%}
- set yaml value "Honor" from "GuildsBattles/%{gb::gNamePlayer::%player%}%.yml" to "%{_Honor::%player%}%"
- loop blocks in radius 3 of clicked block:
- if loop-block is bedrock:
- add 1 to {_bedrock::%player%}
- if {_bedrock::%player%} is 1:
- set block below {gb::gCubiudCenter::%{_region::%player%}%} to air
- set block at {gb::gCubiudCenter::%{_region::%player%}%} to air
- clear {gb::eggLife::%{_region::%player%}%}
- clear {gb::gCubiudCenter::%{_region::%player%}%}
- if {@dropMaterials} is true:
- chance of {@dropChance}%:
- set {_Gold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- set {_Mana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- set {_Wood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- set {_Iron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- set {_myGold::%player%} to single value "Gold" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_myMana::%player%} to single value "Mana" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_myWood::%player%} to single value "Wood" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- set {_myIron::%player%} to single value "Iron" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml"
- if {_myGold::%player%}+{_Gold::%player%} is smaller or equal to {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}:
- add {_Gold::%player%} to {_myGold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myGold::%player%}%"
- else:
- add {gb::gMagazyn::Gold::%{gb::gNamePlayer::%player%}%}-{_Gold::%player%} to {_myGold::%player%}
- set yaml value "Gold" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myGold::%player%}%"
- if {_myMana::%player%}+{_Mana::%player%} is smaller or equal to {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}:
- add {_mana::%player%} to {_myMana::%player%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myMana::%player%}%"
- else:
- add {gb::gMagazyn::Mana::%{gb::gNamePlayer::%player%}%}-{_Mana::%player%} to {_myMana::%player%}
- set yaml value "Mana" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myMana::%player%}%"
- if {_myIron::%player%}+{_Iron::%player%} is smaller or equal to {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}:
- add {_Iron::%player%} to {_myIron::%player%}
- set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myIron::%player%}%"
- else:
- add {gb::gMagazyn::Iron::%{gb::gNamePlayer::%player%}%}-{_Iron::%player%} to {_myIron::%player%}
- set yaml value "Iron" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myIron::%player%}%"
- if {_myWood::%player%}+{_Wood::%player%} is smaller or equal to {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}:
- add {_Wood::%player%} to {_myWood::%player%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myWood::%player%}%"
- else:
- add {gb::gMagazyn::Wood::%{gb::gNamePlayer::%player%}%}-{_Wood::%player%} to {_myWood::%player%}
- set yaml value "Wood" from "GuildsBattles/Guilds/%{gb::gNamePlayer::%player%}%.yml" to "%{_myWood::%player%}%"
- send "{@Tag}: Udalo Ci sie przejac magazyn przeciwnikow!"
- else:
- send "{@Tag}: Magazyn przeciwnikow spłona."
- set {_Efekt::%player%} to single value "Efekt" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- "%{_region::%player%}%".Region.delete{};
- if "%{_Efekt::%player%}%" is "Regen I" or "Regen II":
- loop {gb::gPlayers::%{_region::%player%}%::*}:
- set {_x::%player%} to loop-value parsed as player
- remove regeneration from {_x::%player%}
- if {@warEnable} is true:
- set {_Wojna::%player%} to single value "Wojna" get of "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- if {_Wojna::%player%} isn't "Brak":
- set yaml value "Wojna" from "GuildsBattles/Guilds/%{_Wojna::%player%}%.yml" to "Brak"
- loop {gb::gName::*}:
- if {gb::gWarInvites::%loop-value%::*} contain "%{_region::%player%}%":
- remove "%{_region::%player%}%" from {gb::gWarInvites::%loop-value%::*}
- clear {gb::gWarInvites::%{_region::%player%}%::*}
- remove {_region::%player%} from {gb::gName::*}
- clear {gb::Efekt::TimeOut::%{_region::%player%}%}
- clear {gb:gBuildsTime::Ratusz::%{_region::%player%}%}
- clear {gb:gBuildsTime::Magazyn::%{_region::%player%}%}
- clear {gb:gBuildsTime::Tartak::%{_region::%player%}%}
- clear {gb:gBuildsTime::Alchemik::%{_region::%player%}%}
- clear {gb::Name::%{_region::%player%}%}
- clear {gb::gHome::%{_region::%player%}%}
- df "plugins/Skript/scripts/GuildsBattles/Guilds/%{_region::%player%}%.yml"
- loop {gb::gPlayers::%{_region::%player%}%::*}:
- clear {gb::gNamePlayer::%loop-value%}
- clear {gb::gRank::%loop-value%}
- delete {gb::gPlayers::%{_region::%player%}%::*}
- else:
- cancel event
- else:
- send "{@Tag}: Aby zaatakowac ta gildie musisz byc w gildii."
- stop
- on rightclick on dragon egg:
- if {@enableCuboids} is true:
- if {@guildDestroy} is true:
- if location of clicked block is in any region:
- set {_region::%player%} to Region.getAt{location of clicked block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- on break:
- if {@enableCuboids} is true:
- if {@guildDestroy} is true:
- if event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block below event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block under event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block east of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block west of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block north of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block south of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- on explode:
- if {@enableCuboids} is true:
- if {@guildDestroy} is true:
- loop blocks in radius 5:
- if loop-block is dragon egg:
- if location of loop-block is in any region:
- set {_region::%loop-block%} to Region.getAt{location of loop-block};
- if {gb::Name::%{_region::%loop-block%}%} is set:
- set {_loc} to location of loop-block
- wait 1 tick
- set loop-block to dragon egg
- remove {@eggExplodeDamage} from {gb::Egglife::%{_region::%loop-block%}%}
- on place:
- if {@enableCuboids} is true:
- if {@guildDestroy} is true:
- if block under event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block east of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block west of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block north of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- if block south of event-block is dragon egg:
- if location of event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- cancel event
- # ============================================================================================================================================================================= #
- # =========================================================================== AntyLogout: ===================================================================================== #
- # ============================================================================================================================================================================= #
- on damage of player:
- if attacker is player:
- if {@antyLog} is true:
- set {gb::AntyLog::%attacker%} to now
- set {gb::AntyLog::%victim%} to now
- add {@antyLogTime} seconds to {gb::AntyLog::%attacker%}
- add {@antyLogTime} seconds to {gb::AntyLog::%victim%}
- display "&6AntyLogout - &fNie mozesz sie wylogowac" on bossbar with 100 percent by {@antyLogTime} seconds for attacker
- display "&6AntyLogout - &fNie mozesz sie wylogowac" on bossbar with 100 percent by {@antyLogTime} seconds for victim
- wait {@antyLogTime} seconds
- set {_now} to now
- if {_now} is greater than {gb::AntyLog::%attacker%}:
- clear {gb::AntyLog::%attacker%}
- if now is greater than {gb::AntyLog::%victim%}:
- clear {gb::AntyLog::%victim%}
- on quit:
- if {@antyLog} is true:
- if {gb::AntyLog::%player%} is set:
- clear {gb::AntyLog::%player%}
- if {@antyLogType} is "dropeq":
- drop items of player's inventory at location of player
- drop player's helmet at location of player
- drop player's chestplate at location of player
- drop player's leggings at location of player
- drop player's boots at location of player
- clear player's inventory
- broadcast "{@Tag}: Gracz &6%player% &fwylogowal sie podczas walki, a jego przedmioty zostaly wyrzucone na ziemie."
- stop
- if {@antyLogType} is "death":
- kill player
- broadcast "{@Tag}: Gracz &6%player% &fwylogowal sie podczas walki i zginal."
- stop
- on command "/spawn" or "/tpaccept":
- if {@antyLog} is true:
- if {gb::AntyLog::%player%} is set:
- cancel event
- # ============================================================================================================================================================================= #
- # =========================================================================== Teleport: ======================================================================================= #
- # ============================================================================================================================================================================= #
- on command:
- if {teleport::%player%} is true:
- send "{@Tag}: Teleportacja anulowana"
- clear {teleport::%player%}
- stop
- on chat:
- if {teleport::%player%} is true:
- send "{@Tag}: Teleportacja anulowana"
- clear {teleport::%player%}
- stop
- on quit:
- if {teleport::%player%} is true:
- clear {teleport::%player%}
- stop
- on kick:
- if {teleport::%player%} is true:
- clear {teleport::%player%}
- stop
- on rightclick:
- if {teleport::%player%} is true:
- send "{@Tag}: Teleportacja anulowana"
- clear {teleport::%player%}
- stop
- on leftclick:
- if {teleport::%player%} is true:
- send "{@Tag}: Teleportacja anulowana"
- clear {teleport::%player%}
- stop
- # ============================================================================================================================================================================= #
- # ======================================================================= Blokoada akcji po wybuchu: ========================================================================== #
- # ============================================================================================================================================================================= #
- on explode:
- if event-location is in any region:
- set {_region} to Region.getAt{location of event-location};
- if {gb::Name::%{_region}%} is set:
- if {@explodeBlock} is true:
- set {gb::Explode::%{_region}%} to now
- add {@explodeTime} seconds to {gb::Explode::%{_region}%}
- wait {@explodeTime} seconds
- set {_now} to now
- if {_now} is greater than {gb::Explode::%{_region}%}:
- clear {gb::Explode::%{_region}%}
- on place:
- if event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- if {@explodeBlock} is true:
- if {gb::Explode::%{_region}%} is set:
- cancel event
- on break:
- if event-block is in any region:
- set {_region:} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- if {@explodeBlock} is true:
- if {gb::Explode::%{_region}%} is set:
- cancel event
- # ============================================================================================================================================================================= #
- # ======================================================================= Blokada dla nowych czlonkow: ======================================================================== #
- # ============================================================================================================================================================================= #
- on place:
- if {gb::gNamePlayer::%player%} is set:
- if event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- if {gb::Name::%{_region}%} is {gb::gNamePlayer::%player%}:
- if {gb::gRank::%player%} is "rekrut":
- cancel event
- on break:
- if {gb::gNamePlayer::%player%} is set:
- if event-block is in any region:
- set {_region} to Region.getAt{location of event-block};
- if {gb::Name::%{_region}%} is set:
- if {gb::Name::%{_region}%} is {gb::gNamePlayer::%player%}:
- if {gb::gRank::%player%} is "rekrut":
- cancel event
- on rightclick:
- if clicked block is chest or furnace or hopper or trapped chest or dispenser or dropper or brewing stand or lever:
- if {gb::gNamePlayer::%player%} is set:
- if clicked block is in any region:
- set {_region} to Region.getAt{location of clicked block};
- if {gb::Name::%{_region}%} is set:
- if {gb::Name::%{_region}%} is {gb::gNamePlayer::%player%}:
- if {gb::gRank::%player%} is "rekrut":
- cancel event
- # ============================================================================================================================================================================= #
- # ===================================================================== Koniec skryptu. ======================================================================================= #
- # ============================================================================================================================================================================= #
- # ============================================ #
- # ============ Code by (c) GrimoN =========== #
- # =========== All Rights Reserved ============ #
- # ============================================ #
- # ================= Kontak: ================== #
- # ================ Skript.pl ================= #
- # ============================================ #
Advertisement
Add Comment
Please, Sign In to add comment