개인 자료란 (JE)

  서버 커뮤니티

Profile kr_wonse 대표칭호 없음
Profile

질문하기 스크립트

gui 에서 gui 열기 오류

2020.10.12 조회 수 310 추천 수 0
이해도 1.12 
게임버전 (JE) 페이퍼 
스크립트 애드온 2.4 

on inventory click:

    if iname contains "&0&l            * 제 작 대 *":

        if click type is left mouse button with shift or right mouse button with shift or right mouse button:

            cancel event

        else:

            if clicked raw slot is 9:

                close player's inventory

                open chest with 5 rows named "&6&l             * 목 제 *" to player

                set {_int1} to 0

                set {_int2} to 18

                set {_int3} to 36

                loop 9 times:

                    format slot {_int1} of player with gray stained glass pane named "&f" to run ""

                    format slot {_int2} of player with gray stained glass pane named "&f" to run ""       

                    format slot {_int3} of player with gray stained glass pane named "&f" to run ""       

                    add 1 to {_int1}

                    add 1 to {_int2}

                    add 1 to {_int3}

                format slot 44 of player with Barrier named "&c닫기" to close

                set slot 9 of current inventory of player to stone named "{@접} 판자" with lore "" and "&7판자를 제작합니다" 

                if clicked raw slot is 9:

                    close player's inventory

                    send "제작중"


이렇게 코드를 적었는데 *제작대* gui에서 9번슬롯을 클릭해도 "제작중" 이라는 메세지가 나오네요 들여쓰기를 잘해야하나요?.. 도와주세용

1개의 댓글

스크립터브혼
2020.10.12

이벤트에 대한 이해가 필요합니다.
작성하신 코드의 흐름을 보면 제작대 인벤토리에서9번 슬롯을 클릭하면 새로운 인벤토리를 열고, 제작중이라는 메세지를 띄우게 되어있습니다.
이벤트의 첫부분에 if iname contains "&0&l            * 제 작 대 *": 조건을 넣어 제작대 인벤토리의 클릭이벤트를 처리한 것 처럼, 새로 연 목제 인벤토리의 클릭 이벤트를 따로 처리해야합니다.


이벤트는 한번 실행되면 코드 마지막까지 실행됩니다.
해당 이벤트가 언제 동작하고 언제 끝나야 하는지, 이벤트가 어느 조건에서 동작하는지 다시 점검해보시기 바랍니다.

뉴스 및 창작물
/files/thumbnails/932/812/003/262x150.crop.jpg?20240616121638

업데이트

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

학교가기싫다

2024-06-14

1

/files/thumbnails/308/805/003/262x150.crop.jpg?20240605201646

레드스톤

[노트블럭 커버] 팬서비스/mona 【 HoneyWorks 】

노트블럭전문가

2024-06-05

0

/files/thumbnails/288/791/003/262x150.crop.jpg?20240602150002

아티클

《까다로운 시련》 업데이트 날짜 공개 및 정보

학교가기싫다

2024-06-02

0

/files/thumbnails/841/773/003/262x150.crop.jpg?20240526120908

레드스톤

마인크래프트 노트블록버전 『 봄을 고하다 (春を告げる) 』 [더블옥타브 버전]

노트블럭전문가

2024-05-26

0

/files/thumbnails/712/796/003/262x150.crop.jpg?20240525085438

레드스톤

마인크래프트 노트블록으로 만든 『 봄을 고하다 (春を告げる) 』 1

Sonttukk

2024-05-25

1