개인 자료란 (JE)

  서버 커뮤니티

Profile 도와주새여 대표칭호 없음
Profile

질문하기 스크립트

GUI 슬롯 아이템 감지

2024.02.27 조회 수 28 추천 수 0
이해도 초보자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 

on right click on entity:

    if target entity's name contain "대장장이":

        cancel event

        play sound "ui.button.click" to player

        set {_enchant} to chest inventory with 3 rows named "            [대장장이]"

        set slot 7 of {_enchant} to 1 end crystal named "&a강화하기"

        open {_enchant} to player


on inventory close:

    if name of event-inventory is "            [대장장이]":

        give slot 10 of current inventory to player

        give slot 12 of current inventory to player

        give slot 13 of current inventory to player

        give slot 14 of current inventory to player

        

on inventory click:

    if event-inventory's name is "            [대장장이]":

        clicked slot is 7:

            cancel event

            if 10 slot is diamond:

                send "a" to player

코드가 대충 이렇게 짜여있는데 마지막 부분에 '10번 슬롯에 다이아몬드가 있을 때' a를 출력하게 하고 싶은데 찾으려고 해도 못 찾겠네요. 스크립트 허브도 뒤져봤는데 스크립트 허브는 아직 자세히 쓸 줄 몰라 여기에 남겨봅니다.!

2개의 댓글

슈퍼레몬
2024.02.27

if "%slot 10 of current inventory to player%" is "diamond"
하시면 될것 같습니다.

도와주새여
2024.02.27
@슈퍼레몬

감사합니다!

뉴스 및 창작물
/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견 3

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1