이해도 | 중급자 |
---|---|
게임버전 (JE) | 1.16.5 |
게임버전 (BE) | 1.16.x |
스크립트 애드온 | SkQuery |
GUI 상점 스크립트 만들고 있는데 쉬프트 + 마우스 왼/오 가안돼요..
on inventory click:
if name of current inventory of player is "&6&l[상점] &f: 농작물 상점":
cancel event
if clicked slot is 0:
if "%click type%" contains "SHIFT_RIGHT":
if player has 160 wheat:
remove 160 wheat from player
add 150 to {돈.%player's uuid%}
message "&a밀 160개를 150골드에 판매하였습니다!"
play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 to player
else:
message "&c밀(이)가 인벤토리에 존재하지 않습니다!"
play sound "BLOCK_ANVIL_PLACE" with volume 1 and pitch 1 to player
else if "%click type%" contains "RIGHT":
if player has 16 wheat:
remove 16 wheat from player
add 15 to {돈.%player's uuid%}
message "&a밀 16개를 15골드에 판매하였습니다!"
play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 to player
else:
message "&c밀(이)가 인벤토리에 존재하지 않습니다!"
play sound "BLOCK_ANVIL_PLACE" with volume 1 and pitch 1 to player
else if "%click type%" contains "SHIFT_LEFT":
if {돈.%player's uuid%} >= 150:
remove 150 from {돈.%player's uuid%}
give 160 wheat to player
message "&a150골드로 밀 160개를 구입하였습니다!"
play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 to player
else:
message "&c골드가 부족합니다! &f[&e당신의 골드 &f: %{돈.%player's uuid%}%]"
play sound "BLOCK_ANVIL_PLACE" with volume 1 and pitch 1 to player
else if "%click type%" contains "LEFT":
if {돈.%player's uuid%} >= 15:
remove 15 from {돈.%player's uuid%}
give 16 wheat to player
message "&a15골드로 밀 16개를 구입하였습니다!"
play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 to player
else:
message "&c골드가 부족합니다! &f[&e당신의 골드 &f: %{돈.%player's uuid%}%]"
play sound "BLOCK_ANVIL_PLACE" with volume 1 and pitch 1 to player
코코냐
2024.07.10https://docs.skunity.com/syntax/search/id:10545
모르겠으면 로그를 찍어봅시다 차라리..