hyunjuns efb78f3c34e24c0cac20441bd904b228
게임버전 (JE) | 플러그인 |
---|---|
게임버전 (BE) | 기타 |
on inventory click:
if iname is "&c주식":
cancel event
if clicked item is not black stained glass pane:
set {_stock} to uncolored name of clicked item
replace all " 주식" with "" in {_stock}
if clicked type is left mouse button:
if player's money is not smaller than {주식가격::%{_stock}%}:
subtract {주식가격::%{_stock}%} from player's money
add 1 to {주식.%uuid of player%::%{_stock}%}
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
else:
play sound "UI_SUTTON_CLICK" with volume 0.5 to the player
message "&c돈이 부족합니다!"
if clicked type is left mouse button with shift:
if player's money is not smaller than {주식가격::%{_stock}%}*10:
subtract {주식가격::%{_stock}%}*10 from player's money
add 100 to {주식.%uuid of player%::%{_stock}%}
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
else:
play sound "UI_SUTTON_CLICK" with volume 0.5 to the player
message "&c돈이 부족합니다!"
if clicked type is right mouse button:
if {주식.%uuid of player%::%{_stock}%} is bigger than 0:
add {주식가격::%{_stock}%} to player's money
subtract 1 from {주식.%uuid of player%::%{_stock}%}
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
else:
play sound "UI_SUTTON_CLICK" with volume 0.5 to the player
message "&c주식이 부족합니다!"
if clicked type is right mouse button with shift:
if {주식.%uuid of player%::%{_stock}%} is bigger than 0:
add {주식가격::%{_stock}%}*{주식.%uuid of player%::%{_stock}%} to player's money
set {주식.%uuid of player%::%{_stock}%} to 0
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
message "&c주식을 모두 판매하였습니다!"
else:
play sound "UI_SUTTON_CLICK" with volume 0.5 to the player
message "&c주식이 부족합니다!"
make player execute command "/주식확인"
오류가 나는부분은 없는데 우클릭시 판매, 쉬프트해서 100개 구매가 되지않습니다
구문에 문제가 있을까요?
qsef1256
2022.09.04들여쓰기가 좀 이상하네요.
if clicked type is left mouse button with shift:
가if clicked type is left mouse button:
밑에 있는데요?qsef1256
2022.09.04파이썬 같은 들여쓰기는 스페이스가 중괄호 대체 문구라 매우 중요해요. 이와 같이 논리 구조가 꼬여서 실행이 안될 수도 있어요