options: # NIE DOTYKAJ TEJ LINIJKI! addons: "TuSKe" and "skUtilities" and "SkQuery" and "ProtocolLib" and "json.sk" # EDYTUJESZ NA WŁASNĄ ODPOWIEDZIALNOŚĆ! # # MOŻESZ PRZYWRÓCIĆ DO STANU POCZĄTKOWEGO KOMENDĄ /ur update force-default # function uGetPath(t: integer = 1) :: string: set {_u} to "plugins/Skript/scripts/uReport/" if {_t} is 1: set {_ret} to "%{_u}%config.yml" else if {_t} is 2: set {_ret} to "%{_u}%messages.yml" else if {_t} is 5: set {_ret} to "%{_u}%logi.yml" else if {_t} is 4 or 3: set {_ret} to "%{_u}%reports.yml" return {_ret} function checkIfReport(t: text, id: integer) :: boolean: if {_t} is "active": if skutil yaml path "report%{_id}%" in file uGetPath(3) doesn't exist: return false set {_x} to skutil yaml value "report%{_id}%.aktywny" from file uGetPath(3) set {_x} to {_x} parsed as boolean return {_x} function defineMenuSize(t: text = "aktywne", p: text = " ", int: integer = 1) :: integer: set {_p} to {_p} parsed as player if {_t} is "aktywne": set {_size} to size of {reporty::aktywne::*} else if {_t} is "nieaktywne": set {_size} to size of {reporty::aktywne::*} else if {_t} is "myreports": set {_size} to size of {mojereporty::%{_p}%::*} if skutil yaml value "cfg.menu.automatycznie-dostosowujace-sie-menu" from file uGetPath() is true: if {_size} >= 34: return 5 else if {_size} >= 25: return 4 else if {_size} >= 16: return 3 else if {_size} >= 7: return 2 else if {_size} < 7: return 1 else: return {_int} function getCooldown(p: player, name: text) :: boolean: if {Cd::%{_name}%::%{_p}%} is set: if difference between {Cd::%{_name}%::%{_p}%} and now >= {Cooldown::%{_name}%}: return true return false return true function getCooldownBoolean(p: player, name: text) :: boolean: return getCooldown({_p}, {_name}) function getCooldownTime(p: player, name: text) :: timespan: set {_time} to {Cooldown::%{_name}%} remove (difference between now and {Cd::%{_name}%::%{_p}%}) from {_time} return {_time} function getCooldownText(p: player, name: text) :: text: set {_return} to "%getCooldownTime({_p}, {_name})%" set {_ang::*} to ("years" and "year", "months", "month", "days", "day", "hours" , "hour", "minutes" , "minute", "seconds", "second", "and") set {_pl::*} to ("lata" and "rok", "miesięcy", "miesiąc", "dni", "dzień", "godz", "godz", "min", "min", "sek", "sek", "i") loop {_ang::*}: replace all loop-value with {_pl::%loop-index%} in {_return} return {_return} function getCooldownDate(p: player, name: text) :: date: set {_t} to now add getCooldownTime({_p}, {_name}) to {_t} return {_t} function createCooldown(name: text, time: timespan=1 minute): set {Cooldown::%{_name}%} to {_time} function deleteCooldown(name: text): delete {Cooldown::%{_name}%} and {Cd::%{_name}%::*} function setCooldown(p: player, name: text, stat: boolean=true): if {_stat} is true: set {Cd::%{_name}%::%{_p}%} to now else: set {Cd::%{_name}%::%{_p}%} to now remove {Cooldown::%{_name}%} from {Cd::%{_name}%::%{_p}%} function findYML(t: text, f: text) :: text: set {_t} to skutil yaml value "%{_t}%" from file "%{_f}%" return colored {_t} function msg(g: text, o: text = " ") :: text: set {_t} to skutil yaml value "%{_g}%" from file uGetPath(2) if {_t} is not "tresc-zgloszenia": set {_tte::*} to {_o} split at "," set {_ayo} to 1 loop {_tte::*}: set {_arg::%{_ayo}%} to loop-value add 1 to {_ayo} set {_test::*} to {_t} split at "" loop {_test::*}: if loop-value is "{": add 1 to {_yy} set {_times} to 1 loop {_yy} times: if "%{_t}%" contains "{TAG}": replace all "{TAG}" with findYML("ogolne.tag", uGetPath()) in {_t} if "%{_t}%" contains "{ERROR}": replace all "{ERROR}" with findYML("cfg.inne.error", uGetPath()) in {_t} if "%{_t}%" contains "{_ID}": if {_set} is not set: replace all "{_ID}" with "%{_arg::%{_times}%}%" in {_t} set {_set} to true if skutil yaml value "cfg.inne.uzywaj-polskich-znakow" from file uGetPath() is true: replace all "\u0105" with "ą" in {_t} replace all "\u0107" with "ć" in {_t} replace all "\u0119" with "ę" in {_t} replace all "\u015b" with "ś" in {_t} replace all "\xf3" with "ó" in {_t} replace all "\u0144" with "ń" in {_t} replace all "\u0142" with "ł" in {_t} replace all "\u017c" with "ż" in {_t} replace all "\u017a" with "ź" in {_t} else: replace all "ą" with "a" in {_t} replace all "ć" with "c" in {_t} replace all "ę" with "e" in {_t} replace all "ś" with "s" in {_t} replace all "ó" with "o" in {_t} replace all "ń" with "n" in {_t} replace all "ł" with "l" in {_t} replace all "ż" with "z" in {_t} replace all "ź" with "z" in {_t} delete {_set} add 1 to {_times} else: if "%{_t}%" contains "{TAG}": replace all "{TAG}" with findYML("ogolne.tag", uGetPath()) in {_t} if "%{_t}%" contains "{ERROR}": replace all "{ERROR}" with findYML("ogolne.tag", uGetPath()) in {_t} if "%{_t}%" contains "{_ID}": replace all "{_ID}" with "%{_o}%" in {_t} replace all "" with "" in {_t} return colored {_t} function openPlayerMenu(t: text, i: integer, p: player, o: text = " "): wait 1 tick open virtual chest inventory with size {_i} named "%{_t}%" to {_p} wait 1 tick set {_tmp} to 0 if {_o} is not "-c" or "-clear": loop 9*{_i} times: format gui slot {_tmp} of {_p} with black stained glass pane named " " to do nothing add 1 to {_tmp} function openReportMenu(t: text, id: integer, p: player, z: text = " ", tresc: text = " "): if {_t} is "sel-rep-type": set {_z} to {_z} parsed as player openPlayerMenu("%skutil yaml value ""inv.inne.zgloszenie1"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 format gui slot 11 of {_p} with red stained glass pane named "%skutil yaml value ""inv.inne.ibug"" from file uGetPath(2)%" to close then run function uReportAction("set-rep-type", "bug", {_id}, {_p}, "%{_z}%", "%{_tresc}%") format gui slot 13 of {_p} with orange stained glass pane named "%skutil yaml value ""inv.inne.igracz"" from file uGetPath(2)%" to close then run function uReportAction("set-rep-type", "gracz", {_id}, {_p}, "%{_z}%", "%{_tresc}%") format gui slot 15 of {_p} with yellow stained glass pane named "%skutil yaml value ""inv.inne.iinne"" from file uGetPath(2)%" to close then run function uReportAction("set-rep-type", "inne", {_id}, {_p}, "%{_z}%", "%{_tresc}%") if skutil yaml value "cfg.reports.przycisk-anulowania" from file uGetPath() is true: format gui slot {_last} of {_p} with barrier named "%skutil yaml value ""inv.inne.anuluj"" from file uGetPath(2)%" to close else if {_t} is "overview": wait 1 tick openPlayerMenu("%skutil yaml value ""inv.wazne.przegladasz"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 set {_typ} to skutil yaml value "report%{_id}%.typ" from file uGetPath(3) set {_sta} to skutil yaml value "report%{_id}%.status" from file uGetPath(3) set {_zgl} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) if {_typ} is not "bug": set {_z} to skutil yaml value "report%{_id}%.zgloszony" from file uGetPath(3) set {_data} to skutil yaml value "report%{_id}%.data" from file uGetPath(3) set {_tresc} to skutil yaml value "report%{_id}%.tresc" from file uGetPath(3) if {_typ} is "bug": set {_item} to red stained glass pane else if {_typ} is "gracz": set {_item} to orange stained glass pane else if {_typ} is "inne": set {_item} to yellow stained glass pane else: set {_item} to blue stained glass pane if {_typ} is "bug": set {_typ} to "%skutil yaml value ""inv.inne.ibug"" from file uGetPath(2)%" else if {_typ} is "gracz": set {_typ} to "%skutil yaml value ""inv.inne.igracz"" from file uGetPath(2)%" else if {_typ} is "inne": set {_typ} to "%skutil yaml value ""inv.inne.iinne"" from file uGetPath(2)%" else if {_typ} is "anulowany": set {_typ} to "%skutil yaml value ""inv.manage.anulowany"" from file uGetPath(2)%" else: set {_typ} to "%skutil yaml value ""inv.inne.brak"" from file uGetPath(2)%" if {_sta} is "Ukończony": set {_sta} to skutil yaml value "inv.manage.ukonczony" from file uGetPath(2) if {_sta} is "W trakcie przeglądu": set {_sta} to skutil yaml value "inv.manage.w-trakcie" from file uGetPath(2) if {_sta} is "Zamknięte": set {_sta} to skutil yaml value "inv.manage.zamkniete" from file uGetPath(2) loop ("oczekuje" and "anulowany" and "brak" and "otwarte"): if {_sta} is loop-value: set {_sta} to skutil yaml value "inv.manage.%loop-value%" from file uGetPath(2) set {_sta} to colored {_sta} set {_zgl} to {_zgl} parsed as player set {_z} to {_z} parsed as player set {_znak1} to "&c" set {_znak2} to "&c" set {_znak3} to "&c" if skutil yaml value "cfg.inne.uzywaj-kolorow-online" from file uGetPath() is true: if {_zgl} is online: set {_znak1} to "&a" if {_z} is online: set {_znak2} to "&a" if {_zamy} is online: set {_znak3} to "&a" set line 2 of lore of {_item} to "%skutil yaml value ""inv.wazne.status"" from file uGetPath(2)% %{_sta}%" set line 3 of lore of {_item} to "%skutil yaml value ""inv.wazne.typ"" from file uGetPath(2)% %{_typ}%" set line 4 of lore of {_item} to "%skutil yaml value ""inv.wazne.zglaszajacy2"" from file uGetPath(2)% %{_znak1}%%{_zgl}%" if {_typ} is not "&c&lBug": set line 5 of lore of {_item} to "%skutil yaml value ""inv.wazne.zgloszony2"" from file uGetPath(2)% %{_znak2}%%{_z}%" else: set line 5 of lore of {_item} to "%skutil yaml value ""inv.wazne.zgloszony2"" from file uGetPath(2)% Brak" set line 6 of lore of {_item} to "%skutil yaml value ""inv.wazne.data"" from file uGetPath(2)% &c%{_data}%" set line 7 of lore of {_item} to "%skutil yaml value ""inv.wazne.tresc"" from file uGetPath(2)% &c%{_tresc}%" format gui slot 12 of {_p} with {_item} named "%skutil yaml value ""inv.wazne.informacje-dot"" from file uGetPath(2)% %{_id}%" to do nothing format gui slot 14 of {_p} with anvil named "%skutil yaml value ""inv.wazne.zarzadzaj"" from file uGetPath(2)% %{_id}%" to run function uReportAction("manage", " ", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.odswiez"" from file uGetPath(2)%" to close then run function openReportMenu("overview", {_id}, {_p}) else if {_t} is "zmien-status": if checkIfReport("active", {_id}) is true: openPlayerMenu("%skutil yaml value ""inv.manage.zmien-stat"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 format gui slot 11 of {_p} with light green stained glass pane named "%skutil yaml value ""inv.manage.ukonczony"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.ukonczony-opis"" from file uGetPath(2)%" to close then run function uReportAction("zmien-status", "Ukończony", {_id}, {_p}) format gui slot 13 of {_p} with white stained glass pane named "%skutil yaml value ""inv.manage.w-trakcie"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.w-trakcie-opis"" from file uGetPath(2)%" to close then run function uReportAction("zmien-status", "W trakcie przeglądu", {_id}, {_p}) format gui slot 15 of {_p} with gray stained glass pane named "%skutil yaml value ""inv.manage.oczekuje"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.oczekuje-opis"" from file uGetPath(2)%" to close then run function uReportAction("zmien-status", "Oczekuje", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function uReportAction("manage", " ", {_id}, {_p}) else: send msg("blad.zgloszenie-nieaktywne", "%{_id}%") to {_p} else if {_t} is "zmien-status-gracz": if checkIfReport("active", {_id}) is true: openPlayerMenu("%skutil yaml value ""inv.manage.zmien-stat"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 format gui slot 13 of {_p} with red stained glass pane named "%skutil yaml value ""inv.manage.anulowany"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.anulowany-opis"" from file uGetPath(2)%" to close then run function uReportAction("zmien-status-gracz", "Anulowany", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function uReportAction("zarzadzaj-reportem", " ", {_id}, {_p}) else: send msg("blad.zgloszenie-nieaktywne", "%{_id}%") to {_p} else if {_t} is "teleportacja": if checkIfReport("active", {_id}) is true: openPlayerMenu("%skutil yaml value ""inv.manage.teleportuj-do"" from file uGetPath(2)% (%{_id}%)", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 set {_zgl} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) set {_z} to skutil yaml value "report%{_id}%.zgloszony" from file uGetPath(3) set {_zgl} to {_zgl} parsed as player set {_z} to {_z} parsed as player if {_zgl} is online: set {_o-zgl} to "&aTak" set {_p-zgl} to light green glass pane else: set {_o-zgl} to "&cNie" set {_p-zgl} to red glass pane if {_z} is online: set {_o-z} to "&aTak" set {_p-z} to light green glass pane else: set {_o-z} to "&cNie" set {_p-z} to red glass pane format gui slot 11 of {_p} with {_p-zgl} named "%skutil yaml value ""inv.manage.zglaszajacy"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.online"" from file uGetPath(2)% %{_o-zgl}%" to close then run function uReportAction("teleportuj", "zglaszajacy", {_id}, {_p}) format gui slot 15 of {_p} with {_p-z} named "%skutil yaml value ""inv.manage.zgloszony"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.online"" from file uGetPath(2)% %{_o-z}%" to close then run function uReportAction("teleportuj", "zgloszony", {_id}, {_p}) format gui slot 13 of {_p} with yellow glass pane named "%skutil yaml value ""inv.manage.lok-rep"" from file uGetPath(2)%" to close then run function uReportAction("teleportuj", "tp-lok-rep", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function uReportAction("manage", " ", {_id}, {_p}) else: send msg("blad.zgloszenie-nieaktywne", "%{_id}%") to {_p} else if {_t} is "potwierdz-zamknij": openPlayerMenu("%skutil yaml value ""inv.manage.chcesz-zamknac"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks format gui slot 12 of {_p} with light green glass pane named "%skutil yaml value ""inv.wazne.tak"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.zamknij-konsek"" from file uGetPath(2)%" to close then run function uReportAction("close", " ", {_id}, {_p}) format gui slot 14 of {_p} with red glass pane named "%skutil yaml value ""inv.wazne.nie"" from file uGetPath(2)%" to run function uReportAction("manage", " ", {_id}, {_p}) else if {_t} is "potwierdz-usun": openPlayerMenu("%skutil yaml value ""inv.manage.chcesz-usunac"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks format gui slot 12 of {_p} with light green glass pane named "%skutil yaml value ""inv.wazne.tak"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.usun-konsek"" from file uGetPath(2)%" to close then run function uReportAction("delete", " ", {_id}, {_p}) format gui slot 14 of {_p} with red glass pane named "%skutil yaml value ""inv.wazne.nie"" from file uGetPath(2)%" to run function uReportAction("manage", " ", {_id}, {_p}) else if {_t} is "potwierdz-usun-gracz": openPlayerMenu("%skutil yaml value ""inv.manage.chcesz-usunac"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks format gui slot 12 of {_p} with light green glass pane named "%skutil yaml value ""inv.wazne.tak"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.usun-konsek-gracz"" from file uGetPath(2)%" to close then run function uReportAction("delete-gracz", " ", {_id}, {_p}) format gui slot 14 of {_p} with red glass pane named "%skutil yaml value ""inv.wazne.nie"" from file uGetPath(2)%" to run function uReportAction("zarzadzaj-reportem", " ", {_id}, {_p}) function uReportAction(t: text, tt: text, id: integer, p: player, z: text = " ", tresc: text = " "): if {_t} is "set-rep-type": if {_tt} is not "11ff": set skutil yaml value "report%{_id}%.aktywny" from file uGetPath(4) to true set skutil yaml value "report%{_id}%.typ" from file uGetPath(4) to "%{_tt}%" set skutil yaml value "report%{_id}%.status" from file uGetPath(4) to "Oczekuje" set skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(4) to "%{_p}%" if {_tt} is "gracz": set skutil yaml value "report%{_id}%.zgloszony" from file uGetPath(4) to "%{_z}%" else: set skutil yaml value "report%{_id}%.zgloszony" from file uGetPath(4) to "Brak" set skutil yaml value "report%{_id}%.data" from file uGetPath(4) to "%now%" set {_loc} to location of {_p} set skutil yaml value "report%{_id}%.lokalizacja" from file uGetPath(4) to {_loc} if {_tt} is not "bug" or "inne": set skutil yaml value "report%{_id}%.tresc" from file uGetPath(4) to "%{_tresc}%" else: set {_fin} to "%{_z}% %{_tresc}%" replace all " brak" with "" in {_fin} set skutil yaml value "report%{_id}%.tresc" from file uGetPath(4) to "%{_fin}%" else: set skutil yaml value "report%{_id}%.aktywny" from file uGetPath(4) to true set skutil yaml value "report%{_id}%.typ" from file uGetPath(4) to "brak" set skutil yaml value "report%{_id}%.status" from file uGetPath(4) to "Oczekuje" set skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(4) to "%{_p}%" set skutil yaml value "report%{_id}%.zgloszony" from file uGetPath(4) to "Brak" set skutil yaml value "report%{_id}%.data" from file uGetPath(4) to "%now%" set {_loc} to location of {_p} set skutil yaml value "report%{_id}%.lokalizacja" from file uGetPath(4) to {_loc} set {_fin} to "%{_z}% %{_tresc}%" replace all "brak" with "" in {_fin} set skutil yaml value "report%{_id}%.tresc" from file uGetPath(4) to "%{_fin}%" set {report::%{_id}%::done} to true else if {_t} is "manage": wait 1 tick openPlayerMenu("%skutil yaml value ""inv.wazne.zarzadzasz"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 if skutil yaml value "cfg.reports.czy-mozna-otworzyc-anulowane-zgloszenie" from file uGetPath() is true: set {_t1} to "&aTak" else: set {_t1} to "&cNie" wait 1 tick if skutil yaml value "cfg.menu.nowy-wyglad" from file uGetPath() is false: format gui slot 10 of {_p} with red stained glass pane named "%skutil yaml value ""inv.manage.usun"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.usun-info"" from file uGetPath(2)%" to run function openReportMenu("potwierdz-usun", {_id}, {_p}) format gui slot 11 of {_p} with orange stained glass pane named "%skutil yaml value ""inv.manage.zamknij"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.zamknij-info"" from file uGetPath(2)%" to run function openReportMenu("potwierdz-zamknij", {_id}, {_p}) format gui slot 12 of {_p} with green stained glass pane named "%skutil yaml value ""inv.manage.otworz"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.otworz-info"" from file uGetPath(2)% %{_t1}%" to close then run function openReportMenu("otworz", {_id}, {_p}) format gui slot 14 of {_p} with light blue stained glass pane named "%skutil yaml value ""inv.manage.zmien-status"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.zmien-status-info"" from file uGetPath(2)%" to run function openReportMenu("zmien-status", {_id}, {_p}) format gui slot 16 of {_p} with light green stained glass pane named "%skutil yaml value ""inv.manage.teleportuj"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.teleportuj-info"" from file uGetPath(2)%" to run function openReportMenu("teleportacja", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function openReportMenu("overview", {_id}, {_p}) else: format gui slot 11 of {_p} with light blue stained glass pane named "%skutil yaml value ""inv.manage.zmien-status"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.zmien-status-info"" from file uGetPath(2)%" to run function openReportMenu("zmien-status", {_id}, {_p}) format gui slot 13 of {_p} with glowing clock named "%skutil yaml value ""inv.wazne.glowne-opcje"" from file uGetPath(2)%" to run function uReportAction("glowne-opcje", " ", {_id}, {_p}) format gui slot 15 of {_p} with light green stained glass pane named "%skutil yaml value ""inv.manage.teleportuj"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.teleportuj-info"" from file uGetPath(2)%" to run function openReportMenu("teleportacja", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function openReportMenu("overview", {_id}, {_p}) else if {_t} is "glowne-opcje": wait 1 tick openPlayerMenu("%skutil yaml value ""inv.wazne.zarzadzasz"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 if skutil yaml value "cfg.reports.czy-mozna-otworzyc-anulowane-zgloszenie" from file uGetPath() is true: set {_t1} to "&aTak" else: set {_t1} to "&cNie" format gui slot 11 of {_p} with red stained glass pane named "%skutil yaml value ""inv.manage.usun"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.usun-info"" from file uGetPath(2)%" to run function openReportMenu("potwierdz-usun", {_id}, {_p}) format gui slot 13 of {_p} with orange stained glass pane named "%skutil yaml value ""inv.manage.zamknij"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.zamknij-info"" from file uGetPath(2)%" to run function openReportMenu("potwierdz-zamknij", {_id}, {_p}) format gui slot 15 of {_p} with light green stained glass pane named "%skutil yaml value ""inv.manage.otworz"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.otworz-info"" from file uGetPath(2)% %{_t1}%" to close then run function uReportAction("otworz", " ", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function uReportAction("manage", " ", {_id}, {_p}) else if {_t} is "zarzadzaj-reportem": openPlayerMenu("%skutil yaml value ""inv.wazne.zarzadzasz"" from file uGetPath(2)% %{_id}%", 3, {_p}) wait 3 ticks set {_last} to 9*3-1 format gui slot 12 of {_p} with red stained glass pane named "%skutil yaml value ""inv.manage.usun"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.usun-info-gracz"" from file uGetPath(2)%" to run function openReportMenu("potwierdz-usun-gracz", {_id}, {_p}) format gui slot 14 of {_p} with light blue stained glass pane named "%skutil yaml value ""inv.manage.zmien-status"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.manage.zmien-status-info"" from file uGetPath(2)%" to run function openReportMenu("zmien-status-gracz", {_id}, {_p}) format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.inne.powrot"" from file uGetPath(2)%" to run function openMyReports({_p}) else if {_t} is "zmien-status-gracz": set skutil yaml value "report%{_id}%.aktywny" from file uGetPath(4) to false set skutil yaml value "report%{_id}%.status" from file uGetPath(4) to "Anulowany" remove {_id} from {reporty::aktywne::*} remove {_id} from {reporty::nieaktywne::*} add {_id} to {reporty::nieaktywne::*} send msg("inv.inne.zmieniono-status", "&c&lAnulowany") to {_p} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> zmienił status zgłoszenia %{_id}% na anulowany" to skutil yaml list "logi" from file uGetPath(5) else if {_t} is "delete-gracz": set {_gracz} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) remove {_id} from {mojereporty::%{_gracz}%::*} send msg("chat.usunales-zgloszenie", "%{_id}%") to {_p} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> usunął zgłoszenie %{_id}% z listy jego zgłoszeń" to skutil yaml list "logi" from file uGetPath(5) else if {_t} is "otworz": if checkIfReport("active", {_id}) is false: set {_stat} to skutil yaml value "report%{_id}%.status" from file uGetPath(3) if {_stat} is "Anulowany": if skutil yaml value "cfg.reports.czy-mozna-otworzyc-anulowane-zgloszenie" from file uGetPath() is true: set {_gracz} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) set {_gracz} to {_gracz} parsed as player remove {_id} from {reporty::nieaktywne::*} add {_id} to {reporty::aktywne::*} if skutil yaml value "cfg.reports.dodac-zgloszenie-do-zgloszen-gracza-po-otwarciu" from file uGetPath() is true: if {mojereporty::%{_gracz}%::*} contains {_id}: add 1 to {_} else: remove {_id} from {mojereporty::%{_gracz}%::*} add {_id} to {mojereporty::%{_gracz}%::*} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> otworzył anulowane zgłoszenie (%{_id}%)" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.nie-mozna-anul-zgl") to {_p} stop else: set {_gracz} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) set {_gracz} to {_gracz} parsed as player remove {_id} from {reporty::nieaktywne::*} remove {_id} from {reporty::aktywne::*} add {_id} to {reporty::aktywne::*} if skutil yaml value "cfg.reports.dodac-zgloszenie-do-zgloszen-gracza-po-otwarciu" from file uGetPath() is true: if {mojereporty::%{_gracz}%::*} contains {_id}: add 1 to {_} else: remove {_id} from {mojereporty::%{_gracz}%::*} add {_id} to {mojereporty::%{_gracz}%::*} set skutil yaml value "report%{_id}%.aktywny" from file uGetPath(3) to true set skutil yaml value "report%{_id}%.status" from file uGetPath(3) to "Otwarte" send msg("chat.otworzyles-zgloszenie", "%{_id}%") to {_p} send msg("chat.zgloszenie-zostalo-otworzone", "%{_id}%") to {_gracz} if skutil yaml path "report%{_id}%.zamykajacy" in file uGetPath(3) exists: delete skutil yaml value "report%{_id}%.zamykajacy" from file uGetPath(3) if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> otworzył zgłoszenie (%{_id}%)" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.zgloszenie-jest-aktywne", "%{_id}%") to {_p} else if {_t} is "zmien-status": if checkIfReport("active", {_id}) is true: set {_gracz} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) set {_gracz} to {_gracz} parsed as player if {_tt} is "Ukończony": set skutil yaml value "report%{_id}%.aktywny" from file uGetPath(4) to false remove {_id} from {reporty::aktywne::*} remove {_id} from {reporty::nieaktywne::*} add {_id} to {reporty::nieaktywne::*} set skutil yaml value "report%{_id}%.status" from file uGetPath(4) to "%{_tt}%" send msg("inv.inne.zmieniono-status", "%{_tt}%") to {_p} if {_gracz} is online: send msg("inv.inne.status-zostal-zmieniony", "%{_tt}%") to {_gracz} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> zmienił status zgłoszenia %{_id}% na %{_tt}%" to skutil yaml list "logi" from file uGetPath(5) else if {_t} is "teleportuj": if checkIfReport("active", {_id}) is true: if {_tt} is "zgloszony": if {_p} has permission "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.report-all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.teleportuj-zgloszony"" from file uGetPath()%": set {_z} to skutil yaml value "report%{_id}%.zgloszony" from file uGetPath(3) set {_z} to {_z} parsed as player if {_z} is online: if {_z} is not {_p}: teleport {_p} to {_z} send msg("inv.inne.tp") to {_p} else: send msg("blad.nie-tp-do-siebie") to {_p} else: send msg("blad.zgloszony-nie-online") to {_p} else: send msg("blad.brak-uprawnien") to {_p} if {_tt} is "zglaszajacy": if {_p} has permission "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.report-all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.teleportuj-zglaszajacy"" from file uGetPath()%": set {_zgl} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) set {_zgl} to {_zgl} parsed as player if {_zgl} is online: if {_zgl} is not {_p}: teleport {_p} to {_zgl} send msg("inv.inne.tp") to {_p} else: send msg("blad.nie-tp-do-siebie") to {_p} else: send msg("blad.zgloszony-nie-online") to {_p} else: send msg("blad.brak-uprawnien") to {_p} if {_tt} is "tp-lok-rep": if {_p} has permission "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.report-all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.teleportuj-lok-rep"" from file uGetPath()%": set {_tp} to skutil yaml value "report%{_id}%.lokalizacja" from file uGetPath(3) teleport {_p} to {_tp} send msg("inv.inne.tp") to {_p} else: send msg("blad.brak-uprawnien") to {_p} else: send msg("blad.zgloszenie-nieaktywne", "%{_id}%") to {_p} else if {_t} is "close": if checkIfReport("active", {_id}) is true: if {_p} has permission "ur.%skutil yaml value ""cfg.uprawnienia.close"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.report-all"" from file uGetPath()%": set skutil yaml value "report%{_id}%.aktywny" from file uGetPath(4) to false set skutil yaml value "report%{_id}%.status" from file uGetPath(4) to "Zamknięte" set skutil yaml value "report%{_id}%.zamykajacy" from file uGetPath(4) to "%{_p}%" remove {_id} from {reporty::nieaktywne::*} add {_id} to {reporty::nieaktywne::*} remove {_id} from {reporty::aktywne::*} send msg("chat.zamknales-zgloszenie", "%{_id}%") to {_p} send msg("chat.zgloszenie-teraz-nieaktywne", "%{_id}%") to {_p} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> zamknął zgłoszenie (%{_id}%)" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") to {_p} else: send msg("blad.zgloszenie-nieaktywne", "%{_id}%") to {_p} else if {_t} is "delete": if {_p} has permission "ur.%skutil yaml value ""cfg.uprawnienia.delete"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.report-all"" from file uGetPath()%": set {_gracz} to skutil yaml value "report%{_id}%.zglaszajacy" from file uGetPath(3) delete skutil yaml list "report%{_id}%" from file uGetPath(3) remove {_id} from {reporty::aktywne::*} remove {_id} from {reporty::nieaktywne::*} set {_gracz} to {_gracz} parsed as player send msg("chat.usunales-zgloszenie", "%{_id}%") to {_p} if {mojereporty::%{_gracz}%::*} contains {_id}: send msg("chat.twoje-zgl-zostalo-usuniete", "%{_id}%") to {_gracz} remove {_id} from {mojereporty::%{_gracz}%::*} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> usunął zgłoszenie (%{_id}%)" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") to {_p} function uReportReinstall(tt: text, p: player): if {_tt} is not "uninstall": if {uReport::command-reinstall::%{_p}%} is not set: set {uReport::command-reinstall::%{_p}%} to true send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &cZa chwilę rozpocznie się przywrócenie pliku %{_tt}% do wersji fabrycznej." to {_p} send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cMożesz anulować akcję komendą &6/ur cancel" to {_p} set {uReport::can-cancel::%{_p}%} to true wait 5 seconds if {uReport::can-cancel::%{_p}%} is set: if {_tt} is "config.yml": set {_url} to "https://code.skript.pl/gXksDmAl/raw" else if {_tt} is "messages.yml": set {_url} to "https://code.skript.pl/7agXT8Ee/raw" else if {_tt} is "uReport.sk": set {_url} to "https://code.skript.pl/4wDBpSv6/raw" else if {_tt} is "uMention.sk": set {_url} to "https://code.skript.pl/85kDSxao/raw" if {_tt} is "config.yml": set {_path} to uGetPath() skutil delete file {_path} else if {_tt} is "messages.yml": set {_path} to uGetPath(2) skutil delete file {_path} else if {_tt} is "uReport.sk": set {_path} to "plugins/Skript/scripts/%script%.sk" skutil delete file {_path} else if {_tt} is "uMention.sk": set {_path} to "plugins/Skript/scripts/uMention.sk" if skutil file {_path} exists: skutil delete file {_path} send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aUsunalem stary plik. (%{_tt}%)" to {_p} skutil download file from "%{_url}%" to file {_path} send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPobralem plik. (%{_tt}%)" to {_p} if skutil file {_path} exists: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aWszystko zostalo pomyslnie zaladowane." to {_p} if {_tt} is not "uReport.sk" or "uMention.sk": set {_ver::*} to contents from url {_url} set skutil yaml value "ogolne.wersja" from file {_path} to {_ver::1} if {_tt} is "uReport.sk" or "uMention.sk": execute console command "sk reload %{_tt}%" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cWystapil blad! Plik nie istnieje! (%{_tt}%)" to {_p} delete {uReport::can-cancel::%{_p}%} delete {uReport::command-reinstall::%{_p}%} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%{_p}% -> zainstalował/przeinstalował plik %{_tt}%" to skutil yaml list "logi" from file uGetPath(5) else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cAktualnie jest już przeprowadzana akcja!" to {_p} else if {uReport::command-reinstall::%{_p}%} is not set: set {uReport::command-reinstall::%{_p}%} to true send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &c&lZa chwilę rozpocznie się całkowite odinstalowanie uReport." to {_p} send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cMożesz anulować akcję komendą &6/ur cancel" to {_p} set {uReport::can-cancel::%{_p}%} to true if {uReport::can-cancel::%{_p}%} is set: wait 10 seconds delete {HR::*} delete {uReport::*} skutil delete file "plugins/Skript/scripts/%script%.sk" skutil delete file uGetPath() skutil delete file uGetPath(2) skutil delete file uGetPath(3) skutil delete file uGetPath(5) if skutil file "plugins/Skript/scripts/uMention.sk" exists: skutil delete file "plugins/Skript/scripts/uMention.sk" execute console command "sk reload all" delete {uReport::can-cancel::%{_p}%} delete {uReport::command-reinstall::%{_p}%} set {_url} to "https://skript.pl/temat/34938-ureport-ulepszony-system-zgłoszeń/" send "&7[&cuR&7] &c&luReport zostało odinstalowane." to all ops send "&7[&cuR&7] &cJeżeli odinstalowałeś uReport z którejś przyczyny podanej niżej:" to {_p} send "&7- &cSkrypt posiadał (liczne) błędy," to {_p} send "&7- &cSkrypt powodował błędy na serwerze," to {_p} send "&7- &cSkrypt powodował lagi," to {_p} send "&7- &cSkrypt był bezużyteczny," to {_p} send "&7- &cSkrypt nie spełniał moich wymagań," to {_p} send "&7- &c&oInne." to {_p} json("%{_p}%", "&7[&cuR&7] &6Poinformuj o tym autora, aby poprawił przyczynę odinstalowania.||ttp:&aPoinformuj!||url:%{_url}%") else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cAktualnie jest już przeprowadzana akcja!" to {_p} function openuReportList(t: text, p: player): if {_t} is set: set {_int} to defineMenuSize({_t}, " ", 5) set {_size} to size of {reporty::%{_t}%::*} if {_size} > 0: if {_t} is "nieaktywne": set {_ss} to "&cNieaktywne" if {_t} is "aktywne": set {_ss} to "&aAktywne" openPlayerMenu("%skutil yaml value ""inv.list.lista"" from file uGetPath(2)% %{_ss}%", {_int}, {_p}) wait 3 ticks set {_last} to 9*{_int}-1 set {_times} to 0 loop {reporty::%{_t}%::*}: if {_times} < 44: set {_id} to loop-value if skutil yaml path "report%loop-value%.aktywny" in file uGetPath(3) exists: set {_typ} to skutil yaml value "report%loop-value%.typ" from file uGetPath(3) set {_item} to skutil yaml value "cfg.bloki.%{_typ}%" from file uGetPath() set {_item} to {_item} parsed as itemtype set {_sta} to skutil yaml value "report%loop-value%.status" from file uGetPath(3) set {_zgl} to skutil yaml value "report%loop-value%.zglaszajacy" from file uGetPath(3) if {_typ} is not "bug": set {_z} to skutil yaml value "report%loop-value%.zgloszony" from file uGetPath(3) set {_data} to skutil yaml value "report%loop-value%.data" from file uGetPath(3) set {_tresc} to skutil yaml value "report%loop-value%.tresc" from file uGetPath(3) if skutil yaml path "report%loop-value%.zamykajacy" in file uGetPath(3) doesn't exist: add 1 to {_} else: set {_zamy} to skutil yaml value "report%loop-value%.zamykajacy" from file uGetPath(3) if {_typ} is "bug": set {_typ} to "%skutil yaml value ""inv.inne.ibug"" from file uGetPath(2)%" else if {_typ} is "gracz": set {_typ} to "%skutil yaml value ""inv.inne.igracz"" from file uGetPath(2)%" else if {_typ} is "inne": set {_typ} to "%skutil yaml value ""inv.inne.iinne"" from file uGetPath(2)%" else if {_typ} is "anulowany": set {_typ} to "%skutil yaml value ""inv.manage.anulowany"" from file uGetPath(2)%" else: set {_typ} to "%skutil yaml value ""inv.inne.brak"" from file uGetPath(2)%" if {_sta} is "Ukończony": set {_sta} to skutil yaml value "inv.manage.ukonczony" from file uGetPath(2) else if {_sta} is "W trakcie przeglądu": set {_sta} to skutil yaml value "inv.manage.w-trakcie" from file uGetPath(2) else if {_sta} is "Zamknięte": set {_sta} to skutil yaml value "inv.manage.zamkniete" from file uGetPath(2) loop ("oczekuje" and "anulowany" and "otwarte" and "brak"): if {_sta} is loop-value-2: set {_sta} to skutil yaml value "inv.manage.%loop-value-2%" from file uGetPath(2) set {_sta} to colored {_sta} set {_zgl} to {_zgl} parsed as player set {_z} to {_z} parsed as player set {_zamy} to {_zamy} parsed as player set {_znak1} to "&c" set {_znak2} to "&c" set {_znak3} to "&c" if skutil yaml value "cfg.inne.uzywaj-kolorow-online" from file uGetPath() is true: if {_zgl} is online: set {_znak1} to "&a" if {_z} is online: set {_znak2} to "&a" if {_zamy} is online: set {_znak3} to "&a" set {_next} to 2 set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.status"" from file uGetPath(2)% %{_sta}%" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.typ"" from file uGetPath(2)% %{_typ}%" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zglaszajacy2"" from file uGetPath(2)% %{_znak1}%%{_zgl}%" add 1 to {_next} if {_typ} is not "&c&lBug": set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zgloszony2"" from file uGetPath(2)% %{_znak2}%%{_z}%" else: set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zgloszony2"" from file uGetPath(2)% Brak" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.data"" from file uGetPath(2)% &c%{_data}%" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.tresc"" from file uGetPath(2)% &c%{_tresc}%" if {_zamy} is set: add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zamykajacy"" from file uGetPath(2)% %{_znak3}%%{_zamy}%" add 2 to {_next} else: add 2 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.list.kliknij-przejrzec"" from file uGetPath(2)%" format gui slot {_times} of {_p} with {_item} named "%skutil yaml value ""inv.inne.zgloszenie1"" from file uGetPath(2)% %loop-value%" to run function openReportMenu("overview", {_id}, {_p}) add 1 to {_times} if {_times} > 0: if {_t} is "nieaktywne": set {_er} to "aktywne" set {_er3} to "&aAktywne" else: set {_er} to "nieaktywne" set {_er3} to "&cNieaktywne" format gui slot {_last} of {_p} with glowing arrow named "%skutil yaml value ""inv.list.zmien-wybor"" from file uGetPath(2)%" with lore "%skutil yaml value ""inv.list.zmien-wybor-info"" from file uGetPath(2)% %{_er3}%" to close then run function openuReportList("%{_er}%", {_p}) else: close {_p}'s inventory wait 1 tick set {_gracz} to skutil yaml value "report%loop-value%.zglaszajacy" from file uGetPath(3) delete skutil yaml list "report%loop-value%" from file uGetPath(3) remove loop-value from {reporty::aktywne::*} remove loop-value from {reporty::nieaktywne::*} remove loop-value from {mojereporty::%{_gracz}%::*} set {_s1} to size of {reporty::aktywne::*} set {_s2} to size of {reporty::nieaktywne::*} set {_s3} to size of {mojereporty::%{_gracz}%::*} if {_s1} < 1: delete {reporty::aktywne::*} if {_s2} < 1: delete {reporty::nieaktywne::*} if {_s3} < 1: delete {mojereporty::%{_gracz}%::*} else: send msg("blad.brak-aktywnych") to {_p} stop function openMyReports(p: player): set {_int} to defineMenuSize("myreports", "%{_p}%", 3) set {_size} to size of {mojereporty::%{_p}%::*} if {_size} > 0: wait 1 tick openPlayerMenu("%skutil yaml value ""inv.list.moje-reporty"" from file uGetPath(2)%", {_int}, {_p}) wait 3 ticks set {_last} to 9*{_int}-1 set {_times} to 0 loop {mojereporty::%{_p}%::*}: if {_times} < 26: if skutil yaml path "report%loop-value%.aktywny" in file uGetPath(3) exists: set {_typ} to skutil yaml value "report%loop-value%.typ" from file uGetPath(3) set {_item} to skutil yaml value "cfg.bloki.%{_typ}%" from file uGetPath() set {_item} to {_item} parsed as itemtype set {_sta} to skutil yaml value "report%loop-value%.status" from file uGetPath(3) set {_zgl} to skutil yaml value "report%loop-value%.zglaszajacy" from file uGetPath(3) if {_typ} is not "bug": set {_z} to skutil yaml value "report%loop-value%.zgloszony" from file uGetPath(3) set {_data} to skutil yaml value "report%loop-value%.data" from file uGetPath(3) set {_tresc} to skutil yaml value "report%loop-value%.tresc" from file uGetPath(3) if skutil yaml path "report%loop-value%.zamykajacy" in file uGetPath(3) doesn't exist: add 1 to {_} else: set {_zamy} to skutil yaml value "report%loop-value%.zamykajacy" from file uGetPath(3) if {_typ} is "bug": set {_typ} to "%skutil yaml value ""inv.inne.ibug"" from file uGetPath(2)%" else if {_typ} is "gracz": set {_typ} to "%skutil yaml value ""inv.inne.igracz"" from file uGetPath(2)%" else if {_typ} is "inne": set {_typ} to "%skutil yaml value ""inv.inne.iinne"" from file uGetPath(2)%" else if {_typ} is "anulowany": set {_typ} to "%skutil yaml value ""inv.manage.anulowany"" from file uGetPath(2)%" else: set {_typ} to "%skutil yaml value ""inv.inne.brak"" from file uGetPath(2)%" if {_sta} is "Ukończony": set {_sta} to skutil yaml value "inv.manage.ukonczony" from file uGetPath(2) else if {_sta} is "W trakcie przeglądu": set {_sta} to skutil yaml value "inv.manage.w-trakcie" from file uGetPath(2) else if {_sta} is "Oczekuje": set {_sta} to skutil yaml value "inv.manage.oczekuje" from file uGetPath(2) else if {_sta} is "Zamknięte": set {_sta} to skutil yaml value "inv.manage.zamkniete" from file uGetPath(2) else if {_sta} is "Otwarte": set {_sta} to skutil yaml value "inv.manage.otwarte" from file uGetPath(2) else if {_sta} is "Anulowany": set {_sta} to skutil yaml value "inv.manage.anulowany" from file uGetPath(2) else if {_sta} is "brak": set {_sta} to skutil yaml value "inv.manage.brak" from file uGetPath(2) set {_sta} to colored {_sta} set {_zgl} to {_zgl} parsed as player set {_z} to {_z} parsed as player set {_zamy} to {_zamy} parsed as player if skutil yaml value "cfg.inne.uzywaj-kolorow-online" from file uGetPath() is true: if {_zgl} is online: set {_znak1} to "&a" else: set {_znak1} to "&c" if {_z} is online: set {_znak2} to "&a" else: set {_znak2} to "&c" if {_zamy} is online: set {_znak3} to "&a" else: set {_znak3} to "&c" else: set {_znak1} to "&c" set {_znak2} to "&c" set {_znak3} to "&c" set {_next} to 2 set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.status"" from file uGetPath(2)% %{_sta}%" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.typ"" from file uGetPath(2)% %{_typ}%" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zglaszajacy2"" from file uGetPath(2)% %{_znak1}%%{_zgl}%" add 1 to {_next} if {_typ} is not "&c&lBug": set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zgloszony2"" from file uGetPath(2)% %{_znak2}%%{_z}%" add 1 to {_next} else: set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zgloszony2"" from file uGetPath(2)% Brak" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.data"" from file uGetPath(2)% &c%{_data}%" add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.tresc"" from file uGetPath(2)% &c%{_tresc}%" if {_zamy} is set: add 1 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.wazne.zamykajacy"" from file uGetPath(2)% %{_znak3}%%{_zamy}%" add 2 to {_next} else: add 2 to {_next} set line {_next} of lore of {_item} to "%skutil yaml value ""inv.list.kliknij-przejrzec"" from file uGetPath(2)%" set {_id} to loop-value format gui slot {_times} of {_p} with {_item} named "%skutil yaml value ""inv.inne.zgloszenie1"" from file uGetPath(2)% %loop-value%" to run function uReportAction("zarzadzaj-reportem", " ", loop-value, {_p}) add 1 to {_times} format gui slot {_last} of {_p} with ghast tear named "%skutil yaml value ""inv.list.odswiez-mr"" from file uGetPath(2)%" to close then run function openMyReports({_p}) if {_times} <= 0: close {_p}'s inventory wait 1 tick delete skutil yaml list "report%loop-value%" from file uGetPath(3) remove loop-value from {reporty::aktywne::*} remove loop-value from {reporty::nieaktywne::*} remove loop-value from {mojereporty::%{_p}%::*} set {_s1} to size of {reporty::aktywne::*} set {_s2} to size of {reporty::nieaktywne::*} set {_s3} to size of {mojereporty::%{_gracz}%::*} if {_s1} < 1: delete {reporty::aktywne::*} if {_s2} < 1: delete {reporty::nieaktywne::*} if {_s3} < 1: delete {mojereporty::%{_gracz}%::*} else: send msg("blad.nie-posiadasz-reportow") to {_p} function checkuReport(t: text, p: text = " "): if {_t} is "addons": if skutil yaml value "cfg.inne.sprawdzaj-wymagane-dodatki" from file uGetPath() is true: wait 1.5 seconds delete {uReport::not-installed-addons::*} loop {@addons}: if loop-value is not "json.sk" or "SkQuery": if skutil file "plugins/%loop-value%/config.yml" exists: add 1 to {_p} else: add loop-value to {uReport::not-installed-addons::*} add 1 to {uReport::how-many-fail-addons} else if loop-value is "SkQuery": set {_q} to skutil version of "SkQuery" if {_q} is not set: add loop-value to {uReport::not-installed-addons::*} add 1 to {uReport::how-many-fail-addons} else if loop-value is "json.sk": if skutil file "plugins/Skript/scripts/json.sk" exists: add 1 to {_p} else: skutil download file from "https://code.skript.pl/Y8RqBIpP/raw" to file "plugins/Skript/scripts/json.sk" loop 2 times: send " " to console send "&7[&c!&7] &aPobralem wymagany dodatek json.sk!" to console loop 2 times: send " " to console execute console command "sk reload json" else: if skutil file "plugins/Skript/scripts/%loop-value%" exists: add 1 to {_p} else: add loop-value to {uReport::not-installed-addons::*} add 1 to {uReport::how-many-fail-addons} if {uReport::how-many-fail-addons} > 0: loop all players: if loop-player is op: send " " to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c*** UWAGA! ***" to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c*! Nie posiadasz wszystkich wymaganych dodatków !*" to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aUPEWNIJ SIĘ, ŻE FOLDER/PLIK DODATKU NAZYWA SIĘ TAK SAMO JAK DODATEK!" to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cLiczba brakujących dodatków: %{uReport::how-many-fail-addons}%" to loop-player send " " to loop-player json("%loop-player%", "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cKliknij, aby zobaczyć listę brakujących dodatków!||ttp:&c&l&oSprawdź!||cmd:/ur addons missing") else if loop-player has permission "ur.%skutil yaml value ""cfg.uprawnienia.notify"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": send " " to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c*** UWAGA! ***" to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c*! Nie posiadasz wszystkich wymaganych dodatków !*" to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aUPEWNIJ SIĘ, ŻE FOLDER/PLIK DODATKU NAZYWA SIĘ TAK SAMO JAK DODATEK!" to loop-player send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cLiczba brakujących dodatków: %{uReport::how-many-fail-addons}%" to loop-player send " " to loop-player json("%loop-player%", "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cKliknij, aby zobaczyć listę brakujących dodatków!||ttp:&c&l&oSprawdź!||cmd:/ur addons missing") loop 30 times: send " " to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c*** UWAGA! ***" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c*! Nie posiadasz wszystkich wymaganych dodatkow !*" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aUPEWNIJ SIE, ZE FOLDER/PLIK DODATKU NAZYWA SIE TAK SAMO JAK DODATEK!" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cLiczba brakujacych dodatkow: %{uReport::how-many-fail-addons}%" to console send " " to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cWpisz &6/ur addons missing &caby sprawdzic liste brakujacych dodatkow!" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cPo zainstalowaniu dodatku wpisz &6/ur reload" to console else: if {_p} is not "-s": send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPosiadasz wszystkie wymagane dodatki!" to console clear {uReport::how-many-fail-addons} command /ur [] [] [] []: aliases: /ureport trigger: if executor is console: if arg-1 is "reload" or "rl": if arg-2 is not set: if {uReport::already-reloading} is not set: set {uReport::already-reloading} to true send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aZaczynam przeładowywanie plików." set {uReport::reload} to true set {_now} to now wait 1 tick execute console command "sk reload %script%" if skutil yaml value "cfg.inne.sprawdzaj-wymagane-dodatki" from file uGetPath() is true: checkuReport("addons") checkuReport("update") checkuReport("files") set {_time} to difference between now and {_now} set {_return} to "%{_time}%" set {_ang::*} to ("seconds" and "second") set {_pl::*} to ("sek" and "sek") loop {_ang::*}: replace all loop-value with {_pl::%loop-index%} in {_return} if {_time} is less than 6.5 seconds: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPrzeładowałem uReport i pliki! (&2%{_return}%&a)" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cuReport przeładowywał się dłużej, niż oczekiwano! (&4%{_return}%&c)" delete {uReport::already-reloading} else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cAktualnie trwa już przeładowywanie!" delete {uReport::already-reloading} else if arg-1 is "addons" or "addon" or "dodatek" or "dodatki": if arg-2 is "missing" or "brakujace" or "brakujące": set {_s} to size of {uReport::not-installed-addons::*} if {_s} > 0: send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aLista brakujących dodatków: &7[KLIKNIJ, ABY POBRAĆ]" send " " loop {uReport::not-installed-addons::*}: if loop-value is "TuSKe": set {_url} to "https://www.spigotmc.org/resources/tuske.25136/download?version=192556" else if loop-value is "skUtilities": set {_url} to "https://github.com/tim740/skUtilities/releases/download/v0.9.2/skUtilities.v0.9.2.jar" else if loop-value is "SkQuery": set {_url} to "https://www.spigotmc.org/resources/SkQuery-1-9-1-14.36631/download?version=283382" else if loop-value is "ProtocolLib": set {_url} to "https://www.spigotmc.org/resources/protocollib.1997/" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cWystąpił nieoczekiwany błąd! Nie można znaleźć linku do dodatku!" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cNazwa dodatku: &6%loop-value%" set {_ubreak} to true if {_ubreak} is not set: json("%player%", "&c- &6&n%loop-value%||ttp:&6&oKliknij, aby pobrać najnowszą wersję!||url:%{_url}%") else: delete {_ubreak} if {uReport::dodatki::*} contains "uEditor": add 0 to {_} else: set {_url} to "https://skript.pl/temat/34765-niegotowe-ureport-ulepszony-system-zgłoszeń/" json("%player%", "&c- &6&ouEditor (opcjonalnie)||ttp:&6&oKliknij, aby pobrać najnowszą wersję!||url:%{_url}%") send " " clear {uReport::not-installed-addons::*} else: send "&aNie brakuje żadnych wymaganych dodatków." else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cArgument 2 nie jest prawidłowy! Dostępne: " if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.command"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": if arg-1 is "update" or "aktualizacja": if arg-2 is not set: if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-menu"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": openPlayerMenu("§cAktualizacja:", 3, player) wait 3 ticks set {_tmp} to 1 loop ("check" and "download" and "uMention"): if loop-value is "download": set {_n} to "§aPobierz aktualizację" else if loop-value is "check": set {_n} to "§aSprawdź aktualizację" else if loop-value is "uMention": set {_n} to "§aPobierz dodatek uMention" format gui slot {_tmp} of player with light green stained glass pane named "%{_n}%" to close then execute player command "ur update %loop-value%" add 3 to {_tmp} set {_tmp} to 11 loop ("config.yml" and "messages.yml" and "uReport.sk"): format gui slot {_tmp} of player with orange stained glass pane named "§cReinstalacja %loop-value%" to close then run function uReportReinstall("%loop-value%", player) add 2 to {_tmp} format gui slot 21 of player with red stained glass pane named "§c&lODINSTALUJ uReport" to close then execute player command "ur update uninstall" format gui slot 23 of player with red stained glass pane named "§c&oCałkowita reinstalacja" to close then execute player command "ur update force-default" else: send msg("blad.brak-uprawnien") else if arg-2 is "wersja" or "version" or "ver": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-version"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": send msg("inv.inne.aktualna-wersja", "%skutil yaml value ""ogolne.wersja"" from file uGetPath()%") set {_ver::*} to contents from url "https://code.skript.pl/7ArY2qkd/raw" send msg("inv.inne.najnowsza-wersja", "%{_ver::1}%") else: send msg("blad.brak-uprawnien") else if arg-2 is "force-default" or "wymus-domyslnie": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-force-default"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cUWAGA! Za 15 sekund WSZYSTKIE pliki związane z uReport" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &czostaną przywrócone do ustawień fabrycznych!" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &6&oPo przywróceniu zrestartuj serwer!" send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c&oMożesz anulować akcję komendą /ur cancel" set {uReport::can-cancel::%player%} to true wait 15 seconds if {uReport::can-cancel::%player%} is set: send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &7Rozpoczynam proces przywracania do stanu fabrycznego..." send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &7&oWszystkie akcje będą wyświetlane w konsoli!" wait 0.3 seconds send " " to console send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &7&oPrzygotowywuje srodowisko do przywrocenia do stanu fabrycznego!" to console delete {uReport::can-cancel::%player%} checkuReport("detect-files") wait 1.5 seconds set {_size} to size of {uReport::templist::*} if {_size} = 3: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aWykryto wszystkie pliki." to console clear {uReport::templist::*} checkuReport("clear-files") wait 15 ticks set {_size} to size of {uReport::templist::*} if {_size} = 4: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPomyślnie przywrócono uReport do ustawień fabrycznych!" send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPomyslnie przywrocono uReport do ustawien fabrycznych!" to console clear {uReport::templist::*} set {_ver::*} to contents from url "https://code.skript.pl/7ArY2qkd/raw" set skutil yaml value "ogolne.wersja" from file uGetPath() to {_ver::1} execute console command "ur rl" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cUWAGA! Nie wszystko zostalo poprawnie pobrane!" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c&oSprawdz w folderach jakich plikow brakuje, a nastepnie wpisz: &6&o/ur update .yml/.sk" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cWystąpił nieoczekiwany błąd! Sprawdź konsolę!" clear {uReport::templist::*} else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cNie wykryto wszystkich plików!" to console clear {uReport::templist::*} checkuReport("clear-files") wait 15 ticks set {_size} to size of {uReport::templist::*} if {_size} = 4: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPomyślnie przywrócono uReport do ustawień fabrycznych!" send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPomyslnie przywrocono uReport do ustawien fabrycznych!" to console set {_ver::*} to contents from url "https://code.skript.pl/7ArY2qkd/raw" set skutil yaml value "ogolne.wersja" from file uGetPath() to {_ver::1} clear {uReport::templist::*} execute console command "ur rl" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cUWAGA! Nie wszystko zostalo pomyslnie pobrane!" to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c&oSprawdz w folderach jakich plikow brakuje, a nastepnie wpisz: &6&o/ur update " to console send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cWystąpił nieoczekiwany błąd! Sprawdź konsolę!" clear {uReport::templist::*} delete {uReport::can-cancel::%player%} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> wymusił wersję domyślną uReport (przeinstalował wszystko)" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") else if arg-2 is "uninstall" or "odinstaluj" or "usun": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-uninstall"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": uReportReinstall("uninstall", player) else: send msg("blad.brak-uprawnien") else if arg-2 is "cfg.yml" or "config" or "cfg" or "config.yml": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-cfg"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": uReportReinstall("config.yml", player) else: send msg("blad.brak-uprawnien") else if arg-2 is "msg.yml" or "messages.yml" or "messages" or "msg": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-msg"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": uReportReinstall("messages.yml", player) else: send msg("blad.brak-uprawnien") else if arg-2 is "uReport.sk" or "uReport" or "sk" or "skrypt": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-sk"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": uReportReinstall("uReport.sk", player) else: send msg("blad.brak-uprawnien") else if arg-2 is "uMention" or "uMention.sk": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-umention"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": uReportReinstall("uMention.sk", player) else: send msg("blad.brak-uprawnien") else if arg-2 is "download" or "latest" or "najnowsza" or "pobierz": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-download"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": set {_ver::*} to contents from url "https://code.skript.pl/7ArY2qkd/raw" set {_curver} to skutil yaml value "ogolne.wersja" from file uGetPath() if {_ver::1} is not {_curver}: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPobieram najnowszą wersję uReport." skutil delete file "plugins/Skript/scripts/%script%.sk" skutil download file from "https://code.skript.pl/4wDBpSv6/raw" to file "plugins/Skript/scripts/uReport.sk" wait 1 tick if skutil file "plugins/Skript/scripts/uReport.sk" exists: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &auReport został pomyślnie zaktualizowany do wersji %{_ver::1}%" set skutil yaml value "ogolne.wersja" from file uGetPath() to {_ver::1} execute console command "ur rl" set {uReport::au-needed} to true if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> zaktualizował uReport do najnowszej wersji" to skutil yaml list "logi" from file uGetPath(5) else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cUWAGA! Skrypt nie został poprawnie pobrany! uReport.sk nie istnieje!" else: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPosiadasz najnowszą wersję uReport! :)" else: send msg("blad.brak-uprawnien") else if arg-2 is "check" or "sprawdz": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.update-check"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.update-all"" from file uGetPath()%": set {_ver::*} to contents from url "https://code.skript.pl/7ArY2qkd/raw" set {_curver} to skutil yaml value "ogolne.wersja" from file uGetPath() if {_ver::1} is not {_curver}: send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cDostępna jest nowa wersja uReport!" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cTwoja: %skutil yaml value ""ogolne.wersja"" from file uGetPath()%" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aNajnowsza: %{_ver::1}%" send " " if skutil yaml value "cfg.inne.automatyczna-aktualizacja" from file uGetPath() is true: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &c&oPobieram najnowszą wersję uReport." checkuReport("download-update-s") wait 1 tick skutil download file from "https://code.skript.pl/7agXT8Ee/raw" to file "plugins/Skript/scripts/uReportManager.sk" if skutil file "plugins/Skript/scripts/uReport.sk" exists: set skutil yaml value "ogolne.wersja" from file uGetPath() to "%{_ver::1}%" send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPobrałem najnowszą wersję uReport." if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "Skrypt pobrał najnowszą wersję uReport!" to skutil yaml list "logi" from file uGetPath(5) else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% Wystąpił nieoczekiwany błąd! Plik uReport.sk nie został pobrany (nie istnieje!)" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &c&oWpisz &6&o/ur update download &c&oaby pobrać aktualizację" else: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPosiadasz najnowszą wersję uReport! :)" else: send msg("blad.brak-uprawnien") else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cArgument 2 nie jest prawidłowy! Dostępne: " else if arg-1 is "cancel" or "anuluj": if {uReport::can-cancel::%player%} is set: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPomyślnie anulowałeś akcję!" delete {uReport::can-cancel::%player%} else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cNie ma akcji do anulowania!" else if arg-1 is "reload" or "rel" or "rl": if arg-2 is not set: if {uReport::already-reloading} is not set: if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.reload"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aZaczynam przeładowywanie plików." set {uReport::reload} to true set {_now} to now wait 1 tick execute console command "sk reload %script%" if skutil yaml value "cfg.inne.sprawdzaj-wymagane-dodatki" from file uGetPath() is true: checkuReport("addons") checkuReport("update") checkuReport("files") set {_time} to difference between now and {_now} set {_return} to "%{_time}%" set {_ang::*} to ("seconds" and "second") set {_pl::*} to ("sek" and "sek") loop {_ang::*}: replace all loop-value with {_pl::%loop-index%} in {_return} if {_time} is less than 6.5 seconds: send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aPrzeładowałem uReport i pliki! (&2%{_return}%&a)" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cuReport przeładowywał się dłużej, niż oczekiwano! (&4%{_return}%&c)" else: send msg("blad.brak-uprawnien") else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cAktualnie trwa już przeładowywanie!" delete {uReport::already-reloading} else if arg-1 is "check" or "przejrzyj" or "sprawdz" or "sprawdź" or "spr": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.check"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": if arg-2 is set: set {_id} to arg-2 parsed as integer if skutil yaml path "report%{_id}%" in file uGetPath(3) exists: openReportMenu("overview", {_id}, player) else: send msg("blad.zgloszenie-nie-istnieje", "%{_id}%") else: send msg("blad.podaj-nr-zgl") else: send msg("blad.brak-uprawnien") else if arg-1 is "list" or "lista" or "reporty": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.list"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": if arg-2 is not set: set {_size} to size of {reporty::aktywne::*} set {_size2} to size of {reporty::nieaktywne::*} if {_size} > 0: openuReportList("aktywne", player) else if {_size2} > 0: openuReportList("nieaktywne", player) else: send msg("blad.nie-ma-zgloszen") else if arg-2 is "nieaktywne": openuReportList("nieaktywne", player) else if arg-2 is "aktywne": openuReportList("aktywne", player) else: send msg("blad.nieznany-arg", "%arg-2%") else: send msg("blad.brak-uprawnien") else if arg-1 is "clear" or "wyczysc": if arg-2 is "wszystkie" or "all": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.clearall"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.clear-all"" from file uGetPath()%": skutil delete file uGetPath(3) wait 1 tick skutil create file uGetPath(3) clear {mojereporty::*} clear {reporty::*} send msg("chat.pomyslnie-wyczyszczono") if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> wyczyścił wszystkie zgłoszenia" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") else if arg-2 is "nieaktywne": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.clearnieaktywne"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.clear-all"" from file uGetPath()%": loop {reporty::nieaktywne::*}: set {_p} to skutil yaml value "report%loop-value%.zglaszajacy" from file uGetPath(3) set {_p} to {_p} parsed as player remove loop-value from {mojereporty::%{_p}%::*} wait 1 tick loop {reporty::nieaktywne::*}: delete skutil yaml list "report%loop-value%" from file uGetPath(3) clear {reporty::nieaktywne::*} send msg("chat.pomyslnie-wyczyszczono2") if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> wycziścił nieaktywne zgłoszenia" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") else if arg-2 is "aktywne": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.clearaktywne"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.clear-all"" from file uGetPath()%": loop {reporty::aktywne::*}: set {_p} to skutil yaml value "report%loop-value%.zglaszajacy" from file uGetPath(3) set {_p} to {_p} parsed as player remove loop-value from {mojereporty::%{_p}%::*} wait 1 tick loop {reporty::aktywne::*}: delete skutil yaml list "report%loop-value%" from file uGetPath(3) clear {reporty::aktywne::*} send msg("chat.pomyslnie-wyczyszczono3") if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> wyczyścił aktywne zgłoszenia" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cArgument 2 nie jest prawidłowy! Dostępne: " else if arg-1 is "addon" or "addons" or "dodatek" or "dodatki": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.addons"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.addons-all"" from file uGetPath()%": if arg-2 is "missing" or "brakujace" or "brakujące": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.addons-missing"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.addons-all"" from file uGetPath()%": set {_s} to size of {uReport::not-installed-addons::*} if {_s} > 0: send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &aLista brakujących dodatków: &7[KLIKNIJ, ABY POBRAĆ]" send " " loop {uReport::not-installed-addons::*}: if loop-value is "TuSKe": set {_url} to "https://www.spigotmc.org/resources/tuske.25136/download?version=192556" else if loop-value is "skUtilities": set {_url} to "https://github.com/tim740/skUtilities/releases/download/v0.9.2/skUtilities.v0.9.2.jar" else if loop-value is "SkQuery": set {_url} to "https://www.spigotmc.org/resources/SkQuery-1-9-1-14.36631/download?version=283382" else if loop-value is "ProtocolLib": set {_url} to "https://www.spigotmc.org/resources/protocollib.1997/" else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cWystąpił nieoczekiwany błąd! Nie można znaleźć linku do dodatku!" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cNazwa dodatku: &6%loop-value%" set {_ubreak} to true if {_ubreak} is not set: json("%player%", "&c- &6&n%loop-value%||ttp:&6&oKliknij, aby pobrać najnowszą wersję!||url:%{_url}%") else: delete {_ubreak} if {uReport::dodatki::*} contains "uEditor": add 0 to {_} else: set {_url} to "https://skript.pl/temat/34765-niegotowe-ureport-ulepszony-system-zgłoszeń/" json("%player%", "&c- &6&ouEditor (opcjonalnie)||ttp:&6&oKliknij, aby pobrać najnowszą wersję!||url:%{_url}%") send " " clear {uReport::not-installed-addons::*} else: send "&aNie brakuje żadnych wymaganych dodatków." else if arg-2 is "list" or "lista": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.addons-list"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.addons-all"" from file uGetPath()%": send " " send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cLista wymaganych dodatków:" loop {@addons}: send "&7- &6%loop-value%" set {_url} to "https://skript.pl/temat/34938-ureport-ulepszony-system-zgłoszeń/" json("%player%", "&7- &6uMention||ttp:&a&oSprawdź||cmd:/ur update uMention|| &7// Opcjonalne //") else: send msg("blad.brak-uprawnien") else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cArgument 2 nie jest prawidłowy! Dostępne: " else: send msg("blad.brak-uprawnien") else if arg-1 is "info" or "autor" or "informacje": if arg-2 is not set: if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.info"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": set {_a} to skutil yaml value "ogolne.autor" from file uGetPath() openPlayerMenu("&c&lInformacje o uReport", 3, player) set {_url} to "https://skript.pl/temat/34938-ureport-ulepszony-system-zgłoszeń/" wait 3 ticks format gui slot 11 of player with shears named "&cInformacje" with lore "||&eZobacz całą listę wersji dodatków, itd.||&7&oKliknij, aby wyświetlić detale." to close then run function checkuReport("versions", "%player%") format gui slot 13 of player with enchanted book named "&eAutor: &c%{_a}%" with lore "||&7&oDziękuję za pobranie skryptu uReport :)" to close then run function json("%player%", "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aGorąco dziękuję za używanie skryptu! &c♥||ttp: &2Kliknij :)||url:%{_url}%") set {_s} to size of {uReport::dodatki::*} if {_s} is not set: set {_s} to 0 if {_s} = 0: format gui slot 15 of player with compass named "&6Dodatki do uReport" with lore "||&cNie posiadasz żadnych dodatków od HeezQ!||&7&oMoże to czas, aby je pobrać?" to close then run function uReportAction("lista-dodatkow", " ", {_e}, player) else: format gui slot 15 of player with compass named "&6Dodatki do uReport" with lore "||&aAktualnie posiadasz %{_s}% dodatek/i/ów||&cDziękuję! ♥" to close then run function json("%player%", "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aKliknij, aby przejrzeć temat z dodatkami.||ttp:&7&oKlik :)||url:%{_url}%") else: send msg("blad.brak-uprawnien") else if arg-2 is "version" or "versions" or "wersja" or "wersje" or "ver": checkuReport("versions", "%player%") else if arg-1 is "settings" or "setting" or "ustawienia" or "ustawienie": if {uReport::settings-loading} is not set: if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.settings"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": set {uReport::settings-loading} to true set {_0} to "plugins/Skript/scripts/uReportSettings.sk" set {uReport::tmpplayer::settings} to player skutil download file from "https://code.skript.pl/XtKBRM2G/raw" to file "%{_0}%" wait 2 ticks execute console command "sk reload uReportSettings" wait 2 tick skutil delete file "%{_0}%" delete {uReport::tmpplayer::settings} delete {uReport::settings-loading} else: send msg("blad.brak-uprawnien") else: send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cSerio chcesz to zepsuć? T-T / Po co spamisz?" else if arg-1 is "uninstall" or "odinstaluj": execute player command "ur update uninstall" else if arg-1 is "changelog" or "devlog" or "cl" or "zmiany" or "lista-zmian" or "listazmian": if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.report-cl"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.report-all"" from file uGetPath()%": set {_0} to "plugins/Skript/scripts/uReportChangelog.sk" set {uReport::tmpplayer} to player skutil download file from "https://code.skript.pl/rxJcuUPh/raw" to file "%{_0}%" wait 3 ticks execute console command "sk reload uReportChangelog" wait 1 tick skutil delete file "%{_0}%" delete {uReport::tmpplayer} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> sprawdził changelog uReport" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.brak-uprawnien") else: send msg("inv.inne.pusta-linia") send msg("inv.inne.linia") send msg("komendy.komendy-dla-ciebie") loop skutil yaml nodes "cfg.uprawnienia" from file uGetPath(): if loop-value is "delete" or "close" or "change-status" or "teleport" or "check" or "list" or "addons" or "clearall" or "version" or "reload" or "info" or "settings": if player has permission "ur.%loop-value%" or "ur.all": if loop-value is not "delete" or "close" or "change-status" or "teleport": send msg("komendy.%loop-value%") else: send msg("komendy.%loop-value%", "&aTak") else if loop-value is "delete" or "close" or "change-status" or "teleport": send msg("komendy.%loop-value%", "&cNie") send msg("inv.inne.linia") else if executor is not console: send msg("blad.brak-uprawnien") command /myreports []: aliases: /mojezgloszenia, /mojereporty, /myreport trigger: if arg-1 is not set: if skutil yaml value "cfg.myreports.czy-gracz-moze-uzyc-komendy-myreports" from file uGetPath() is true: if skutil yaml value "cfg.myreports.czy-wymagane-jest-uprawnienie-do-myreports" from file uGetPath() is true: if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.myreports"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": openMyReports(player) else: send msg("blad.brak-uprawnien") else: openMyReports(player) else if player is not op: send msg("blad.nie-mozesz-uzyc-komendy", "myreports") else: openMyReports(player) else if arg-1 is "clear" or "wyczysc" or "wyczyść": set {_s} to size of {mojereporty::%player%::*} if {_s} > 0: loop {mojereporty::%player%::*}: remove loop-value from {mojereporty::%player%::*} wait 1 tick send msg("chat.wczysciles-zgloszenia") if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> wyczyścił listę swoich zgłoszeń" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.nie-masz-zgloszen") command /report [] []: aliases: /zglos, /zgłoś trigger: if getCooldown(player, "report"): if arg-1 is set: set {_random-min} to skutil yaml value "cfg.inne.losowy-numer-zgloszenia-min" from file uGetPath() set {_random-max} to skutil yaml value "cfg.inne.losowy-numer-zgloszenia-max" from file uGetPath() set {_random-min} to {_random-min} parsed as integer set {_random-max} to {_random-max} parsed as integer set {_id} to random integer between {_random-min} and {_random-max} if skutil yaml path "report%{_id}%.aktywny" in file uGetPath(3) doesn't exist: if arg-2 is not set: set {_arg} to "brak" else: set {_arg} to arg-2 if skutil yaml value "cfg.menu.uzywac-menu-wyboru-zgloszenia" from file uGetPath() is true: openReportMenu("sel-rep-type", {_id}, player, "%arg-1%", "%{_arg}%") else: uReportAction("set-rep-type", "11ff", {_id}, player, "%arg-1%", "%{_arg}%") if skutil yaml value "cfg.menu.uzywac-menu-wyboru-zgloszenia" from file uGetPath() is true: wait 5 ticks while {report::%{_id}%::done} is not set: if name of player's current inventory is not "%skutil yaml value ""inv.inne.zgloszenie1"" from file uGetPath(2)% %{_id}%": set {report::%{_id}%::cancelled} to true set {report::%{_id}%::done} to true wait 3 ticks if {report::%{_id}%::cancelled} is not set: if skutil yaml value "cfg.reports.nowe-zgloszenie-na-przod" from file uGetPath() is true: set {_v} to size of {reporty::aktywne::*} if {_v} > 0: set {_gg} to 1 loop {reporty::aktywne::*}: set {_k::%{_gg}%} to {reporty::aktywne::%{_gg}%} add 1 to {_gg} clear {reporty::aktywne::*} add {_id} to {reporty::aktywne::*} loop {_k::*}: add loop-value to {reporty::aktywne::*} wait 1 tick set {_gg} to 1 loop {mojereporty::%player%::*}: set {_k1::%{_gg}%} to {mojereporty::%player%::%{_gg}%} add 1 to {_gg} clear {mojereporty::%player%::*} add {_id} to {mojereporty::%player%::*} loop {_k1::*}: add loop-value to {mojereporty::%player%::*} else: add {_id} to {reporty::aktywne::*} add {_id} to {mojereporty::%player%::*} else: add {_id} to {reporty::aktywne::*} add {_id} to {mojereporty::%player%::*} send msg("inv.inne.linia") send msg("chat.utworzono-zgloszenie", "%{_id}%") if skutil yaml value "cfg.myreports.czy-gracz-moze-uzyc-komendy-myreports" from file uGetPath() is true: send msg("chat.sledz-poczynania") send msg("chat.admini-zajma") send msg("inv.inne.linia") setCooldown(player, "report") wait 1 tick loop all players: if loop-player has permission "ur.%skutil yaml value ""cfg.uprawnienia.check"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": send msg("inv.inne.pusta-linia") to loop-player send msg("inv.inne.linia") to loop-player send msg("chat.nowe-zgloszenie") to loop-player json("%loop-player%", "%skutil yaml value ""chat.sprawdz-zgloszenie"" from file uGetPath(2)%||ttp:&c&oSprawdź!||cmd:/ur check %{_id}%|| &7[&cID: &e%{_id}%&7]") send msg("inv.inne.linia") to loop-player delete {report::%{_id}%::done} delete {report::%{_id}%::cancelled} if skutil yaml value "logi.zapisywac-akcje" from file uGetPath() is true: add "%player% -> stworzył nowe zgłoszenie (%{_id}%)" to skutil yaml list "logi" from file uGetPath(5) else: send msg("blad.anulowales-zgl") else: send msg("blad.zgloszenie-istnieje") else: send msg("blad.podaj-tresc") else: set {_tim} to getCooldownText(player, "report") send msg("blad.musisz-poczekac", "%{_tim}%") on skript disable: delete {uReport::settings-loading} on skript load: wait 3 seconds execute console command "ur rl" every 10 minutes: if skutil yaml value "cfg.inne.sprawdzaj-aktualizacje-co-jakis-czas" from file uGetPath() is true: checkuReport("update", "-s") on join: if player has permission "ur.%skutil yaml value ""cfg.uprawnienia.notify"" from file uGetPath()%" or "ur.%skutil yaml value ""cfg.uprawnienia.all"" from file uGetPath()%": if skutil yaml value "cfg.powiadomienia.powiadom-o-aktualizacji" from file uGetPath() is true: wait 5 seconds set {_ver::*} to contents from url "https://code.skript.pl/7ArY2qkd/raw" send "%skutil yaml value ""cfg.inne.error"" from file uGetPath()% &cUWAGA!" send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &cDostępna jest aktualizacja uReport!" send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &cTwoja wersja: %skutil yaml value ""ogolne.wersja"" from file uGetPath()%" send "%skutil yaml value ""ogolne.tag"" from file uGetPath()% &aNajnowsza wersja: %{_ver::1}%"