Skocz do zawartości
  • 0

Efekt protection


lizz0r
 Udostępnij

Pytanie

16 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on damage:
  set {_EPF} to 0
  loop 4 times:
    lore of victim's helmet is "&aProtection %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&aProtection %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&aProtection %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&aProtection %loop-number%":
      add loop-number to {_EPF}
    damage cause is fall:
      lore of victim's boots is "&aFeather Falling %loop-number%":
        add loop-number to {_EPF}
  set damage to damage * (1 - {_EPF}/25)


  

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@PoweredDragon Zrobiłem takie coś i nie działa, dobrze zrobiłem ?

on damage:
  set {_EPF} to 0
  loop 4 times:
    lore of victim's helmet is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
  set damage to damage * (1 - {_EPF}/25)
command /helm:
	trigger:
		give diamond helmet named "Elo" with lore "&4Obrona 18" to player

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Tak, dobrze zrobiłeś. Ten hełm powinien działać jak hełm z prot 18 :) Tylko trzeba lekko zmodyfikować przelicznik, bo prot 18 nie jest uwzględniony w skrypcie pierwotnym

on damage:
  set {_EPF} to 0
  loop 20 times:
    lore of victim's helmet is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
  set damage to damage * (1 - {_EPF}/100)

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
on damage:
  set {_EPF} to 0
  loop 20 times:
    lore of victim's helmet is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    {_EPF} < 20:
      set damage to damage * (1 - {_EPF}/25)
      stop
    {_EPF} < 40:
      set damage to damage * (1 - {_EPF}/50)
      stop
    {_EPF} < 60:
      set damage to damage * (1 - {_EPF}/75)
      stop
    {_EPF} < 80:
      set damage to damage * (1 - {_EPF}/100)
      stop

Teraz spróbuj

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Wszedłem na wiki, żeby sprawdzić przelicznik; wynika z tego, że:

Using this method, a player could give themselves, for example, 
a full set of diamond armor with a Protection V enchantment on every piece. 
Following the algorithm above, we find that, since Protection V has an EPF of 5, 
the armor will exactly reach the maximum EPF of 20 for all types of damage. 
Any higher Protection enchantments could be used to allow the cap to be reached with only one enchantment, 
rather than having a full set of enchanted armor, but would be wasted if all pieces shared the same level enchantment.

Czyli, że jeśli nakładamy na cały set proection > 5, to nic to nie zmieni, bo i tak już osiągniemy max redukcji obrażeń :v

 

Czyli ten skrypt:

on damage:
  set {_EPF} to 0
  loop 20 times:
    lore of victim's helmet is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    {_EPF} <= 20:
      set damage to damage*(1 - {_EPF}/25)
      stop
     set damage to damage*0.2

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Dać radę da, gdzieś jest błąd, którego w kodzie nie ma k_k

 

on damage:
  set {_EPF} to 0
  loop 20 times:
    lore of victim's helmet is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    loop 4 times:
      set {_Q::%loop-number%} to {_EPF}/25
      set {_Q::%loop-number%} to {_Q::%loop-number%}/loop-number
      set {_Q::%loop-number%} to 1-{_Q::%loop-number%}
      set {_eEPF} to 20*loop-number
    {_EPF} < {_eEPF}:
      set damage to damage * {_Q::%loop-number%}
      stop

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
on damage:
  set {_EPF} to 0
  loop 20 times:
    lore of victim's helmet is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's leggings is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's chestplate is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
    lore of victim's boots is "&4Obrona %loop-number%":
      add loop-number to {_EPF}
  loop 4 times:
    set {_Q::%loop-number%} to {_EPF}/25
    set {_Q::%loop-number%} to {_Q::%loop-number%}/loop-number
    set {_Q::%loop-number%} to 1-{_Q::%loop-number%}
    set {_eEPF} to 20*loop-number
    {_EPF} < {_eEPF}:
      set damage to damage * {_Q::%loop-number%}
      stop

 

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

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

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