Skocz do zawartości
  • 0

Nether na czas z teleportem po czasie.


Pytanie

Siema. Potrzebuję zaktualizować mój kod, tak żeby po zamknięciu netheru, teleportowało na spawn. KOD:

options:
#Po znaku ":" daj swoj� wiadomo�� wy�wietlan� podczas wchodzenia do portalu
message: &4Nether jest teraz zamkniety! Przyjdz pomiedzy 12 a 20.

#Po znaku ":" daj wiadomo�� wy�wietlan� co 5 minut informuj�c� o tym, �e nether jest od 12 do 20
announce: &6Nether jest wlaczony od 12 do 20!
on portal:
set {_hour} to text from "http://piratjsk.me/projects/time/?hour" parsed as number
if {_hour} is not 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19:
cancel event
send "{@message}"
every 30 minutes:
send "{@announce}" to all players

 

Edytowane przez Wojciu
Odnośnik do komentarza
https://skript.pl/temat/6678-nether-na-czas-z-teleportem-po-czasie/
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
options:#Po znaku ":" daj swoj� wiadomo�� wy�wietlan� podczas wchodzenia do portalumessage: &4Nether jest teraz zamkniety! Przyjdz pomiedzy 12 a 20. #Po znaku ":" daj wiadomo�� wy�wietlan� co 5 minut informuj�c� o tym, �e nether jest od 12 do 20announce: &6Nether jest wlaczony od 12 do 20!on portal:    set {_hour} to text from "http://piratjsk.me/projects/time/?hour" parsed as number    if {_hour} is not 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19:        cancel event        set {portal} to "off":        send "{@message}"    else:        set {portal} to "on" every 30 minutes:    send "{@announce}" to all players every 20 second:   if {portal} is "off":        loop all players in world "nazwa_swiata_piekla":             teleport loop-players to spawn point
Odnośnik do komentarza
https://skript.pl/temat/6678-nether-na-czas-z-teleportem-po-czasie/#findComment-54519
Udostępnij na innych stronach

  • 0
W dniu 3.03.2015 o 21:59, Barunyt napisał:

 

<code>

options:
#Po znaku ":" daj swoj� wiadomo�� wy�wietlan� podczas wchodzenia do portalu
message: &4Nether jest teraz zamkniety! Przyjdz pomiedzy 12 a 20.
 
#Po znaku ":" daj wiadomo�� wy�wietlan� co 5 minut informuj�c� o tym, �e nether jest od 12 do 20
announce: &6Nether jest wlaczony od 12 do 20!
on portal:
    set {_hour} to text from "http://piratjsk.me/projects/time/?hour" parsed as number
    if {_hour} is not 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19:
        cancel event
        set {portal} to "off":
        send "{@message}"
    else:
        set {portal} to "on"
 
every 30 minutes:
    send "{@announce}" to all players
 
every 20 second:
   if {portal} is "off":

        loop all players in world "nazwa_swiata_piekla":

             teleport loop-players to spawn point
</code>

 

Błędy wyskoczyły:

