Skocz do zawartości
  • 0

skrypt na cuboid


SpokocukierkiPL
 Udostępnij

Pytanie

12 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
8 minut temu, SpokocukierkiPL napisał:

hej zrobi ktos lub zna skrypt na cuboid jak sie postawi na chunku byle gdzie tylko zeby bylo na chunku 1 to ten chunk jest zabezpieczony

on break:
	if player is not op:
		if {protected::chunks::*} contains chunk at event-block:
			cancel event
			send "&cNie mozesz tutaj budowac!" to player
	else:
		if event-block is sponge:
			remove chunk at event-block from {protected::chunks::*}
		
on place:
	if event-block is not sponge:
		if player is not op:
			if {protected::chunks::*} contains chunk at event-block:
				cancel event
				send "&cNie mozesz tutaj budowac!" to player
	else:
		if {protected::chunks::*} contains chunk at event-block:
			cancel event
			send "&cTen chunk jest już chroniony!" to player
		else:
			add chunk at event-block to {protected::chunks::*}
			send "&aTen chunk od teraz bedzie chroniony!" to player

Sprawdź czy wszystko działa, tylko sprawdziłem pod kątem błędów.

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

  • 0
2 minuty temu, Kormic napisał:
on break:
	if player is not op:
		if {protected::chunks::*} contains chunk at event-block:
			cancel event
			send "&cNie mozesz tutaj budowac!" to player
	else:
		if event-block is sponge:
			remove chunk at event-block from {protected::chunks::*}
		
on place:
	if event-block is not sponge:
		if player is not op:
			if {protected::chunks::*} contains chunk at event-block:
				cancel event
				send "&cNie mozesz tutaj budowac!" to player
	else:
		if {protected::chunks::*} contains chunk at event-block:
			cancel event
			send "&cTen chunk jest już chroniony!" to player

Sprawdź czy wszystko działa, tylko sprawdziłem pod kątem błędów.

a da rade dodawanie i usuwanie graczy i komenda zeby dal ten blok terenu i nzawa

to tak jakby ten protection stones tylko chce na chunk i te inen komendy ze kto postwi to jego wlasnosc

 

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

  • 0
7 minut temu, SpokocukierkiPL napisał:

a da rade dodawanie i usuwanie graczy i komenda zeby dal ten blok terenu i nzawa

 

on break:
	if {protected::chunks::%chunk at event-block%::*} doesn't contain player:
		if {protected::chunks::*} contains chunk at event-block:
			cancel event
			send "&cNie mozesz tutaj budowac!" to player
	else:
		if event-block is sponge:
			remove chunk at event-block from {protected::chunks::*}
			send "&cTen region juz nie jest chroniony!"
		
on place:
	if {protected::chunks::*} contains chunk at event-block:
		if event-block is not sponge:
			if {protected::chunks::%chunk at event-block%::*} doesn't contain player:
				cancel event
				send "&cNie mozesz tutaj budowac!" to player
		else:
			if {protected::chunks::*} contains chunk at event-block:
				cancel event
				send "&cTen chunk jest już chroniony!" to player
			else:
				add chunk at event-block to {protected::chunks::*}
				send "&aTen chunk od teraz bedzie chroniony!" to player
				
command /chunkdodaj [<player>]:
	trigger:
		if player is op:
			if {protected::chunks::*} contains chunk at player:
				add arg 1 to {protected::chunks::%chunk at player%::*}
			else:
				send "&cTen chunk nie jest chroniony!" to player	
				
command /chunkusun [<player>]:
	trigger:
		if player is op:
			if {protected::chunks::*} contains chunk at player:
				remove arg 1 from {protected::chunks::%chunk at player%::*}
			else:
				send "&cTen chunk nie jest chroniony!" to player

Spróbuj z tym, jeśli coś nie będzie działało, daj znać.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
7 minut temu, SpokocukierkiPL napisał:

a nazwa tej gąbki

Jaka nazwa? Co chcesz konkretnie osiągnąć?

Przy okazji, wysyłam nieco poprawioną wersję:

