이해도 | 초보자 |
---|---|
게임버전 (JE) | 1.7.10 |
게임버전 (BE) | 1.7.x |
스크립트 버전 | 3.4 |
귀속 활성화 스크립트인데 16. 18 번쨋줄 오류가 떠요...
(lore and "§4귀속아이템") can't be added to a player because the former is neither an item type, an inventory nor an experience point (귀속.sk, line 16: give 1 of {_item} with lore " " and "&4귀속아이템" to player')
[00:35:10 ERROR]: '::*}' is not a valid item data (귀속.sk, line 18: give 1 of {_item} with lore {_lore::*} and " " and "&4귀속아이템" to player')
2개의 오류가 발견 되었다는데 도대체 뭐가 잘못된걸까요..? 마크 버전은 1.7.10 입니다
/귀속 활성화를 하면 손에 들고 있던 템이 아예 사라져버려요ㅠㅠ
command /귀속 활성화:
trigger:
set {_int} to 0
loop 10 times:
add 1 to {_int}
if line {_int} of lore of player's tool contains "&4귀속아이템":
set {_set} to true
if {_set} is true:
message "이미 귀속처리된 아이템 입니다!"
stop
else:
set {_item} to player's tool
set {_lore::*} to lore of player's tool
remove 1 of {_item} from player's inventory
if size of {_lore::*} <= 0:
give 1 of {_item} with lore " " and "&4귀속아이템" to player
else:
give 1 of {_item} with lore {_lore::*} and " " and "&4귀속아이템" to player
on death of player:
loop all items in player's inventory:
set {_int} to 0
loop 10 times:
add 1 to {_int}
if line {_int} of lore of loop-item contains "&4귀속아이템":
add loop-item to {respawn.%player%::*}
remove loop-item from drops
on respawn:
wait 1 tick
if size of {respawn.%player%::*} > 0:
loop {respawn.%player%::*}:
give loop-value to player
remove loop-value from {respawn.%player%::*}
on drop:
set {_int} to 0
loop 10 times:
add 1 to {_int}
if line {_int} of lore of item contains "&4귀속아이템":
cancel event
그리고 여기서 /귀속 비활성화 도 만드려 하는데 어떻게 고쳐야하나요..?
후순
2023.05.21간단하게
command 부분에서 arg 부분 추가해서 활성화/비활성화 넣으시고 변수로
{귀속활성화} 를 true랑 flase로 나누세용