options: Sciezka-Config: AxGuildCore/AxPanel/Config.yml Sciezka-Sloty: AxGuildCore/AxPanel/Slots.yml on load: if yaml value "Config" from file "{@Sciezka-Config}" is not set: download from "https://pastebin.com/raw/3gYELmyF" to "{@Sciezka-Config}" function AxPanel_Gui_Size_Player(p: player, n: text): set {_p::*} to {_p} guild members set {_text::*} to yaml list "Gui.Glowa Gracza.Lore" from file "{@Sciezka-Config}" set {_text} to "%{_text::*}%" replace all "and " and ", " with "||" in {_text} open chest with (rounded up ({_p} guild members amount)/9) rows named "%colored {_n}%" to {_p} loop {_p::*}: set {_p2} to "%loop-value%" parsed as offlineplayer set {_ranga} to "&7Czlonek" if {_p2} is deputy: set {_ranga} to "&6Zastepca" if {_p2} is guild owner: set {_ranga} to "&4Wlasciciel" replace all "{RANK}" with "%{_ranga}%" in {_text} replace all "{POINTS}" with "%{_p2} points%" in {_text} replace all "{PLAYER}" with "%name of {_p2}%" in {_text} set {_p}'s current inventory's slot ((loop-index parsed as number)-1) to ("%loop-value%" parsed as offline player)'s skull named "&6%loop-value%" with lore "%colored {_text}%" function AxPanel_Gui_BackGround(p: player, n: number): set {_g::*} to "Item" and "Name" and "Lore" loop {_g::*}: set {_%loop-value%} to yaml value "Gui.Background.%loop-value%" from file "{@Sciezka-Config}" loop {_n} times: set {_p}'s current inventory's slot ((loop-number)-1) to ({_Item} parsed as item) named "%colored {_Name}%" with lore "%colored {_Lore}%" function AxPanel_Load_Items(p: player, l: text, s: number, add: number): replace all " and " and ", " with " -||- " in {_l} set {_l::*} to {_l} split at " -||- " set {_t} to yaml value "Sloty.%{_p} guild tag%" from file "{@Sciezka-Sloty}" loop {_l::*}: set {_%loop-value%.item} to yaml value "Gui.%loop-value%.Item" from file "{@Sciezka-Config}" set {_%loop-value%.name} to yaml value "Gui.%loop-value%.Name" from file "{@Sciezka-Config}" set {_%loop-value%.lore} to yaml value "Gui.%loop-value%.Lore" from file "{@Sciezka-Config}" replace all "{ITEMS}" with "%yaml value ""Powieksz Sloty.Item"" from file ""{@Sciezka-Config}""%" in {_%loop-value%.lore} replace all "{SIZE}" with "%{_t}%" in {_%loop-value%.lore} set {_p}'s current inventory's slot {_s} to ({_%loop-value%.item} parsed as item) named "%colored {_%loop-value%.name}%" with lore "%colored {_%loop-value%.lore}%" add {_add} to {_s} command /Panel []: trigger: if player has guild: if player is guild owner: open chest with 3 rows named "&6Panel" to player set {_gl::*} to "Powieksz Teren" and "Powieksz Sloty", "Przedluz", "Dom", "Zarzadzanie Czlonkami", "Usuwanie Gildii" AxPanel_Gui_BackGround(player, 27) AxPanel_Load_Items(player, "%{_gl::*}%", 10, 1) set {_item} to yaml value "Gui.Statystyki.Item" from file "{@Sciezka-Config}" set {_name} to yaml value "Gui.Statystyki.Name" from file "{@Sciezka-Config}" set {_text} to "%yaml list ""Gui.Statystyki.Lore"" from file ""{@Sciezka-Config}""%" replace all "and " and ", " with "||" in {_text} replace all "{ONLINE-AMOUNT}" with "%player guild online members amount%" in {_text} replace all "{ONLINE-PLAYER}" with "%player guild online members%" in {_text} replace all "{PLAYER-AMOUNT}" with "%player guild members amount%" in {_text} replace all "{TOP}" with "%player guild top position%" in {_text} replace all "{BORN}" with "%player guild create time%" in {_text} replace all "{PLAYER-ALL}" with "%player guild members%" in {_text} replace all "{REAMING}" with "%player guild remaining date%" in {_text} replace all "{KILLS}" with "%player guild kills%" in {_text} replace all "{DEATH}" with "%player guild deaths%" in {_text} replace all "{KDR}" with "%player guild kdr%" in {_text} replace all "{POINTS}" with "%player guild points%" in {_text} replace all "{OWNER}" with "%player guild owner%" in {_text} replace all "{LIVES}" with "%player guild lives%" in {_text} replace all "{NAME}" with "%player guild name%" in {_text} replace all "{TAG}" with "%player guild tag%" in {_text} replace all "{TIME}" with "%now%" in {_text} if player guild deputies is set: replace all "{DEPUTY}" with "%player guild deputies%" in {_text} else: replace all "{DEPUTY}" with "Brak" in {_text} if guilds allied with guild player is set: replace all "{TEAM}" with "%guilds allied with guild player%" in {_text} else: replace all "{TEAM}" with "Brak" in {_text} set player's current inventory's slot 16 to ({_item} parsed as item) named "%colored {_name}%" with lore "%colored {_text}%" on inventory click: if inventory name of current inventory of player is "&6Panel": cancel event if clicked slot is 10 or 11 or 12 or 13 or 14 or 15: close player's inventory if clicked slot is 10: execute player command "/powieksz" if clicked slot is 11: open chest with 1 rows named "&6Powiekszenie Slotow Gildii" to player AxPanel_Gui_BackGround(player, 9) AxPanel_Load_Items(player, "Powiekszenie Slotow", 4, 0) if clicked slot is 12: execute player command "/przedluz" if clicked slot is 13: execute player command "/ustawdom" if clicked slot is 14: set {_gl::*} to "Wyrzucanie Graczy" and "Nadanie Zastepcy" open chest with 1 rows named "&6Wybierz czynnosc" to player AxPanel_Gui_BackGround(player, 9) AxPanel_Load_Items(player, "%{_gl::*}%", 3, 2) if clicked slot is 15: execute player command "/usun" if inventory name of current inventory of player is "&6Wybierz czynnosc": cancel event if clicked slot is 3 or 5: close player's inventory if clicked slot is 3: AxPanel_Gui_Size_Player(player, "&cWyrzucanie Gracza &a(Wybierz)") if clicked slot is 5: AxPanel_Gui_Size_Player(player, "&6Nadaj Zastepce &c(Wybierz)") stop if inventory name of current inventory of player contains "(Wybierz)": cancel event set {_p} to (uncolored name of player's current inventory's slot slot) parsed as offlineplayer if {_p} is set: if inventory name of current inventory of player is "&cWyrzucanie Gracza &a(Wybierz)": execute player command "/wyrzuc %{_p}%" if inventory name of current inventory of player is "&6Nadaj Zastepce &c(Wybierz)": execute player command "/zastepca %{_p}%" if inventory name of current inventory of player contains "&6Powiekszenie Slotow Gildii": cancel event if clicked slot is 4: set {_o} to yaml value "Sloty.%player guild tag%" from file "{@Sciezka-Sloty}" set {_n} to yaml value "Powieksz Sloty.Maksymalne" from file "{@Sciezka-Config}" if {_o} < {_n}: set {_i} to yaml value "Powieksz Sloty.Item" from file "{@Sciezka-Config}" set {_s} to yaml value "Powieksz Sloty.Zwiekszenie" from file "{@Sciezka-Config}" if player has ({_i} parsed as item): remove ({_i} parsed as item) from player if {_s}+{_o} <= {_n}: set yaml value "Sloty.%player guild tag%" from file "{@Sciezka-Sloty}" to {_o}+{_s} send "&6Powiekszyles!" else: set yaml value "Sloty.%player guild tag%" from file "{@Sciezka-Sloty}" to {_n} send "&6Powiekszyles! (MAX)" AxPanel_Load_Items(player, "Powiekszenie Slotow", 4, 0) else: send "&6Nie posiadasz itemow!" else: send "&6Posiadacie maksymalny poziom!" on guild member join: set {_o} to yaml value "Sloty.%player guild tag%" from file "{@Sciezka-Sloty}" if ((guild guild members amount)+1) > {_o}: cancel event send "&6Gildia nie posiada juz miejsc!" to player On guild delete: delete yaml value "Sloty.%guild guild tag%" from file "{@Sciezka-Sloty}" On guild create: set yaml value "Sloty.%guild guild tag%" from file "{@Sciezka-Sloty}" to yaml value "Powieksz Sloty.Poczatkowe" from file "{@Sciezka-Config}"