Skocz do zawartości
  • 0

Zabezpieczenie


Vipper

Pytanie

Witam potrzebuję skryptu który miał by polegać na tym że gracz o nicku np "test" postawi blok który ma nazwę "blok" lore "coś tam" to w odległości 40x40 od tego bloku tylko ten gracz "test" może zabijać zwierzęta a inni nie mogą 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/
Udostępnij na innych stronach

14 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
8 minut temu, Vipper napisał:

Witam potrzebuję skryptu który miał by polegać na tym że gracz o nicku np "test" postawi blok który ma nazwę "blok" lore "coś tam" to w odległości 40x40 od tego bloku tylko ten gracz "test" może zabijać zwierzęta a inni nie mogą 

Proszę.

on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	attacker's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		cancel event
	attacker's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		cancel event
	attacker's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283816
Udostępnij na innych stronach

  • 0
Godzinę temu, Kormic napisał:

Proszę.




on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	attacker's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		cancel event
	attacker's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		cancel event
	attacker's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		cancel event

 

co do nicku to był przykład . dało by się się żeby nick wczytywało automatycznie czyli każdy który ma ten blok to może mieć to zabezpieczenie

 

 

Skrypt niestety nie działa tak jak powinien po postawieniu bloku na całym świece gracz który nie ma nicku "test" nie może zabijać zwierząt 

Godzinę temu, Kormic napisał:

Proszę.



on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	attacker's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		cancel event
	attacker's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		cancel event
	attacker's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		cancel event

 

 

Edytowane przez Vipper
Glicz

Łączę posty,

Notatka dodana przez Glicz

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283817
Udostępnij na innych stronach

  • 0
5 minut temu, Vipper napisał:

Skrypt niestety nie działa tak jak powinien po postawieniu bloku na całym świece gracz który nie ma nicku "test" nie może zabijać zwierząt 

 

A dobra, mój błąd. W warunkach w ostatnich sześciu linijkach zamień 'is not between' na 'is between'.

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283822
Udostępnij na innych stronach

  • 0
4 minuty temu, Kormic napisał:

A dobra, mój błąd. W warunkach w ostatnich sześciu linijkach zamień 'is not between' na 'is between'.

Nadal ten sam problem nawet jak nie postawie bloku to na całym świecie tylko gracz test może zabijać zwierzęta 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283823
Udostępnij na innych stronach

  • 0
Teraz, Vipper napisał:

Nadal ten sam problem nawet jak nie postawie bloku to na całym świecie tylko gracz test może zabijać zwierzęta 

Pokaż twój kod oraz wyczyść zmienną.

command /test:
	trigger:
		clear {safeHuntingArea}    

 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283824
Udostępnij na innych stronach

  • 0
on place:
    player's name is "VipperYT"
    name of player's tool is "&6blok"
    lore of player's tool is "&cgriff"
    set {safeHuntingArea} to event-block's location
    
on damage:
    victim is not a monster
    victim is not a player
    attacker is a player
    {safeHuntingArea} is set
    attacker's name is not "VipperYT"
    set {_1} and {_2} to {safeHuntingArea}
    add 40 to (x-loc of {_1}) and (z-loc of {_1})
    set y-loc of {_1} to 256
    remove 40 from (x-loc of {_2}) and (z-loc of {_2})
    set y-loc of {_2} to 0
    attacker's x-loc is between x-loc of {_1} and x-loc of {_2}:
        cancel event
    attacker's y-loc is between y-loc of {_1} and y-loc of {_2}:
        cancel event
    attacker's y-loc is between z-loc of {_1} and z-loc of {_2}:
        cancel event

Co do bloku to jest to Jukebox a i jeszcze tak jak wyżej pisałem czy da się żeby każdy gracz który postawi ten blok taka opcja była 

Edytowane przez Vipper
Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283825
Udostępnij na innych stronach

  • 0
2 minuty temu, Vipper napisał:

Co do bloku to jest to JukeBlok a i jeszcze tak jak wyżej pisałem czy da się żeby każdy gracz który postawi ten blok taka opcja była 

Najpierw zajmijmy się tym kodem.

Zauważyłem pewien poważny problem z moim kodem. Już powinno działać.

on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	set {_t} to true
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		clear {_t}
	victim's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		clear {_t}
	victim's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		clear {_t}
	{_t} is set
	cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283826
Udostępnij na innych stronach

  • 0
10 minut temu, Kormic napisał:

