728x90
반응형
안녕하세요. 오늘은 savetool스크립트를 만들어봤습니다.
제작한 서버 버전은 1.17.1이지만 1.12.2~1.18.1정도까지는 사용 가능할 것 같습니다.
savetool이란, 서버 개발(건축 등) 중 아이템들을 저장해두는 GUI 기능을 하는 스크립트입니다.
사용방법:
/savetool -> savetool 아이템을 지급합니다.
/savetool 설정 -> 저장할 아이템들을 설정합니다.
아이템을 꺼내오는 방법은 savetool 아이템을 들고 우클릭 하면 됩니다.
구문:
options:
st : &6[&asave&ctool&6]
command /savetool [<text>] [<text>]:
trigger:
if player is op:
if arg 1 is not set:
give 1 nether star named "&asave&ctool" with lore "&6개발할때 편리한 도구입니다." and "&6아이템들을 저장해두고 필요할때마다 꺼내서 사용할 수 있습니다." to player
if arg 1 is set:
if arg 1 is "설정":
if arg 2 is not set:
open chest with 6 rows named "savetool 설정" to player
set {_sti} to 0
loop {savetool::item::*}:
set slot {_sti} of current inventory of player to loop-value
add 1 to {_sti}
else:
message "{@st} &c잘못된 명령어입니다." to player
else:
if arg 1 is set:
if arg 1 is not "설정":
message "{@st} &c잘못된 명령어입니다." to player
else:
message "{@st} &c당신은 이 명령어를 사용할 권한이 없습니다." to player
stop
on inventory close:
if inventory name of player's current inventory is "savetool 설정":
clear {savetool::item::*}
loop 54 times:
if slot (loop-num)-1 of player's current inventory is not air:
add slot (loop-num)-1 of player's current inventory to {savetool::item::*}
stop
on rightclick:
if player is holding a nether star named "&asave&ctool" with lore "&6개발할때 편리한 도구입니다." and "&6아이템들을 저장해두고 필요할때마다 꺼내서 사용할 수 있습니다.":
if player is op:
open chest with 6 rows named "savetool" to player
set {_stii} to 0
loop {savetool::item::*}:
set slot {_stii} of current inventory of player to loop-value
add 1 to {_stii}
else:
message "{@st} &c당신은 이 아이템을 사용할 권한이 없습니다." to player
on inventory click:
if inventory name of player's current inventory is "savetool":
cancel event
set {_sts} to clicked raw slot
if {_sts} < 54:
set {_stsi} to slot {_sts} of current inventory of player
if player has enough space for {_stsi}:
give {_stsi} to player
else:
message "{@st} &c인벤토리가 부족합니다." to player
728x90
반응형
'Minecraft Skript > 배포' 카테고리의 다른 글
[마인크래프트 스크립트] 창고 스크립트 배포 (13) | 2022.02.16 |
---|---|
[minecraft skript] sethome 스크립트 배포 (2) | 2022.02.15 |
[마인크래프트 스크립트] 고퀄리티 채팅청소 스크립트 배포 (1.12.2~1.18.1) (2) | 2022.02.10 |
[마인크래프트 스크립트] 쓰레기통 스크립트 배포 (1.12.2 ~ 1.17.1) (0) | 2022.02.01 |
마인크래프트 팬텀 이코노미 플러그인 스크립트로 한글화! (0) | 2021.02.06 |