이해도 | 입문자 |
---|---|
게임버전 (JE) | 1.16.5 |
게임버전 (BE) | 1.16.x |
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 mouse button:
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 mouse button:
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
스크립트에 해놨는데
[19:49:16 INFO]: [Skript] Reloading 주식.sk...
[19:49:17 INFO]: Line 184: (주식.sk)
[19:49:17 INFO]: Can't understand this expression: 'lore of click item split by "||"'
[19:49:17 INFO]: Line: set {_lore::*} to lore of click item split by "||"
[19:49:17 INFO]:
[19:49:17 INFO]: Line 191: (주식.sk)
[19:49:17 INFO]: the clicked slot is not a number
[19:49:17 INFO]: Line: give 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" to player
[19:49:17 INFO]:
[19:49:17 INFO]: Line 193: (주식.sk)
[19:49:17 INFO]: Region '&a[ &f주식 &a] &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다.' could not be found
[19:49:17 INFO]: Line: message "{@s} &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다."
[19:49:17 INFO]:
[19:49:17 INFO]: Line 204: (주식.sk)
[19:49:17 INFO]: the clicked slot is not a number
[19:49:17 INFO]: Line: if player has 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%":
[19:49:17 INFO]:
라고 뜨는데 왜 잘못된거죠 고쳐주세요 ㅠㅠ
댓글이 없습니다.
새로운 댓글을 등록해 주세요!