Skocz do zawartości
  • 0

problem z skriptem


SzlugPL

Pytanie

Witam. Jak tutaj zrobić żeby ta komenda była dostępna tylko na wybranym świecie i żeby ten fly działał tylko na jednym świecie. Jeszcze chciałbym żeby po teleportacji na inny świat pasek fly znikł  i żeby zabrało fly, gdy powróci na temten wybrany świat to fly zostanie wznowione. Z góry dzięki ;)
Poniżej znajduje się kod.

 

command /latanie [<text="gui">]:
    trigger:
        if arg 1 is "gui":
            open chest with 1 rows named "&8» &6Fly &8«" to player
            format slot 0 of player with 1 feather named "&8» &c10 minut &8«" with lore "&8• &9Koszt: &c20 zlota" to close then run [make player execute command "latanie 1"]
            format slot 1 of player with 1 feather named "&8» &c30 minut &8«" with lore "&8• &9Koszt: &c60 zlota" to close then run [make player execute command "latanie 2"]
        if arg 1 is "1":
            if player has 20 gold ingot:
                remove 20 gold ingot from the player's inventory
                set {fly::timer::%player%} to 10 minutes
                allow flight to the player
                send "&8• &3» &6Fly zostal &aaktywowany &8(&c10 minut&8)" to the player
            else:
                send "&8• &4&lBlad: &cNie posiadasz 20 zlota" to the player
        if arg 1 is "2":
            if player has 60 gold ingot:
                remove 60 gold ingot from the player's inventory
                set {fly::timer::%player%} to 30 minutes
                allow flight for player
                send "&8• &3» &6Fly zostal &aaktywowany &8(&c30 minut&8)" to the player
            else:
                send "&8• &4&lBlad: &cNie posiadasz 60 zlota" to the player

on teleport:
    if {fly::timer::%player%} is set:
        allow flight for player
every seconds:
    loop all players:
        if {fly::timer::%loop-player%} is set:
            remove 1 second from {fly::timer::%loop-player%}
            if {fly::timer::%loop-player%} <= 0 second:
                clear {fly::timer::%loop-player%}
                disallow flight for loop-player
                send "&8• ◄ &4Czas sie skonczyl &8► •" to the loop-player
            else:
                set action bar of loop-player to "&cPozostalo: &a%{fly::timer::%loop-player%}%"

 

Edytowane przez xAxee
xAxee

Wstawiam w code

Notatka dodana przez xAxee

Odnośnik do komentarza
https://skript.pl/temat/38786-problem-z-skriptem/
Udostępnij na innych stronach

9 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /latanie [<text="gui">]:
	trigger:
		player's world is "swiat"
		if arg 1 is "gui":
			open chest with 1 rows named "&8» &6Fly &8«" to player
			format slot 0 of player with 1 feather named "&8» &c10 minut &8«" with lore "&8• &9Koszt: &c20 zlota" to close then run [make player execute command "latanie 1"]
			format slot 1 of player with 1 feather named "&8» &c30 minut &8«" with lore "&8• &9Koszt: &c60 zlota" to close then run [make player execute command "latanie 2"]
		if arg 1 is "1":
			if player has 20 gold ingot:
				remove 20 gold ingot from the player's inventory
				set {fly::timer::%player%} to 10 minutes
				allow flight to the player
				send "&8• &3» &6Fly zostal &aaktywowany &8(&c10 minut&8)" to the player
			else:
				send "&8• &4&lBlad: &cNie posiadasz 20 zlota" to the player
		if arg 1 is "2":
			if player has 60 gold ingot:
				remove 60 gold ingot from the player's inventory
				set {fly::timer::%player%} to 30 minutes
				allow flight for player
				send "&8• &3» &6Fly zostal &aaktywowany &8(&c30 minut&8)" to the player
			else:
				send "&8• &4&lBlad: &cNie posiadasz 60 zlota" to the player

on teleport:
	player's world is "swiat"
	if {fly::timer::%player%} is set:
		allow flight for player
every seconds:
	loop all players:
		loop-player's world is "swiat"
		if {fly::timer::%loop-player%} is set:
			remove 1 second from {fly::timer::%loop-player%}
			if {fly::timer::%loop-player%} <= 0 second:
				clear {fly::timer::%loop-player%}
				disallow flight for loop-player
				send "&8• ◄ &4Czas sie skonczyl &8► •" to the loop-player
			else:
				set action bar of loop-player to "&cPozostalo: &a%{fly::timer::%loop-player%}%"

 

Edytowane przez xAxee
Odnośnik do komentarza
https://skript.pl/temat/38786-problem-z-skriptem/#findComment-244392
Udostępnij na innych stronach

  • 0

Po teleportacji na świat gdzie czas pozostały znika, fly zostaje wyłączone. Ale po teleportacji na ten świat gdzie ma być przewrócony fly pokazuje tylko pozostał czas a fly nie działa...

 

Wie ktoś jak to naprawić?

Edytowane przez SzlugPL
xAxee

Łączę posty

Notatka dodana przez xAxee

Odnośnik do komentarza
https://skript.pl/temat/38786-problem-z-skriptem/#findComment-244655
Udostępnij na innych stronach

  • 0
