Skocz do zawartości
  • 0

Problem z Mob Equip


DaWiHsS

Pytanie

Witam,
tworzę skrypt z "custom" mobami, i mam problem z ich ekwipunkiem.
Wiem, że mogę użyć teoretycznie np.:

(...)
equip last spawned with all leather armor
(...)

tylko co najlepsze zdarza mu się nie odpowiedzieć.
To jest wygodne rozwiązanie, racja, tylko że chciałbym każdy slot skonfigurować osobno, razem z enchantem, jak i dodać broń dla tego moba.

Z racji komendy spawnującej używam last spawned entity.

A kod aktualny prezentuje się tak: (testowy, na nie musi mieć permisji i opisu)

Spoiler

CustomMob.sk


command /TestSpawn <text>:
    trigger:
        spawn zombie above the targeted block
        set last spawned entity's display name to "szarlotka"
        if arg 1 is "L":
            equip last spawned entity with all leather armor
            give 1 wooden sword to last spawned entity
            message "Leather"
        if arg 1 is "I":
            equip last spawned entity with all iron armor
            give 1 iron sword to last spawned entity
            message "Iron"
        if arg 1 is "G":
            equip last spawned entity with all gold armor
            give 1 gold sword to last spawned entity
            message "Gold"
        if arg 1 is "D":
            equip last spawned entity with all Diamond armor
            give 1 Diamond sword to last spawned entity
            message "Diamond"

I ustawianie wybranych slotów zbroi: (działa tylko napierśnik)


set chestplate slot of the last spawned entity to a iron chestplate
set helmet slot of the last spawned entity to iron helmet
set boot slot of the last spawned entity to iron boot
set legging slot of the last spawned entity to iron leggins

Problem z tym, że nie dość, że nie dostaje żaden broni, to Żelazo, Złoto i Diament w ogóle nie dostają zbroi. (SS: https://imgur.com/a/VU8xtlI )

Jakieś pomysły? Inne nazwy? inny sposób?

I przy okazji, czy mogę w jakiś sposób ustawić obrażenia moba, np na 4 serduszka (8) czy tylko to by było przez (jeżeli w ogóle) broń i enchant broni?

Pozdrawiam
~DaWiHs

Odnośnik do komentarza
https://skript.pl/temat/30037-problem-z-mob-equip/
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

W międzyczasie mnie olśniło :D
syntaxy na equip:

Spoiler

# części zbroi:
set chestplate slot of the last spawned entity to a iron chestplate
set helmet slot of the last spawned entity to iron helmet
set boot slot of the last spawned entity to iron boots
set legging slot of the last spawned entity to iron leggings

# enchant zbroi:
enchant last spawned entity's legging with protection 3
enchant last spawned entity's boots with protection 2
enchant last spawned entity's chestplate with protection 1 
enchant last spawned entity's helmet with protection 3

# broń i enchant:
set last spawned entity's tool to iron sword
enchant last spawned entity's tool with sharpness 2

#	typ zbroi (leather|iron|...)
set chestplate slot of the player to a leather chestplate
set helmet slot of the player to iron helmet
set boot slot of the player to gold boots
set legging slot of the player to diamond leggings

#	czyli
#rodzaj: leather | iron | (gold|golden) | diamond | (chain|chainmail)
#typ: 	 helmet | chestplate | leggins | boots
#slot: 	 helmet slot | chestplate slot | legging slot | boot slot

enchant player's legging with blast protection 3
enchant player's boots with projectile protection 4
enchant player's chestplate with fire protection 2
enchant player's helmet with protection 1

#	czyli
# blast protection | projectile protection | fire protection | protection

#	broń, czyli ustawienie NARZĘDZIA stowrzenia
set player's tool to iron sword
enchant player's tool with sharpness 2

 

Na obrażenia nie wymyśliłem nic oprócz

on damage:
	victim is player
	attacker is zombie
	cancel event
	damage victim by 4 # 4 serduszka

tylko że to nie to o czym myślałem, bo przy śmierci gracz po prostu ginie a nie jest zabity przez moba, choć jeżeli już broń działa to można myśleć ;d

Dalej jednak nie wiem dla zbroi typu chain (kolczuga)

---EDIT

Pięć minut po odpowiedzi zrozumiałem prostą rzecz: nie umiem pisać xD
Chaim i chaimmail  zamiast
Chain i chainmail

Jeżeli nie ma innych opcji edycji obrażeń (też bez potek strenght) to w sumie można zamknąć temat, i zostawić jakby ktoś szukał pomocy ;d
Jakieś tagi w odpowiedziach można umieścić czy co tam administracja uzna za słuszne

Pozdrawiam
~ DaWiHs (metoda kaczki przy kodowaniu jest przydatna xD)

Edytowane przez DaWiHsS
Oświecenie | Oświetlenie | pisać nie umiem xD
Odnośnik do komentarza
https://skript.pl/temat/30037-problem-z-mob-equip/#findComment-197063
Udostępnij na innych stronach

  • 0

Spróbuj 

set final damage to final damage+X
set {_} to final damage
add 5 to {_}
set final damage to {_}

Co do Amora to możesz też

set {_} to last spawn....
set {_}'s helmet to diamond helmet named "&6Magic Helmet" of protection 10 and unbreaking 15

Itd

Odnośnik do komentarza
https://skript.pl/temat/30037-problem-z-mob-equip/#findComment-197064
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ę...