개인 자료란 (JE)

  서버 커뮤니티

Profile 5792 대표칭호 없음

5792 4e070eabdf1544f28d3c5d01f0b77065

Profile

질문하기 스크립트

max health attribute

2022.10.08 조회 수 120 추천 수 0
이해도 초보자 
게임버전 (JE) 1.19.2 
게임버전 (BE) 관련없음 
스크립트 버전 2.6.3 
스크립트 애드온 SkBee? 

on load:

    set {class::brewer::iron_helmet} to unbreakable iron helmet named "&d[브루어] &b철모" with lore "&7브루어를 지켜줄  방어수단입니다." and "&7방어력: &a+2" and "" and "&7부가 효과: &c체력 감소 +2" with attributes flag hidden with hi dden unbreakable flag


on player armor change:

    if new armor item is {class::brewer::iron_helmet}:

        execute console command "attribute %player% minecraft:generic.max_health modifier add 0-0-0-0-2 brewer_helmet -2 add"

    if old armor item is {class::brewer::iron_helmet}:

        execute console command "attribute %player% minecraft:generic.max_health modifier remove 0-0-0-0-2"

        heal the player

 

원래 코드대로라면 철 헬멧을 입었을 때 체력이 18로 바뀌고 다시 해제하면 체력이 20으로 바뀌며 체력이 회복되어야 하는데 회복되지 않습니다.




4개의 댓글

qsef1256
2022.10.08

단락 -> 코드 로 코드 블록을 올릴 수 있습니다.

이렇게요

그리고 저는 커맨드 분야가 아니라서 여기에 정확한 답변을 드리지는 못하겠네요, 스크립트에서 저건 https://skripthub.net/docs/?id=953 쓰거든요.

5792
2022.10.09
@qsef1256

그 혹시 set 말고 add는 없나요?

qsef1256
2022.10.09
@5792

https://skripthub.net/docs/?id=1134

5792
2022.10.10
@qsef1256

감사합니다

뉴스 및 창작물
/files/thumbnails/115/774/003/262x150.crop.jpg?20240424234825

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1

/files/thumbnails/932/765/003/262x150.crop.jpg?20240410124459

레드스톤

마인크래프트 노트블록으로 만든 『 밤양갱 (Bam Yang Gang) 』

노트블럭전문가

2024-04-10

0