8 minut temu, SzlugPL napisał:

Nadal nie może latać po teleportacji...

command /latanie [<text="gui">]:
	trigger:
		player's world is "swiat"
		if arg 1 is "gui":
			open chest with 1 rows named "&8» &6Fly &8«" to player
			format slot 0 of player with 1 feather named "&8» &c10 minut &8«" with lore "&8• &9Koszt: &c20 zlota" to close then run [make player execute command "latanie 1"]
			format slot 1 of player with 1 feather named "&8» &c30 minut &8«" with lore "&8• &9Koszt: &c60 zlota" to close then run [make player execute command "latanie 2"]
		if arg 1 is "1":
			if player has 20 gold ingot:
				remove 20 gold ingot from the player's inventory
				set {fly::timer::%player%} to 10 minutes
				allow flight to the player
				send "&8• &3» &6Fly zostal &aaktywowany &8(&c10 minut&8)" to the player
			else:
				send "&8• &4&lBlad: &cNie posiadasz 20 zlota" to the player
		if arg 1 is "2":
			if player has 60 gold ingot:
				remove 60 gold ingot from the player's inventory
				set {fly::timer::%player%} to 30 minutes
				allow flight for player
				send "&8• &3» &6Fly zostal &aaktywowany &8(&c30 minut&8)" to the player
			else:
				send "&8• &4&lBlad: &cNie posiadasz 60 zlota" to the player

on teleport:
	player's world is "swiat"
	if {fly::timer::%player%} is set:
		allow flight for player
every seconds:
	loop all players:
		loop-player's world is "swiat"
		if {fly::timer::%loop-player%} is set:
			remove 1 second from {fly::timer::%loop-player%}
			if {fly::timer::%loop-player%} <= 0 second:
				clear {fly::timer::%loop-player%}
				disallow flight for loop-player
				send "&8• ◄ &4Czas sie skonczyl &8► •" to the loop-player
			else:
				if flight mode of loop-player is false:
					allow flight for player
				set action bar of loop-player to "&cPozostalo: &a%{fly::timer::%loop-player%}%"

 

Odnośnik do komentarza
https://skript.pl/temat/38786-problem-z-skriptem/#findComment-244715
Udostępnij na innych stronach

  • 0

40 linijka błąd

na świecie IridiumSkyblock ma być wszystko dozwolone i fly ma działać i ma przewracać po teleportacji a na świecie world ma być wyłącozne fly i czas wyświetlany ma zniknąć. może teraz będzie ci łatwiej ogarnąć :D

Edytowane przez SzlugPL
Odnośnik do komentarza
https://skript.pl/temat/38786-problem-z-skriptem/#findComment-244722
Udostępnij na innych stronach

  • 0
2 minuty temu, SzlugPL napisał:

40 linijka błąd

na świecie IridiumSkyblock ma być wszystko dozwolone i fly ma działać i ma przewracać po teleportacji a na świecie world ma być wyłącozne fly i czas wyświetlany ma zniknąć. może teraz będzie ci łatwiej ogarnąć :D

a no player na loop-player

options:
	world: "swiat"
command /latanie [<text="gui">]:
	trigger:
		player's world is {@world}
		if arg 1 is "gui":
			open chest with 1 rows named "&8» &6Fly &8«" to player
			format slot 0 of player with 1 feather named "&8» &c10 minut &8«" with lore "&8• &9Koszt: &c20 zlota" to close then run [make player execute command "latanie 1"]
			format slot 1 of player with 1 feather named "&8» &c30 minut &8«" with lore "&8• &9Koszt: &c60 zlota" to close then run [make player execute command "latanie 2"]
		if arg 1 is "1":
			if player has 20 gold ingot:
				remove 20 gold ingot from the player's inventory
				set {fly::timer::%player%} to 10 minutes
				allow flight to the player
				send "&8• &3» &6Fly zostal &aaktywowany &8(&c10 minut&8)" to the player
			else:
				send "&8• &4&lBlad: &cNie posiadasz 20 zlota" to the player
		if arg 1 is "2":
			if player has 60 gold ingot:
				remove 60 gold ingot from the player's inventory
				set {fly::timer::%player%} to 30 minutes
				allow flight for player
				send "&8• &3» &6Fly zostal &aaktywowany &8(&c30 minut&8)" to the player
			else:
				send "&8• &4&lBlad: &cNie posiadasz 60 zlota" to the player

on teleport:
	player's world is {@world}
	if {fly::timer::%player%} is set:
		allow flight for player
every seconds:
	loop all players:
		loop-player's world is {@world}
		if {fly::timer::%loop-player%} is set:
			remove 1 second from {fly::timer::%loop-player%}
			if {fly::timer::%loop-player%} <= 0 second:
				clear {fly::timer::%loop-player%}
				disallow flight for loop-player
				send "&8• ◄ &4Czas sie skonczyl &8► •" to the loop-player
			else:
				if flight mode of loop-player is false:
					allow flight for loop-player
				set action bar of loop-player to "&cPozostalo: &a%{fly::timer::%loop-player%}%"

 

Odnośnik do komentarza
https://skript.pl/temat/38786-problem-z-skriptem/#findComment-244723
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ę...