Cześć
Postanowiłem przedstawić nowe enchanty w skript z addonu TuSke
Aby zacząć tworzenie enchantu musimy dodać wyrażenie:
register a new custom enchantment with id name "<nazwa enchantu>"
np:
register a new custom enchantment with id name "Siekierka"
Bardzo podobnie do robienia receptur
Następnie dodajemy maksymalny poziom danego enchantu:
set max level of <nazwa enchantu> to <maksymalny level>
np:
set max level of Siekierka to 3
Następnie dodajemy szanse na zenchantowanie przedmiotu:
Skala 1 - 5
1 = Rzadko
5 = Często
set rarity of <nazwa enchantu> to <szansa 1-5>
np:
set rarity of Siekierka to 1
Następnie wybieramy przedmioty jakie mają być enchantowane na nowy enchant:
set accepted items for Siekierka to "Axes" and "Pickaxes"
Dostępne przedmioty:
Narzędzia: Axes, Pickaxes, Shovels, Swords
Zbroja: Helmets, Chestplates, Leggings, Boots
Wszystkie: Helmets, Chestplates, Leggings, Boots, Pickaxes, Axes, Shovels, Bow, Fishing Rod
Następnie wybieramy czy ten nowy enchant może występować w enchancie
set enabled for <nazwa enchantu> to <true/false>
np:
set enabled for Siekierka to true
Domyślnie jest to false więc musicie pamiętać aby go włączyć
Ostatecznie można jeszcze dodać "konflikty" dla tego enchantu
set conflicts for <nazwa enchantu> to <nazwa konfliktu enchantu>
np:
set conflicts for Siekierka to Sharpness #Nie sprawdzałem więc nie wiem czy będzie działało
Ostatecznie wszystko powinno wyglądać tak:
on load:
register a new custom enchantment with id name "Siekierka"
set {_e} to "Siekierka" parsed as custom enchantment #Dla ulatwienia
set max level of {_e} to 3
set rarity of {_e} to 1
set accepted items for {_e} to "Axes" or "Pickaxes"
set lore name of {_e} to "Siekierkowo"
set enabled for {_e} to true
Aby wszystko działało należy zrestartować serwer lub użyć:
(w jakiejś komendzie/evencie)
reload all custom enchantments
Ale co to za enchant który nie może nic robić ;/
Na szczęście mamy to:
if <przedmiot> has custom enchantment <nazwa enchantu>:
np:
if player's tool has custom enchantment Siekierka:
Sprawdzanie poziomu enchantu:
level of custom enchantment <nazwa enchantu> of <przedmiot>
np:
set {_level} to level of custom enchantment Siekierka of player's tool
Dziękuje za przeczytanie poradnika iwg
Jeżeli ktoś miał by coś więcej do zaoferowania na ten temat prosiłbym o kontakt w pw albo pod tematem