이해도 | 1.12 |
---|---|
게임버전 (JE) | 모드버킷 |
스크립트 애드온 | 2.37 |
# 루비 하트 펜던트 (인벤토리 클릭 이벤트)
on inventory click:
if iname contains "&f루비 하트 펜던트":
if clicked raw <=9:
cancel event
if clicked raw slot is 12 or 13 or 15 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26:
cancel event
if clicked raw slot is 14:
cancel event
if slot 10 or 11 of current inventory of player is not prismarine_crystals:
cancel event
message "&f[알림] 합성 할 루비 크리스탈을 넣어주세요." to player
else:
set {_아이템1} to slot 10 of current inventory of player
set {_아이템2} to slot 11 of current inventory of player
set {_루비영혼1} to uncolored name of slot 10 of current inventory of player
set {_루비영혼2} to uncolored name of slot 11 of current inventory of player
replace all " " and "루비" and "크리스탈" and "캐럿" with "" in {_루비영혼1}
replace all " " and "루비" and "크리스탈" and "캐럿" with "" in {_루비영혼2}
set {_아이템1} to {_루비영혼1} parsed as number
set {_아이템2} to {_루비영혼2} parsed as number
#set {_루비영혼모음} to ({_아이템1} + {_아이템2})
if {_루비영혼모음} is set:
#delete slot 10 and 11 of current inventory of player
#set {_총아이템} to amount of {_아이템3} or {_아이템4} in current inventory of player
remove 1 of slot 10 and 11 from player's inventory
set {_총아이템} to prismarine_crystals named "&f루비 크리스탈 %{_아이템1} + {_아이템2}%캐럿"
set slot 16 of current inventory of player to {_총아이템}
[21:26:35] [Server thread/ERROR]: ('1 of slot 10' and '11') can't be removed from an inventory because the former is neither an item type nor an inventory (qwe.sk, line 92: remove 1 of slot 10 and 11 from player's inventory')
아이템을 한 번에 올려놓으면 이벤트가 발생 할 때 하나씩만 없어지게 하고 싶은데 한번에 없어져요ㅠㅠ
amount 구문이랑 remove 구문도 찾아서 해봤는데 전혀 감이 안잡혀서 큐엔에이 올립니다,,총총
스크립터브혼
2020.08.16위에 {_아이템1}과 {_아이템2}를 만들어 두신게 있으니
이렇게 하시면 됩니다.
새턴
2020.08.16대박!! 해결 됐어요ㅠㅠ 감사합니다!!!!!!!!!!!!!