개인 자료란 (JE)

  서버 커뮤니티

Profile kesswick 대표칭호 없음

kesswick1006 ead0919c59314658b6c69d91acfee3c4

Profile

질문하기 스크립트

스크립트

2025.02.14 조회 수 26 추천 수 0
이해도 입문자 
게임버전 (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%.빵버튼}

여기에서 보관함에 서버메뉴 아이템이 저장되는 이유가 있을까요


2개의 댓글

스모올러
2025.02.14

loop-num이 문제 아닐까요? loop-num은 1부터 시작하고, loop-num-1은 0부터 시작합니다. 이거 바꿔보면서 실행해보세요

kesswick
2025.02.14
@스모올러

ㅠㅠ 안되네여

 

뉴스 및 창작물
/files/thumbnails/729/017/004/262x150.crop.jpg?20250326233109

업데이트

마인크래프트 자바 1.21.5 출시 (Minecraft Java 1.21.5 Released): 한국어 번역본

updater

2025-03-26

0

/files/thumbnails/202/016/004/262x150.crop.jpg?20250323230938

소식

Minecraft LIVE - 2025 March 내용 요약

노을넴

2025-03-23

1

/files/thumbnails/103/015/004/262x150.crop.jpg?20250321164817

업데이트

마인크래프트 1.21.5 릴리스 후보 (Minecraft 1.21.5 Release Candidate 1): 한국어 번역본

updater

2025-03-21

0

/files/thumbnails/612/009/004/262x150.crop.jpg?20250319182233

업데이트

마인크래프트 1.21.5 프리릴리스 (Minecraft 1.21.5 Pre-Releases): 한국어 번역본

updater

2025-03-12

0

/files/thumbnails/166/005/004/262x150.crop.jpg?20250306005107

업데이트

마인크래프트 스냅숏 25w10a (Minecraft Snapshot 25w10a): 한국어 번역본

updater

2025-03-06

0