Minecraft Skript/배포

[마인크래프트 스크립트] 창고 스크립트 배포

Script_Coder 2022. 2. 16. 08:00
728x90
반응형

마인크래프트 창고 스크립트 배포

 

 

안녕하세요. 오늘은 마인크래프트 창고 스크립트를 한번 제작해보았습니다.

테스트서버버전: 1.17.1

 

사용방법:

/창고

/창고 보기 <player> - 오피만 사용 가능한 명령어입니다.

 

창고.sk
0.00MB

서버에 스크립트 적용하는 방법

 

구문:

options:
	c : &f&l[ &7&l창고 &b&l&f]


command /창고 [<text>] [<offline player>]:
	trigger:
		if arg 1 is not set:
			open chest with 6 row named "%player%님의 창고" to player
			set {_cs} to 0
			loop 54 times:
				set slot {_cs} of current inventory of player to {창고.%player%::%loop-number%}
				add 1 to {_cs}
		else:
			if player is op:
				if arg 1 is "보기":
					if arg 2 is set:
						if arg-2 has played on this server before:
							open chest with 6 row named "%arg-2%님의 창고 보기" to player
							set {_css} to 0
							loop 54 times:
								set slot {_css} of current inventory of player to {창고.%arg-2%::%loop-number%}
								add 1 to {_css}
						else:
							message "{@c} &c그 플레이어를 찾을 수 없습니다." to player
							
					else:
						message "{@c} &c입력한 플레이어를 다시 한번 확인해주세요." to player
				
				else:
					message "{@c} &c잘못된 명령어입니다." to player
					
			else:
				message "{@c} &c당신은 이 명령어를 사용할 권한이 없습니다." to player
	
								
					
			
				

on inventory close:
	if inventory name of event-inventory contains "%player%님의 창고":
		delete {창고.%player%::*}
		set {_c.s} to 0
		loop 54 times:
			add slot {_c.s} of event-inventory to {창고.%player%::*}
			add 1 to {_c.s}
			
			
on inventory click:
	if inventory name of event-inventory contains "님의 창고 보기":
		cancel event
728x90
반응형