Skocz do zawartości
  • 0

Preblem z Działkami


Happy #noSkilL
 Udostępnij

Pytanie

Witam ma taki problem ze mam taki kawałek skryptu...

on place black glazed terracotta:
	loop {cub::*}:
		if distance between player and loop-value is more than 150:
			add location of block to {cub::%player%}
			set {cuboids.%player%} to true
			set {robiecuba.%player%} to true
			wait 1 ticks
			make console execute command "pex user %player% add worldguard.*"
			wait 1 ticks
			make console execute command "pex user %player% add worldedit.*"
			execute player command "//pos1"
			wait 1 ticks
			execute player command "//pos2"
			wait 1 ticks
			execute player command "//expand 30 north"
			wait 1 ticks
			execute player command "//expand 30 east"
			wait 1 ticks
			execute player command "//expand 30 west"
			wait 1 ticks
			execute player command "//expand 30 south"
			wait 1 ticks
			execute player command "//expand 256 up"
			wait 1 ticks
			execute player command "//expand 256 down"
			wait 1 ticks
			execute player command "rg define cub%player%"
			wait 1 ticks
			execute player command "rg addowner cub%player% %player%"
			wait 1 ticks
			execute player command "rg flag cub%player% greeting &8>> &7Wchodzisz na teren gracza &a%player%"
			wait 1 ticks
			execute player command "rg flag cub%player% farewell &8>> &7Opuszczasz teren gracza &c%player%"
			wait 1 ticks
			make console execute command "pex user %player% remove worldguard.*"
			wait 1 ticks
			make console execute command "pex user %player% remove worldedit.*"
			wait 1 ticks
			set {robiecuba.%player%} to false
			loop 100 times:
				broadcast ""
			broadcast "&7Gracz &a%player% &7stworzył działke &6VIP'a!"
			broadcast "          &aPogratuluj mu! :)"
			broadcast ""
			broadcast ""

Ma to działać na takiej zasadzie że gdy postawie blok to tworzy się tam cuboid i od tego bloku w regionie 150 kratek nie da się zrobić innego cuba... niestety nie działa to tak jak ja to chciałem : _ nie ma errorów.

Odnośnik do komentarza
Udostępnij na innych stronach

3 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
37 minut temu, Happy #noSkilL napisał:

Witam ma taki problem ze mam taki kawałek skryptu...


on place black glazed terracotta:
	loop {cub::*}:
		if distance between player and loop-value is more than 150:
			add location of block to {cub::%player%}
			set {cuboids.%player%} to true
			set {robiecuba.%player%} to true
			wait 1 ticks
			make console execute command "pex user %player% add worldguard.*"
			wait 1 ticks
			make console execute command "pex user %player% add worldedit.*"
			execute player command "//pos1"
			wait 1 ticks
			execute player command "//pos2"
			wait 1 ticks
			execute player command "//expand 30 north"
			wait 1 ticks
			execute player command "//expand 30 east"
			wait 1 ticks
			execute player command "//expand 30 west"
			wait 1 ticks
			execute player command "//expand 30 south"
			wait 1 ticks
			execute player command "//expand 256 up"
			wait 1 ticks
			execute player command "//expand 256 down"
			wait 1 ticks
			execute player command "rg define cub%player%"
			wait 1 ticks
			execute player command "rg addowner cub%player% %player%"
			wait 1 ticks
			execute player command "rg flag cub%player% greeting &8>> &7Wchodzisz na teren gracza &a%player%"
			wait 1 ticks
			execute player command "rg flag cub%player% farewell &8>> &7Opuszczasz teren gracza &c%player%"
			wait 1 ticks
			make console execute command "pex user %player% remove worldguard.*"
			wait 1 ticks
			make console execute command "pex user %player% remove worldedit.*"
			wait 1 ticks
			set {robiecuba.%player%} to false
			loop 100 times:
				broadcast ""
			broadcast "&7Gracz &a%player% &7stworzył działke &6VIP'a!"
			broadcast "          &aPogratuluj mu! :)"
			broadcast ""
			broadcast ""

Ma to działać na takiej zasadzie że gdy postawie blok to tworzy się tam cuboid i od tego bloku w regionie 150 kratek nie da się zrobić innego cuba... niestety nie działa to tak jak ja to chciałem : _ nie ma errorów.

Kiedyś miałem ten sam problem. Zmienna {cub::*} jest pusta, więc jej nie loopuje. Dodaj takie coś i zadziała:

command /potemusunto:
	trigger:
		add location of player to {cub::*}

Wpisz komende i usuń to. A i jeszcze na końcu kodu: exit loop, bo kod wykona ci się tyle razy ile informacji jest w {cub::*} :)

Edytowane przez KrejzolekPRO
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

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

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