이해도 | 입문자(아무것도 몰라요) |
---|---|
게임버전 (JE) | 1.12.2 |
게임버전 (BE) | 관련없음 |
주식 스크립트중 클릭이벤트 부분이 1.12.2와 맞지 않는것 같아 질문드립니다.
어디를 어떻게 고쳐야할까요? 자세히 설명해주시면 감사하겠습니다.
on inventory click:
if inventory name of current inventory of player is "{@s}":
cancel event
if raw slot < 36:
if click item is not air:
if click type is left click:
if number of air in the player's inventory >= 1:
set {_lore::*} to lore of click item split by "||"
set {_money} to uncolored {_lore::2}
replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}
set {_money} to uncolored {_money} parsed as integer
if {money::%player%} >= {_money}:
remove {_money} from {money::%player%}
set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f%{money::%player%}% &c원"
give 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" to player
message ""
message "{@s} &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다."
message ""
stop
else:
message ""
message "{@s} &f당신의 &e인벤토리&f가 비어있는지 &c확인&f해주시기 바랍니다."
message ""
stop
if click type is right click:
if player has 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%":
set {_lore::*} to lore of click item split by "||"
set {_money} to uncolored {_lore::2}
replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}
set {_money} to uncolored {_money} parsed as integer
remove 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" from player's inventory
add {_money} to {money::%player%}
set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f%{money::%player%}% &c원"
message ""
message "{@s} &f당신은 %{stock::%clicked slot+1%}% &f을 &c판매&f하여 &e%{_money}% &f를 얻었습니다."
message ""
stop
qsef1256
2022.07.21어느 구문에서 문제가 발생하는지 까지는 적어오셔야죠