landom0738 e6066f3086a0453bb135e1ec38e8dcea
이해도 | 초보자(스크립트 구성요소나 기본문법은 알아요) |
---|---|
게임버전 (JE) | 1.16.5 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | 2.6 |
스크립트 애드온 | 모르겠다 |
강화 스크립트를 만들고 있는 와중에, 강화창에 무기와 강화서가 없는데 돈이 빠져나갑니다. 무슨 문제가 있나요?
구문입니다.
command /강화:
trigger:
set {_title} to "dd"
open chest inventory with 3 row named "dd" to player
set {OpenGUI.%player%} to {_title}
set slot 1 of player's current inventory to diamond chestplate named "아이템" with lore "&7강화 할 아이템을 넣어주세요!"
set slot 3 of player's current inventory to paper named "강화서" with lore "&7강화서를 넣어주세요!"
set slot 14 of player's current inventory to anvil named "강화"
set slot 10 of player's current inventory to air
set slot 12 of player's current inventory to air
set slot 16 of player's current inventory to air
set slot 0 and 2 and 4 and 5 and 6 and 7 and 8 and 9 and 11 and 13 and 15 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player's current inventory to white stained glass pane
function transEnchant(i: string) :: string:
if {_i} is "날카로움":
return "sharpness"
else if {_i} is "효율":
return "efficiency"
else if {_i} is "보호":
return "protection"
on inventory click:
if inventory name is "dd":
if clicked raw slot is 14:
cancel event
if slot 10 of player's current inventory is not set:
message "강화 할 아이템을 넣으세요"
else:
if slot 12 of player's current inventory is not set:
message "강화서를 넣으세요"
else:
if {돈.%player%} < 10000:
if {돈.%player%} = 0:
message "돈이 부족합니다"
else:
if slot 10 and 12 of player's current inventory is set:
set {_pitem} to slot 10 of current inventory of player
set {_encitem} to slot 12 of current inventory of player
set {_enclore::*} to uncolored lore of {_encitem}
set {_enc} to transEnchant({_enclore::1}) parsed as enchantment
set {_pitemenlv} to enchant level of {_enc} of {_pitem}
delete slot 10 of current inventory of player
delete slot 12 of current inventory of player
set enchantment level of {_enc} of {_pitem} to {_pitemenlv} + 1
set slot 10 of current inventory of player to {_pitem}
subtract 10000 from {돈.%player%}
lanthanide
2021.12.31모든 not set 을 air 로, set 을 not air 로 바꿔보시겠어요..? set이라는 거가 air처럼 작동하는지 잘 모르겠네요.
landom0738
2021.12.31고쳤습니다! 어제 3시간에 걸쳐서 고쳤어요 ㅎㅎ 알려주셔서 감사합니다!