개인 자료란 (JE)

  서버 커뮤니티

Profile Ceroi 대표칭호 없음

Ceroi 6d10bf9e7682449694fded3e69fdb3f3

Profile

질문하기 스크립트

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

2021.01.19 조회 수 278 추천 수 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/246/933/003/262x150.crop.jpg?20241204080049

업데이트

[마인크래프트 1.21.4 업데이트]

제작대

2024-12-04

0

/files/thumbnails/477/930/003/262x150.crop.jpg?20241201030912

레드스톤

뉴진스 - Super Shy | 마크 노트블럭 커버

노트블럭전문가

2024-12-01

0

/files/thumbnails/483/916/003/262x150.crop.jpg?20241127115329

레드스톤

[노트블럭 커버] 뉴진스 - ETA 3

노트블럭전문가

2024-11-27

1

/files/thumbnails/150/925/003/262x150.crop.jpg?20241123005717

건축

응답하라 1988 ? 2

팀뉴일리시

2024-11-23

5

/files/thumbnails/761/908/003/262x150.crop.jpg?20241025153749

건축

서울 숭례문(崇禮門) 6

KHC

2024-10-25

2