Pm08 ec106005f66e4c80b43626ba1b97e145
이해도 | 초보자 |
---|---|
게임버전 (JE) | 1.19.4 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | Skript-2.6.4 |
스크립트 애드온 | SkQuery-4.1.9, SkBee-2.9.0 |
제가 하고싶은건 슬롯 28에 있는 인챈트북의 인챈트 레벨을 변수에 저장하고싶은데 될까요?
#모루 우클릭 감지 + gui
on right click on anvil:
cancel event
set {_anvil} to chest with 5 rows named "[모루]"
loop 45 times:
set slot loop-num -1 of {_anvil} to black stained glass pane named " "
set slot 28 and 34 of {_anvil} to air
set slot 13 of {_anvil} to red stained glass pane named " "
set slot 19, 20, 21, 12, 25, 24, 23 and 14 of {_anvil} to white stained glass pane named " "
open {_anvil} to player
#gui
on inventory click:
if inventory name is "[모루]":
if item is a black stained glass pane named " ":
cancel event
if item is a white stained glass pane named " ":
cancel event
if item is a green stained glass pane named " ":
cancel event
if item is a red stained glass pane named " ":
cancel event
if item is a anvil named "&r&l&5합치기":
cancel event
on inventory click:
if inventory name is "[모루]":
wait 1 tick
#슬롯28(왼쪽 밑 빈칸) + 슬롯13(중간 위)
if slot 28 of current inventory of player is enchanted book:
if {28} is not true:
set slot 19, 20, 21 and 12 of current inventory of player to green stained glass pane named " "
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
set {28} to true
set {E28} to slot 28 of current inventory of player
else:
set {28} to false
delete {E28}
set slot 19, 20, 21 and 12 of current inventory of player to white stained glass pane named " "
set slot 13 of current inventory of player to red stained glass pane named " "
#슬롯34(오른쪽 밑 빈칸) + 슬롯13(중간 위)
if slot 34 of current inventory of player is enchanted book:
if {34} is not true:
set slot 25, 24, 23 and 14 of current inventory of player to green stained glass pane named " "
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
set {34} to true
set {E34} to slot 34 of current inventory of player
else:
set {34} to false
delete {E34}
set slot 25, 24, 23 and 14 of current inventory of player to white stained glass pane named " "
set slot 13 of current inventory of player to red stained glass pane named " "
#슬롯28과 슬롯34의 아이템이 같은지 확인
if {E28} = {E34}:
set slot 13 of current inventory of player to anvil named "&r&l&5합치기"
#인벤 닫았을 때 아이템 보호
on inventory close:
if event-inventory's display name contains "[모루]":
if slot 13 of current inventory of player is not red stained glass pane named " ":
if slot 13 of current inventory of player is not anvil named "&r&l&5합치기":
if player has enough space for slot 13 of current inventory of player:
give slot 13 of current inventory of player to player
play sound "entity.item.pickup" with volume 0.5 to the player
else:
drop slot 13 of current inventory of player at player
if slot 28 of current inventory of player is not air:
if player has enough space for slot 28 of current inventory of player:
give slot 28 of current inventory of player to player
play sound "entity.item.pickup" with volume 0.5 to the player
else:
drop slot 28 of current inventory of player at player
if slot 34 of current inventory of player is not air:
if player has enough space for slot 34 of current inventory of player:
give slot 34 of current inventory of player to player
play sound "entity.item.pickup" with volume 0.5 to the player
else:
drop slot 34 of current inventory of player at player
댓글이 없습니다.
새로운 댓글을 등록해 주세요!