kesswick1006 ead0919c59314658b6c69d91acfee3c4
이해도 | 입문자 |
---|---|
게임버전 (JE) | 관련없음 |
게임버전 (BE) | 관련없음 |
제가 스크립트로 보관함을 만들어보고 있는데요
자꾸 서버 메뉴가 저장되어서 문제입니다
보관함 코드
command /보관함:
trigger:
set {_gui} to chest inventory with 6 rows named "개인창고"
loop 54 times:
set slot loop-num -1 of {_gui} to {chest.%player's uuid%::%loop-num%}
open {_gui} to player
on inventory close:
event-inventory's name is "개인창고":
loop 54 times:
set {chest.%player's uuid%::%loop-num%} to slot loop-num -1 of event-inventory
서버메뉴 코드
on swap hand item:
player is sneaking:
play sound "ENTITY_PLAYER_LEVELUP" with volume 1 with pitch 1 to player
cancel event
set {_gui} to chest inventory with 1 rows named "메뉴"
set slot 4 of {_gui} to ender pearl named "&6스폰" with lore "" and "&f스폰으로 이동하는 마법의 진주" and ""
set slot 0 of {_gui} to bread named "&6빵 받기" with lore "" and "&f빵을 받을수 있는 빵버튼" and ""
set slot 8 of {_gui} to compass named "&6운영자 부르기" with lore "" and "&f운영자를 부르는" and "전설의 나침반" and ""
open {_gui} to player
on inventory click:
event-inventory's name is "메뉴":
cancel event
on inventory click:
event-inventory's name is "쓰레기통":
stop
event-inventory is player's inventory:
stop
event-inventory's name is "개인창고":
stop
clicked slot is 4:
close player's inventory
teleport player to location(15,84,-10,world("world"),0,0)
send "스폰 이동 성공"
clicked slot is 0:
if {쿨타임.%player%.빵버튼} is not set:
close player's inventory
give 128 bread named "&6전설의 빵" with lore "" and "&f먹을수 있는 전설의 빵" and "" to player
send "지급 성공"
set {쿨타임.%player%.빵버튼} to true
wait 1200 tick
delete {쿨타임.%player%.빵버튼}
else:
message "아직 명령어를 사용할수 없습니다."
clicked slot is 8:
close player's inventory
broadcast "&f&1%player%&6님이 &a관리자 kesswick1006 &6(을)를 찾습니다."
play sound "ENTITY_PLAYER_LEVELUP" with volume 10 with pitch 1 to players
on join:
delete {쿨타임.%player%.빵버튼}
여기에서 보관함에 서버메뉴 아이템이 저장되는 이유가 있을까요
스모올러
2025.02.14loop-num이 문제 아닐까요? loop-num은 1부터 시작하고, loop-num-1은 0부터 시작합니다. 이거 바꿔보면서 실행해보세요
kesswick
2025.02.14ㅠㅠ 안되네여