Skocz do zawartości
  • 0

Skrypt na blokowanie diax setów


Pytanie

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
function check(p: player) :: boolean:
	set {_c} to false
	if type of {_p}'s tool is diamond sword:
		set {_c} to true
		send "Nie mozesz bic tym mieczem!" to {_p}
	if type of {_p}'s helmet is diamond helmet:
		set {_c} to true
		drop {_p}'s helmet at {_p}
	if type of {_p}'s chestplate is diamond chestplate:
		set {_c} to true
		drop {_p}'s helmet at {_p}
	if type of {_p}'s leggings is diamond leggings:
		set {_c} to true
		drop {_p}'s helmet at {_p}
	if type of {_p}'s boots is diamond boots:
		set {_c} to true
		drop {_p}'s helmet at {_p}
	return {_c}
command /diaxset [<text>]:
	permission: *
	trigger:
		if arg is "on":
			set {diax} to true
			send "wlaczono"
		if arg is "off":
			set {diax} to false
			send "wylaczono"
on craft:
	if {diax} is true:
		stop
	if event-item is diamond helmet or diamond chestplate or diamond leggings or diamond boots:
		cancel event
on damage:
	if {diax} is true:
		stop
	if type of attacker's tool is diamond sword:
		if check(attacker) is true:
			cancel event
		if check(victim) is true:
			cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/38727-skrypt-na-blokowanie-diax-set%C3%B3w/#findComment-244116
Udostępnij na innych stronach

  • 0
command /diaxset [<text>]:
	trigger:
		if arg-1 is "on":
			register new shaped recipe for diamond helmet using diamond, diamond, diamond, diamond, air, diamond, air, air, air
			register new shaped recipe for diamond chestplate using diamond, air, diamond, diamond, diamond, diamond, diamond, diamond, diamond
			register new shaped recipe for diamond leggings using diamond, diamond, diamond, diamond, air, diamond, diamond, air, diamond
			register new shaped recipe for diamond boots using air, air, air, diamond, air, diamond, diamond, air, diamond
			send "&aWłączyłeś diamentowe zbroje!"
		else if arg-1 is "off":
			register new shaped recipe for air using diamond, diamond, diamond, diamond, air, diamond, air, air, air
			register new shaped recipe for air using diamond, air, diamond, diamond, diamond, diamond, diamond, diamond, diamond
			register new shaped recipe for air using diamond, diamond, diamond, diamond, air, diamond, diamond, air, diamond
			register new shaped recipe for air using air, air, air, diamond, air, diamond, diamond, air, diamond
			send "&cWyłączyłeś diamentowe zbroje!"
		else:
			send "&cPoprawne użycie: /diaxset on/off"

 

Odnośnik do komentarza
https://skript.pl/temat/38727-skrypt-na-blokowanie-diax-set%C3%B3w/#findComment-244117
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ę...