Skocz do zawartości
  • 0

Portale od levela


MateoxPL

Pytanie

Witam

Jak ustawić w tym skrypcie aby portale były od danego poziomu bo narazie mam tylko 1 portal który działa globalnie

options:
#   Ustaw czas opóźnienia przy próbie kolejnej teleportacji.
        portal-delay: 2
#   Ustaw ogólną wysokość portali. Wtedy wysokość ustawionych wyżej bloków musi być równa wysokości portalu.
        portal-height: 3

variables:
    {rpgportal.%player%} = false

command /set-teleport [<text>] [<text>]:
    description: Ustawia lub usuwa spawnpointy teleportów od 1 do 3.
    usage: /set-teleport <nr_teleportu> <blok_uzywany_pod_portalem>
    permission: admin
    permission message: &4Nie masz uprawnień.
    trigger:
        if arg 1 is set:
            set {_numer} to arg 1 parsed as integer
            if {_numer} is integer:
                if {_numer} > 0:
                    if {_numer} <= 3:
                        if arg 2 is set:
                            set {_block} to arg 2 parsed as item
                            if {_block} is item:
                                set {_block} to "%{_block}%" parsed as text
                                if {portalspawn.%{_numer}%.%{_block}%} is not set:
                                    send "Spawnpoint %{_numer}% używając portalu z blokiem ""%{_block}%"" ustawiony." to player
                                    add {_block} to {portalblocks::*}
                                    set {portalspawn.%{_numer}%.%{_block}%} to location of player
                                    stop
                                else:
                                    delete {portalspawn.%{_numer}%.%{_block}%}
                                    remove {_block} from {portalblocks::*}
                                    send "Numer %{_numer}% używając portalu z blokiem ""%{_block}%"" usunięty." to player
                            else:
                                send "Podany blok jest niepoprawny." to player
                        else:
                            send "Podaj nazwę lub ID bloku." to player
                    else:
                        send "Numer spawnpointu nie może być wyższy niż 3." to player
                else:
                    send "Numer spawnpointu nie może być niższy niż 1." to player
            else:
                send "Musi być podany numer spawnpointu." to player
        else:
            send "Podaj numer spawnpointu od 1 do 3." to player

command /portal-blocks:
    description: Wyświetla używane bloki, które są umieszczone pod portalem.
    permission: admin
    permission message: &4Nie masz uprawnień.
    trigger:
        set {_portalblocks::*} to "%{portalblocks::*}%" parsed as text
        replace " and" with "," in {_portalblocks::*}
        replace "<none>" with "brak" in {_portalblocks::*}
        send "Używane bloki do portali: %{_portalblocks::*}%" to player

on any movement:
    if portal block is block 0 blocks above player:
        if {rpgportal.%player%} is false:
            set {rpgportal.%player%} to true
            set {_block} to block {@portal-height} blocks below player
            if {_block} is block {@portal-height} blocks below player:
                set {_block} to "%{_block}%" parsed as text

                if {lvl.%player%} < 15:
                    send "&cOsiągnij 15 poziom, aby przejść przez portal." to player
                    push the player backwards
                    wait {@portal-delay} second
                    set {rpgportal.%player%} to false
                    stop
					

                set {_numer} to random integer from 1 to 3
                if {portalspawn.%{_numer}%.%{_block}%} is not set:
                    loop 10 times:
                        set {_numer} to random integer from 1 to 3
                        if {portalspawn.%{_numer}%.%{_block}%} is set:
                            stop loop
                teleport player to {portalspawn.%{_numer}%.%{_block}%}
            wait {@portal-delay} second
            set {rpgportal.%player%} to false

on join:
    if {rpgportal.%player%} is true:
        set {rpgportal.%player%} to false

 

Odnośnik do komentarza
https://skript.pl/temat/24800-portale-od-levela/
Udostępnij na innych stronach

3 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

@LloydPL

A mógłbyś podać jakiś przykład bo wiem że to jest od tego tylko że działa ze wszystkimi portalami nawet do tego co nie jest ustawiony

 

Edytowane przez MateoxPL
Odnośnik do komentarza
https://skript.pl/temat/24800-portale-od-levela/#findComment-165551
Udostępnij na innych stronach

  • 0

Dobra trochę to już ogarnąłem tylko nie wiem jak zrobić aby inny portal teleportował na różne mapy np:

1 Portal: Ustawiamy blok złota pod portalem ---> Teleportuje nas na mape pierwsza

1 Portal: Ustawiamy blok diamentu pod portalem ---> Teleportuje nas na mape drugą

Ta funkcja odpowieda za to lecz na razie kazdy portal teleportuje na mape pierwsza

                if {lvl.%player%} < 15:
                    send "&cOsiągnij 15 poziom, aby przejść przez portal." to player
                    push the player backwards
                    wait {@portal-delay} second
                    set {rpgportal.%player%} to false
                    stop

 

Odnośnik do komentarza
https://skript.pl/temat/24800-portale-od-levela/#findComment-166071
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

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