Skocz do zawartości
  • 0

Problem z otwarciem gui po wpisaniu /rynek lub /ah


Pytanie

Podstawowe informacje

  • Wersja serwera: paper 1.20.1
  • Wersja Skript: 2.11.2
  • Dodatki Skript i ich wersje: sk query

Kod skryptu

command /rynek [<text>] [<number>]:
    aliases: ah, aukcje
    trigger:
        if arg-1 is not set:
            open rynek(player, 1, "Wszystko", false) to player
        else:
            if arg-1 is "wystaw":
                if arg-2 is not set:
                    send "&4☹ <##D03535>Podaj cene itemu!"
                else:
                    if player's tool is air:
                        send "&4☹ <##D03535>Nie mozesz wystawic powietrza!"
                    else:
                        send "&2☺ <##5EC438>Poprawnie dodano item na rynek!"
                        add 1 to {GlobalItemID}
                        set {Rynek::%{GlobalItemID}%} to player's tool
                        set {RynekData::%{GlobalItemID}%::Owner} to player
                        set {RynekData::%{GlobalItemID}%::Cost} to arg-2
                        set player's tool to air
            else:
                send "&4☹ <##D03535>Poprawne użycie: /rynek wystaw <cena>"

function rynek(player: player, page: number, sort: text, costsort: boolean) :: inventory:
    # Linia 7: Poprawne przypisanie do zmiennej
    set {_strona} to {_page} parsed as number
    set {_max} to floor((size of {Rynek::*}/45)-0.001)+1
    if {_max} is 0:
        set {_brak} to true
        set {_max} to 1
        set {_strona} to 1
    if {_strona} <= 1:
        set {_strona} to 1
        set {_prev} to true
    if {_strona} >= {_max}:
        set {_strona} to {_max}
        set {_next} to true
    set {_x} to chest inventory with 6 rows named "&8Rynek (&e%{_strona}%&7/&e%{_max}%&8)"
        
    set slots (integers between 45 and 53) of {_x} to gray stained glass pane named "&7"
    set {_list::*} to "Wszystko" and "Bloki" and "Mikstury" and "Narzedzia" and "Zbroje" and "Inne"
    loop {_list::*}:
        if {_sort} is loop-value:
            add "&3- &a%loop-value%" to {_lore::*}
        else:
            add "&3- &7%loop-value%" to {_lore::*}
    set slot 53 of {_x} to sunflower named "&aSortowanie: &6&l%{_sort}%" with lore {_lore::*}
    set slot 45 of {_x} to end portal frame named "&5Twoje Przedmioty"
    set {_l::*} to " &3- &eWzrastajaca" and " &3- &7Malejaca"
    if {_costsort} is true:
        set {_l::*} to " &3- &7Wzrastajaca" and " &3- &eMalejaca"
    set slot 52 of {_x} to gold ingot named "&aCena" with lore "&7Sortuj przedmioty wedlug ceny:" and {_l::*} and "" and "&eKliknij, aby zmienic!"
    if {_prev} is not set:
        set slot 48 of {_x} to arrow named "&aPoprzednia strona"
    if {_next} is not set:
        set slot 50 of {_x} to arrow named "&aNastepna strona"
    set {_c} to 0

    loop {Rynek::*}:
        set {_NewList::%loop-value%.%loop-index%} to {RynekData::%loop-index%::Cost}
        set {_owner::%loop-value%::%{RynekData::%loop-index%::Cost}%} to {RynekData::%loop-index%::Owner}
        set {_item::%loop-value%::%{RynekData::%loop-index%::Cost}%} to loop-value
    if {_costsort} is false:
        set {_top::*} to sorted indices of {_NewList::*} in ascending order
    else:
        set {_top::*} to sorted indices of {_NewList::*} in descending order
    loop size of {Rynek::*} times:
        add 1 to {_n}
        set {_u} to {_top::%{_n}%}
        set {_split::*} to split {_u} at "."
        replace all ".%{_split::2}%" with "" in {_u}
        set {_b} to "%{NewList::%{_u}%.%{_split::2}%}%"
        set {_p} to {_u}
        if {_b} is not set:
            set {_b} to "None"
            set {_p} to "0"
        add 1 to {_a}
        if {_a} > (45*{_strona})-45:
            set {_lore::*} to lore of {_item::%{_p}%::%{_b}%}
            set {_item} to {_item::%{_p}%::%{_b}%} named "&b%name of {_item::%{_p}%::%{_b}%} ? {_item::%{_p}%::%{_b}%}%" with lore {_lore::*} and "" and "&aSprzedawca: &6%{_owner::%{_p}%::%{_b}%}%" and "&aCena: &6%{_b}%$" and "" and "&eKliknij, aby kupic!"
            if {_sort} is "Wszystko":
                set slot {_c} of {_x} to {_item}
               

Opis problemu

Jak wpisuje /ah bądź /rynek to gui się nie otwiera.

Odnośnik do komentarza
https://skript.pl/temat/58985-problem-z-otwarciem-gui-po-wpisaniu-rynek-lub-ah/
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...