Najpierw zajmijmy się tym kodem.

Zauważyłem pewien poważny problem z moim kodem. Już powinno działać.




on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	set {_t} to true
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		clear {_t}
	victim's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		clear {_t}
	victim's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		clear {_t}
	{_t} is set
	cancel event

 

Niestety nie działa każdy może zabijać zwierzęta

Edytowane przez Vipper
Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283830
Udostępnij na innych stronach

  • 0
15 minut temu, Vipper napisał:

Niestety nie działa każdy może zabijać zwierzęta

Zauważyłem, że pomyliłem koordynaty.

on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	set {_t} to true
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		victim's y-loc is not between y-loc of {_1} and y-loc of {_2}
		victim's z-loc is not between z-loc of {_1} and z-loc of {_2}
		clear {_t}
	{_t} is set
	cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283839
Udostępnij na innych stronach

  • 0
6 minut temu, Kormic napisał:

Zauważyłem, że pomyliłem koordynaty.


on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	set {_t} to true
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		victim's y-loc is not between y-loc of {_1} and y-loc of {_2}
		victim's z-loc is not between z-loc of {_1} and z-loc of {_2}
		clear {_t}
	{_t} is set
	cancel event

 

Nadal ten sam problem gracz nie mający nicku test nie może zabijać zwierzą na całej mapie :(

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283841
Udostępnij na innych stronach

  • 0
9 minut temu, Vipper napisał:

Nadal ten sam problem gracz nie mający nicku test nie może zabijać zwierzą na całej mapie :(

Ehh...

on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		stop
	victim's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		stop
	victim's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		stop
	cancel event

Nie zapomnij o wyczyszczeniu zmiennej oraz postawieniu na nowo tego bloku.

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283843
Udostępnij na innych stronach

  • 0
5 minut temu, Kormic napisał:

Ehh...


on place:
	player's name is "test"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		stop
	victim's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		stop
	victim's y-loc is not between z-loc of {_1} and z-loc of {_2}:
		stop
	cancel event

Nie zapomnij o wyczyszczeniu zmiennej oraz postawieniu na nowo tego bloku.

Tak zawsze resetuje. No ale nadal nie działa teraz po postawieniu bloku każdy może zabijać zwierzęta 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283844
Udostępnij na innych stronach

  • 0
9 minut temu, Vipper napisał:

Tak zawsze resetuje. No ale nadal nie działa teraz po postawieniu bloku każdy może zabijać zwierzęta 

Jak każdy? Z kim ty to testujesz?

Pokaż jeszcze raz twój kod.

EDIT:

Nadal był źle wpisany koordynat.

on place:
	player's name is "Kormic"
	name of player's tool is "&6blok"
	lore of player's tool is "&ccoś tam"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "test"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		stop
	victim's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		stop
	victim's z-loc is not between z-loc of {_1} and z-loc of {_2}:
		stop
	cancel event

 

Edytowane przez Kormic
Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283845
Udostępnij na innych stronach

  • 0
on place:
	player's name is "VipperYT"
	name of player's tool is "&6blok"
	lore of player's tool is "&cgriff"
	set {safeHuntingArea} to event-block's location
	
on damage:
	victim is not a monster
	victim is not a player
	attacker is a player
	{safeHuntingArea} is set
	attacker's name is not "VipperYT"
	set {_1} and {_2} to {safeHuntingArea}
	add 40 to (x-loc of {_1}) and (z-loc of {_1})
	set y-loc of {_1} to 256
	remove 40 from (x-loc of {_2}) and (z-loc of {_2})
	set y-loc of {_2} to 0
	victim's x-loc is not between x-loc of {_1} and x-loc of {_2}:
		stop
	victim's y-loc is not between y-loc of {_1} and y-loc of {_2}:
		stop
	victim's z-loc is not between z-loc of {_1} and z-loc of {_2}:
		stop
	cancel event

Ok teraz to co mam powyżej działa . Tylko jak się zniszczy blok to nadal to łapie że zabijać nie można mobów w obrębie tych 40 kratek. Można by było dodać opcje że jak niszczysz ten blok to automatycznie usuwa to zabezpieczenie a kolejna opcja to żeby nie było na dany nick tylko żeby każdy kto postawi ten jukebox nazwany tak jak pisałem było to zabezpieczenie 

Odnośnik do komentarza
https://skript.pl/temat/45102-zabezpieczenie/#findComment-283846
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.

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

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