이해도 | 입문자(아무것도 몰라요) |
---|---|
게임버전 (JE) | 1.12.2 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | 2.6.1 |
on swap hand item:
if player is sneaking:
execute player command "/메뉴"
command /메뉴:
trigger:
open chest inventory with 5 rows named "&e메뉴" to player
set slot 0 of current inventory of player to white stained glass pane named " "
set slot 1 of current inventory of player to white stained glass pane named " "
set slot 2 of current inventory of player to white stained glass pane named " "
set slot 3 of current inventory of player to white stained glass pane named " "
set slot 4 of current inventory of player to white stained glass pane named " "
set slot 5 of current inventory of player to white stained glass pane named " "
set slot 6 of current inventory of player to white stained glass pane named " "
set slot 7 of current inventory of player to white stained glass pane named " "
set slot 8 of current inventory of player to white stained glass pane named " "
set slot 9 of current inventory of player to white stained glass pane named " "
set slot 10 of current inventory of player to white stained glass pane named " "
on inventory click:
if iname contains "&e메뉴":
cancel event
else:
if clicked raw slot is 9:
message "1"
구문을 이렇게썻는데 9번칸 클릭하면 메세지가 안뜨는데 뭐가 문젠가여...
레뉴
2022.05.06if iname contains "메뉴"(인벤 이름이 메뉴일때)
밑에있는 else(아니면) 즉, else구문을 빼시고 if구문을 cancel event밑에 넣으세요.
qsef1256
2022.05.06현재 코드에서는 9번칸인지 판별하기 전에 9번칸의 인벤토리 이름도 "메뉴" 이기 때문에 cancel event가 실행되고 끝납니다.