Skocz do zawartości
  • 0

Netherite na diax


Pytanie

ktos napisze mi skrypt na kommende /kowal ktory wymienia mi netheritowy item w lapce na diax ale zeby wszystko zostalo enchanty... (tak jak na rapy.pl boxpvp kowal)

Mam takie cos ale nie dziala:
 

command /kowal:
    permission: skript.example.kowal
    trigger:
set {_i} to player's held item
replace "netherite chestplate" with "diamond chestplate" in {_i}
set {_ench} to level of protection of player's held item
set {_ench2} to level of unbreaking of player's held item

give player {_i} with "protection %{_ench}%" parsed as enchantment type and "punbreaking %{_ench2}%" parsed as enchantment type
remove player's held item from player

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/
Udostępnij na innych stronach

Rekomendowane odpowiedzi

  • 0
command /kowal:
	permission: skript.example.kowal
	trigger:
		set {_i} to player's held item
		if {_i} is netherite chestplate:
			set {_ench::*} to enchantments of {_i}
			give player diamond chestplate with "%{_ench::*}%" parsed as enchantment type 
			remove player's held item from player

a moze tak?

Edytowane przez devyy
Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-332868
Udostępnij na innych stronach

  • 0
13 godzin temu, xMarek_Mareczek napisał:

ktos napisze mi skrypt na kommende /kowal ktory wymienia mi netheritowy item w lapce na diax ale zeby wszystko zostalo enchanty... (tak jak na rapy.pl boxpvp kowal)

Mam takie cos ale nie dziala:
 

command /kowal:
    permission: skript.example.kowal
    trigger:
set {_i} to player's held item
replace "netherite chestplate" with "diamond chestplate" in {_i}
set {_ench} to level of protection of player's held item
set {_ench2} to level of unbreaking of player's held item

give player {_i} with "protection %{_ench}%" parsed as enchantment type and "punbreaking %{_ench2}%" parsed as enchantment type
remove player's held item from player

widze że powtórzyłeś temat mam taki sk podeśle ci jak siąde do kompa

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-332872
Udostępnij na innych stronach

  • 0

jest jeden error : Line 7 'diamond chestplate with "%{_ench::*}%" parsed as enchantment type' can't be added to a player because the former is neither an item type,an inventory nor an experience point
Line: give player diamond chestplate with "%{_ench::*}%" parsed as enchantment type

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-332877
Udostępnij na innych stronach

  • 0
command /kowal: 
	permission: skript.example.kowal 
	trigger: 
		set {_i} to player's held item 
		if {_i} is netherite chestplate: 
			set {_ench::*} to enchantments of {_i} 
			give player diamond chestplate with {_ench::*}
			remove player's held item from player

a to?

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-332878
Udostępnij na innych stronach

  • 0
command /kowal:
	permission: skript.example.kowal
	trigger:
		set {_i} to player's tool
		{_i} is netherite chestplate
		set player's tool to (item amount of player's tool - 1) of player's tool
		set {_ench::*} to enchantments of {_i}
		set {_} to diamond chestplate
		loop {_ench::*}:
			enchant {_} with loop-value
		give {_} to player

 

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-332925
Udostępnij na innych stronach

  • 0

To robisz wszystko tak samo

{_i} is netherite chestplate

Zamieniasz na if tabujesz o 1

if {_i} is netherite chestplate:

i zmieniasz netherite chestplate na inne zbroje

potem nizej give diamond chestplate zamieniasz na np helmet

Edytowane przez Fendi
Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-332951
Udostępnij na innych stronach

  • 0

bo nie wiesz jak poprawnie składnie ustawic

po else lub if na koncu linijki dajesz : a potem przesuwasz kod o 1 taba

Cofasz taba dopiero gdy dochodzisz do kolejnego warunku

if {_i} is netherite chestplate:

(tab} set player's tool (dalszy kod)

else if {_i} is netherite leggins:

{tab} set player's tool to (dalszy kod)

 

Juz ci to naprawie, prosze

 

Edytowane przez Fendi
Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-333009
Udostępnij na innych stronach

  • 0
command /kowal:
	permission: skript.example.kowal
	trigger:
		set {_i} to player's tool
		{_i} is any netherite armor
		set {_} to player's tool
		set player's tool to (item amount of player's tool - 1) of player's tool
		set {_ench::*} to enchantments of {_i}
		loop {_ench::*}:
			enchant {_} with loop-value
		give {_} to player

prosze
Edit naprawione fendi

Edytowane przez devyy
Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-333015
Udostępnij na innych stronach

  • 0
5 minut temu, devyy napisał:
command /kowal:
	permission: skript.example.kowal
	trigger:
		set {_i} to player's tool
		{_i} is any netherite armor
		set player's tool to (item amount of player's tool - 1) of player's tool
		set {_ench::*} to enchantments of {_i}
		set {_} to diamond chestplate
		loop {_ench::*}:
			enchant {_} with loop-value
		give {_} to player

prosze

Teraz przecież zrobiłeś to co było na początku , nie rozumiem po co skoro już wcześniej autor wątku napisał swoją nie do końca działająca ale bardziej rozbudowana wersje

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-333017
Udostępnij na innych stronach

  • 0
6 minut temu, Fendi napisał:

Teraz przecież zrobiłeś to co było na początku , nie rozumiem po co skoro już wcześniej autor wątku napisał swoją nie do końca działająca ale bardziej rozbudowana wersje

skróciłem twoją wersje

Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-333019
Udostępnij na innych stronach

  • 0

Pewny że to działa ? Nie widzę jakoś zamieniania takiego samego elementu z nethe na diax

Aktualnie z tego co widzę to skrypt ci daje enchanty takie jakie miałeś wcześniej xD

Edytowane przez Fendi
Odnośnik do komentarza
https://skript.pl/temat/55046-netherite-na-diax/#findComment-333033
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ę...