Ceroi 6d10bf9e7682449694fded3e69fdb3f3
이해도 | 구버전 |
---|---|
게임버전 (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
스크립터브혼
2021.01.19[예제분석3 - 변수의 쓰임] 게시물에서 다룬 내용이라서 링크로 대신합니다.
인벤토리를 재사용하기 위해서는 변수에 담아야 합니다.