Skocz do zawartości
  • 0

Pobieranie atrybutu attack damage


Pytanie

Jako attack damage pobiera wartosc 0. Jak mógłbym to naprawić?

 

on damage:
    set {_pldmg} to attacker's attack damage attribute
    if attacker is a player:
        if "%lore of victim's helmet%" or "%lore of victim's chestplate%" or "%lore of victim's leggings%" or "%lore of victim's boots%" contains "Pancerz":
            set {_value1} to tag "Defence" of nbt of victim's helmet
            set {_value2} to tag "Defence" of nbt of victim's chestplate
            set {_value3} to tag "Defence" of nbt of victim's leggings
            set {_value4} to tag "Defence" of nbt of victim's boots
            set {_value} to {_value1}+{_value2}+{_value3}+{_value4}
            set {_sum} to {_value}+100
            set {_def} to 100/{_sum}  
            broadcast {_pldmg}
            broadcast {_def}
            set {_total} to {_def}*{_pldmg}
            broadcast {_total}
            set {_total} to damage
Edytowane przez Erro
Odnośnik do komentarza
https://skript.pl/temat/54550-pobieranie-atrybutu-attack-damage/
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

  • 0

Chodziło o to?

on damage:
	set {_pldmg} to attacker's attack damage attribute
	if attacker is a player:
		if "%lore of victim's helmet%" or "%lore of victim's chestplate%" or "%lore of victim's leggings%" or "%lore of victim's boots%" contains "Pancerz":
			set {_value1} to tag "Defence" of nbt of victim's helmet
			set {_value2} to tag "Defence" of nbt of victim's chestplate
			set {_value3} to tag "Defence" of nbt of victim's leggings
			set {_value4} to tag "Defence" of nbt of victim's boots
			set {_value} to {_value1}+{_value2}+{_value3}+{_value4}
			set {_sum} to {_value}+100
			set {_def} to 100/{_sum}
			broadcast {_pldmg}
			broadcast {_def}
			set {_total} to {_def}*{_pldmg}
			damage victim by {_total}

??

 

Odnośnik do komentarza
https://skript.pl/temat/54550-pobieranie-atrybutu-attack-damage/#findComment-330744
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ę...