[22:29:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (nether.sk, line 1: options:')

[22:29:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (nether.sk, line 11: set {portal} to "off":')

[22:29:50 ERROR]: indentation error: expected 6 spaces, but found 8 spaces (nether.sk, line 21: loop all players in world "nazwa_swiata_piekla":')

[22:29:50 ERROR]: indentation error: expected 6 spaces, but found 13 spaces (nether.sk, line 22: teleport loop-players to spawn point')

[22:29:50 ERROR]: invalid line - all code has to be put into triggers (nether.sk, line 3: message: &4Nether jest teraz zamkniety! Przyjdz pomiedzy 12 a 20.')

[22:29:50 ERROR]: invalid line - all code has to be put into triggers (nether.sk, line 6: announce: &6Nether jest wlaczony od 12 do 20!')

[22:29:50 ERROR]: 'set {portal} to "off"' is not a boolean (yes/no) (nether.sk, line 11: set {portal} to "off":')

[22:29:50 ERROR]: undefined option {@message} (nether.sk, line 12: send "{@message}"')

[22:29:50 ERROR]: undefined option {@announce} (nether.sk, line 17: send "{@announce}" to all players')

[22:29:50 INFO]: [Error] Bledna konfiguracja skryptu! /ib debug

[22:29:51 INFO]: Loaded 13 scripts with a total of 20 triggers and 17 commands in 0.76 seconds

[22:29:51 INFO]: [skript] Encountered 7 errors while reloading the config and all scripts!

 

Edytowane przez Wojciu
Odnośnik do komentarza
https://skript.pl/temat/6678-nether-na-czas-z-teleportem-po-czasie/#findComment-54530
Udostępnij na innych stronach

  • 0
options:    #Ustawiasz tutaj nazwe swiata Netheru (domyslnie jest: world_nether)    world.nether: world_netherevery 1 second:    if "%hour%:%minute%:%second%" is "12:0:0":        set {nether} to true        broadcast "&eWybila godzina 12:00! Nether zostal otwarty! Zamkniecie netheru nastapi o godzinie 20:00"        stop    if "%hour%:%minute%:%second%" is "20:0:0":        set {nether} to false        broadcast "&eWybila godzina 20:00! Nether zostal zamkniety! Otwarcie netheru nastapi o godzinie 12:00"        loop all players in "{@world.nether}":            teleport loop-player to {nether.spawn}            stopon portal:    if {nether} is false:        cancel event        send "&4Nether aktualnie jest zamkniety! Otwarcie nastapi o godzinie 18:00"        stopcommand /setnether: #Komenda ustawiajaca teleport z netheru    trigger:        if player has permission "setspawn.nether":            send "&aUstawiono punkt teleportacji graczy z zamknietego Netheru!"            set {nether.spawn} to location of player            stop

Proszę bardzo, testowane i działa - tylko musisz ustawić /setnether np. na spawnie serwera, tak aby gracze którzy przebywają w Nether gdy on zostanie zamknięty, byli teleportowani na spawn.

Odnośnik do komentarza
https://skript.pl/temat/6678-nether-na-czas-z-teleportem-po-czasie/#findComment-54609
Udostępnij na innych stronach

  • 0
options:    #Ustawiasz tutaj nazwe swiata Netheru (domyslnie jest: world_nether)    world.nether: world_netherevery 1 second:    if "%hour%:%minute%:%second%" is "12:0:0":        set {nether} to true        broadcast "&eWybila godzina 12:00! Nether zostal otwarty! Zamkniecie netheru nastapi o godzinie 20:00"        stop    if "%hour%:%minute%:%second%" is "20:0:0":        set {nether} to false        broadcast "&eWybila godzina 20:00! Nether zostal zamkniety! Otwarcie netheru nastapi o godzinie 12:00"        loop all players in "{@world.nether}":            teleport loop-player to {nether.spawn}            stopon portal:    if {nether} is false:        cancel event        send "&4Nether aktualnie jest zamkniety! Otwarcie nastapi o godzinie 18:00"        stopcommand /setnether: #Komenda ustawiajaca teleport z netheru    trigger:        if player has permission "setspawn.nether":            send "&aUstawiono punkt teleportacji graczy z zamknietego Netheru!"            set {nether.spawn} to location of player            stop

Proszę bardzo, testowane i działa - tylko musisz ustawić /setnether np. na spawnie serwera, tak aby gracze którzy przebywają w Nether gdy on zostanie zamknięty, byli teleportowani na spawn.

 

Czy jeżeli mam OP i w pex '*' to mogę się teleportować? Bo jeżeli tak, to jest spoko, jeżeli nie to coś jest nie tak :P Bo jest 23:17 a ja do netheru poszedlem (ustawilem /setnether)

Odnośnik do komentarza
https://skript.pl/temat/6678-nether-na-czas-z-teleportem-po-czasie/#findComment-54614
Udostępnij na innych stronach

  • 0

/setnether ustawiasz na spawnie w normalnym świecie

oraz ustaw na początku skryptu:

on skript load:    if hour is "12" or "13" or "14" or "15" or "16" or "17" or "18" or "19":        set {nether} to true    else:        set {nether} to false

Nie sprawdzałem czy działa, ale zobacz - dodaj to do tego kodu wyżej

Edytowane przez KiszonaBestia
Odnośnik do komentarza
https://skript.pl/temat/6678-nether-na-czas-z-teleportem-po-czasie/#findComment-54623
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ę...