개인 자료란 (JE)

  서버 커뮤니티

Profile Ceroi 대표칭호 없음

Ceroi 6d10bf9e7682449694fded3e69fdb3f3

Profile

질문하기 스크립트

제가 창고 스크립트 제작중인데

2021.01.19 조회 수 225 추천 수 0
이해도 구버전 
게임버전 (JE) 스피곳 
게임버전 (BE) 모르겠습니다 
스크립트 버전 입문자(아무것도 몰라요) 
스크립트 애드온 2.2-dev28 

제가  개인서버에서 사용할 창고스크립트 제작중인데 "/창고관리 <닉네임>"  하면 <닉네임>에 해당되는 사람의 창고를 열고싶은데 어떻게 하나요? 


command /창고:

    trigger:

        player have permission "chset1":

            open chest with 3 rows named "&6&l[CHEST]" to player

            set {_a::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 35, 36, 44, 45, 46, 47, 48, 49, 50 51, 52, 53

            loop {_a::*}:

                set slot loop-value of current inventory of player to white glass pane named "&f"

                set slot 0 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 1 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 2 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 3 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 4 of current inventory of player to nether star named "&6&l[ &f&l창고 &6&l]" with lore " "

                set slot 5 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 6 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 7 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 8 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 9 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 10 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 11 of current inventory of player to chest named "&6&l[CHEST] &f1번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 12 of current inventory of player to barrier named "&c&l[FAIL] &f2번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 13 of current inventory of player to barrier named "&c&l[FAIL] &f3번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 14 of current inventory of player to barrier named "&c&l[FAIL] &f4번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 15 of current inventory of player to barrier named "&c&l[FAIL] &f5번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 16 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 17 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 18 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 19 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 20 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 21 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 22 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 23 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 24 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 25 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 26 of current inventory of player to gray stained glass pane named " " with lore " "


        player have permission "chset2":

            open chest with 3 rows named "&6&l[CHEST]" to player

            set {_a::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 35, 36, 44, 45, 46, 47, 48, 49, 50 51, 52, 53

            loop {_a::*}:

                set slot loop-value of current inventory of player to white glass pane named "&f"

                set slot 0 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 1 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 2 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 3 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 4 of current inventory of player to nether star named "&6&l[ &f&l창고 &6&l]" with lore " "

                set slot 5 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 6 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 7 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 8 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 9 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 10 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 11 of current inventory of player to chest named "&6&l[CHEST] &f1번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 12 of current inventory of player to chest named "&6&l[CHEST] &f2번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 13 of current inventory of player to barrier named "&c&l[FAIL] &f3번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 14 of current inventory of player to barrier named "&c&l[FAIL] &f4번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 15 of current inventory of player to barrier named "&c&l[FAIL] &f5번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 16 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 17 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 18 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 19 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 20 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 21 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 22 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 23 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 24 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 25 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 26 of current inventory of player to gray stained glass pane named " " with lore " "

                

        player have permission "chset3":

            open chest with 3 rows named "&6&l[CHEST]" to player

            set {_a::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 35, 36, 44, 45, 46, 47, 48, 49, 50 51, 52, 53

            loop {_a::*}:

                set slot loop-value of current inventory of player to white glass pane named "&f"

                set slot 0 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 1 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 2 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 3 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 4 of current inventory of player to nether star named "&6&l[ &f&l창고 &6&l]" with lore " "

                set slot 5 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 6 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 7 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 8 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 9 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 10 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 11 of current inventory of player to chest named "&6&l[CHEST] &f1번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 12 of current inventory of player to chest named "&6&l[CHEST] &f2번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 13 of current inventory of player to chest named "&6&l[CHEST] &f3번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 14 of current inventory of player to barrier named "&c&l[FAIL] &f4번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 15 of current inventory of player to barrier named "&c&l[FAIL] &f5번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 16 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 17 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 18 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 19 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 20 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 21 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 22 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 23 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 24 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 25 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 26 of current inventory of player to gray stained glass pane named " " with lore " "

                

        player have permission "chset4":

            open chest with 3 rows named "&6&l[CHEST]" to player

            set {_a::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 35, 36, 44, 45, 46, 47, 48, 49, 50 51, 52, 53

            loop {_a::*}:

                set slot loop-value of current inventory of player to white glass pane named "&f"

                set slot 0 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 1 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 2 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 3 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 4 of current inventory of player to nether star named "&6&l[ &f&l창고 &6&l]" with lore " "

                set slot 5 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 6 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 7 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 8 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 9 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 10 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 11 of current inventory of player to chest named "&6&l[CHEST] &f1번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 12 of current inventory of player to chest named "&6&l[CHEST] &f2번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 13 of current inventory of player to chest named "&6&l[CHEST] &f3번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 14 of current inventory of player to chest named "&6&l[CHEST] &f4번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 15 of current inventory of player to barrier named "&c&l[FAIL] &f5번 창고" with lore "&c&l[ &f00등급 달성시 오픈&c&l]"

                set slot 16 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 17 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 18 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 19 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 20 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 21 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 22 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 23 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 24 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 25 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 26 of current inventory of player to gray stained glass pane named " " with lore " "

        

        player have permission "chset5":

            open chest with 3 rows named "&6&l[CHEST]" to player

            set {_a::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 35, 36, 44, 45, 46, 47, 48, 49, 50 51, 52, 53

            loop {_a::*}:

                set slot loop-value of current inventory of player to white glass pane named "&f"

                set slot 0 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 1 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 2 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 3 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 4 of current inventory of player to nether star named "&6&l[ &f&l창고 &6&l]" with lore " "

                set slot 5 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 6 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 7 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 8 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 9 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 10 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 11 of current inventory of player to chest named "&6&l[CHEST] &f1번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 12 of current inventory of player to chest named "&6&l[CHEST] &f2번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 13 of current inventory of player to chest named "&6&l[CHEST] &f3번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 14 of current inventory of player to chest named "&6&l[CHEST] &f4번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 15 of current inventory of player to chest named "&6&l[CHEST] &f5번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]"

                set slot 16 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 17 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 18 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 19 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 20 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 21 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 22 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 23 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 24 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 25 of current inventory of player to gray stained glass pane named " " with lore " "

                set slot 26 of current inventory of player to gray stained glass pane named " " with lore " "


on inventory click:

    if inventory name of current inventory of player is "&6&l[CHEST]":

        cancel event

        

        if click item is chest named "&6&l[CHEST] &f1번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]":

            cancel event

            execute player command "/코드창고 1"

            stop

                

                

        if click item is chest named "&6&l[CHEST] &f2번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]":

            cancel event

            execute player command "/코드창고 2"

            stop

            

            

        if click item is chest named "&6&l[CHEST] &f3번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]":

            cancel event

            execute player command "/코드창고 3"

            stop

            

            

        if click item is chest named "&6&l[CHEST] &f4번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]":

            cancel event

            execute player command "/코드창고 4"

            stop

            

            

        if click item is chest named "&6&l[CHEST] &f5번 창고" with lore "&e&l[ &f우클릭 시 오픈 &e&l]":

            cancel event

            execute player command "/코드창고 5"

            stop        




1개의 댓글

스크립터브혼
2021.01.19

[예제분석3 - 변수의 쓰임] 게시물에서 다룬 내용이라서 링크로 대신합니다.
인벤토리를 재사용하기 위해서는 변수에 담아야 합니다.

뉴스 및 창작물
/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240426223813

업데이트

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

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1