on break:
	if {protected::chunks::%chunk at event-block%::*} doesn't contain player:
		if {protected::chunks::*} contains chunk at event-block:
			cancel event
			send "&cNie mozesz tutaj budowac!" to player
	else:
		if event-block is sponge:
			remove chunk at event-block from {protected::chunks::*}
			send "&cTen region juz nie jest chroniony!"
		
on place:
	if {protected::chunks::*} contains chunk at event-block:
		if event-block is not sponge:
			if {protected::chunks::%chunk at event-block%::*} doesn't contain player:
				cancel event
				send "&cNie mozesz tutaj budowac!" to player
		else:
			if {protected::chunks::*} contains chunk at event-block:
				cancel event
				send "&cTen chunk jest już chroniony!" to player
			else:
				add chunk at event-block to {protected::chunks::*}
				send "&aTen chunk od teraz bedzie chroniony!" to player
				
command /chunkdodaj [<player>]:
	trigger:
		if player is op:
			if {protected::chunks::*} contains chunk at player:
				if {protected::chunks::%chunk at player%::*} contains arg 1:
					add arg 1 to {protected::chunks::%chunk at player%::*}
				else:
					send "&cTen gracz juz jest dodany do tego chunku!" to player
			else:
				send "&cTen chunk nie jest chroniony!" to player	
				
command /chunkusun [<player>]:
	trigger:
		if player is op:
			if {protected::chunks::*} contains chunk at player:
				if {protected::chunks::%chunk at player%::*} contains arg 1:
					remove arg 1 from {protected::chunks::%chunk at player%::*}
				else:
					send "&cTen gracz nie jest dodany do tego chunku!" to player
			else:
				send "&cTen chunk nie jest chroniony!" to player

 

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

  • 0
1 minutę temu, SpokocukierkiPL napisał:

ale np mam gąbke i stawiam i nic

A, dobra, już widzę o co biega. W 'on place' musisz sobie zamienić 'if {protected::chunks::*} contains chunk at event-block' na 'if {protected::chunks::*} doesn't contain chunk at event-block'.

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

  • 0
10 minut temu, SpokocukierkiPL napisał:

nie kumam sr xD

on break:
	if {protected::chunks::*} contains chunk at event-block:
		if {protected::chunks::%chunk at player%::*} contains player:
			if event-block is sponge:
				remove chunk at event-block from {protected::chunks::*}
				send "&cTen region juz nie jest chroniony!"
		else:
			cancel event
			send "&cNie mozesz tutaj budowac!" to player
		
on place:
	if {protected::chunks::*} doesn't contain chunk at event-block:
		if event-block is sponge:
			add chunk at event-block to {protected::chunks::*}
			send "&aTen chunk od teraz bedzie chroniony!" to player
	else:
		if {protected::chunks::%chunk at player%::*} contains player:
			if event-block is sponge:
				cancel event
				send "&cTen chunk jest juz chroniony!"
		else:
			cancel event
			send "&cNie mozesz tutaj budowac!" to player
				
command /chunkdodaj [<player>]:
	trigger:
		if {protected::chunks::%chunk at player%::*} contains player:
			if {protected::chunks::*} contains chunk at player:
				if {protected::chunks::%chunk at player%::*} contains arg 1:
					add arg 1 to {protected::chunks::%chunk at player%::*}
				else:
					send "&cTen gracz juz jest dodany do tego chunku!" to player
			else:
				send "&cTen chunk nie jest chroniony!" to player	
				
command /chunkusun [<player>]:
	trigger:
		if {protected::chunks::%chunk at player%::*} contains player:
			if {protected::chunks::*} contains chunk at player:
				if {protected::chunks::%chunk at player%::*} contains arg 1:
					remove arg 1 from {protected::chunks::%chunk at player%::*}
				else:
					send "&cTen gracz nie jest dodany do tego chunku!" to player
			else:
				send "&cTen chunk nie jest chroniony!" to player
				
command /dajcuboid:
	trigger:
		give 1 of sponge to player

Wszystko powinno być okej. Sprawdź ponownie. Nazwę mógłbym zrobić, ale skrypt musiałby być jeszcze bardziej rozbudowany.

Edytowane przez Kormic
Odnośnik do komentarza
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.

 Udostępnij

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

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