Skocz do zawartości
  • 0

Poprawinie skryptu


placki

Pytanie

on sign change:
    if line 1 of event-block is "[PaySign]":
        line 3 of event-block is not ""
        if line 2 of event-block is "":
            set line 2 of event-block to "%player%"
        set line 1 of event-block to "&a[PaySign]"
        send "&aStworzono przelewowa tabliczke!"
on right click:
    if clicked block is sign:
        if line 1 of clicked block is "&a[PaySign]":
            set {_block} to type of block at event-block
            set {_face} to facing of event-block
            set {_nick} to line 2 of clicked block parsed as offline player
            set {_amount} to line 3 of clicked block parsed as number
            if player's balance >= {_amount}:
                remove {_amount} from player's balance
                add {_amount} to {_nick}'s balance
                send "&aZaplaciles &6%{_amount}%&a$"
                send "&aOtrzymales &6%{_amount}%&a$ &aod &a%player%" to {_nick}
                set block at event-block to redstone block
                wait 2 tick
                set block at event-block to {_block}
                set facing of block at event-block to {_face}
                set line 1 of block at event-block to "&a[PaySign]"
                set line 2 of block at event-block to "%{_nick}%"
                set line 3 of block at event-block to "%{_amount}%"
                stop
            send "&6[Tabliczka] &cNie posiadasz wystarczajaco kasy!"

Mam skryp na Pay sign. Ale jest z nim duży problem polega na tym że kiedy gracz jest offline to po kliknięciu gracz nie dostanie pieniędzy i jest jeszcze jeden problem polega na tym że po kliknięciu tabliczka zamienia sie na redstone blok a on nie przekazuje sygnału przez blok. Wiec tabliczka musiałaby się zamienić na wciśnięty przycisk. Mam nadzieje że rozumiecie. Bardzo proszę o pomoc na dole zamieszczam ten skrypt

Odnośnik do komentarza
https://skript.pl/temat/37504-poprawinie-skryptu/
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

  • 0
Spoiler

on sign change:
    if line 1 of event-block is "[Pay]":
        line 3 of event-block is not ""
        if line 2 of event-block is "":
            set line 2 of event-block to "%player%"
        set line 1 of event-block to "&a[Pay]"
        send "&aStworzono tabliczke platnicza!"
        
on right click:
    if clicked block is sign:
        if line 1 of clicked block is "&a[Pay]":
            set {_x} to round down the event-block's x-coordinate
            set {_y} to round down the event-block's y-coordinate
            set {_z} to round down the event-block's z-coordinate
            set {_face} to facing of event-block
            set {_nick} to line 2 of clicked block parsed as offlineplayer
            set {_amount} to line 3 of clicked block parsed as number
            set {_zaco} to line 4 of clicked block
            if "%{_face}%" is "south":
                add -2 to {_z}
            if "%{_face}%" is "north":
                add 2 to {_z}
            if "%{_face}%" is "east":
                add -2 to {_x}
            if "%{_face}%" is "west":
                add 2 to {_x}
            set {_loc} to the location at {_x}, {_y}, {_z} of the world
            if {istenieje::%{_nick}%} is set:
                if player's balance >= {_amount}:
                    {_nick} is online:
                        remove {_amount} from player's balance
                        add {_amount} to {_nick}'s balance
                        send "&aZaplaciles &6%{_amount}%&a$"
                        send "&aOtrzymales &6%{_amount}%&a$ &aod &6%player% &aza &6%{_zaco}%" to {_nick}
                        toggle block at {_loc}
                        wait 10 tick
                        toggle block at {_loc}
                        stop
                    else:
                        remove {_amount} from player's balance
                        send "&aZaplaciles &6%{_amount}%&a$"
                        add {_amount} to {suma::%{_nick}%}
                        set {warunek::%{_nick}%} to 1
                else:
                    send "&cNie posiadasz tyle pieniedzy!"
            else:
                send "&cNie ma takiego gracza!"

                
on join:
    if {warunek::%player%} is 1:
        add {suma::%player%} to player's balance
        set {suma::%player%} to 0
        set {warunek::%player%} to 0
    add 1 to {istenieje::%player%}

Żeby był sygnał redstone to tabliczka musi być na ścianie i za ścianą trzeba postawić dźwignie lub przycisk

Edytowane przez skarpeta071
Odnośnik do komentarza
https://skript.pl/temat/37504-poprawinie-skryptu/#findComment-241805
Udostępnij na innych stronach

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ę...