개인 자료란 (JE)

  서버 커뮤니티

Profile 국밥집사장님 대표칭호 없음
Profile

질문하기 스크립트

GUI 상점 스크립트 쉬프트 + 마우스 왼/오 가안돼요..

2024.07.10 조회 수 147 추천 수 0
이해도 중급자 
게임버전 (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





1개의 댓글

코코냐
2024.07.10

https://docs.skunity.com/syntax/search/id:10545

모르겠으면 로그를 찍어봅시다 차라리..

뉴스 및 창작물
/files/thumbnails/844/958/003/262x150.crop.jpg?20250111133615

건축

중세판타지 성 / '판타시아' / 1인 건축 완성 1

콩산

2025-01-11

0

/files/thumbnails/124/946/003/262x150.crop.jpg?20241225132838

모드

Record, Catch Update || Cobblemon 1.6 Official Trailer

BMlight

2024-12-25

2

/files/thumbnails/945/944/003/262x150.crop.jpg?20241223202710

이벤트

세븐일레븐 건축 강좌 보고 댓글달면 건축 가이드 받을 수 있어요!

다코미

2024-12-23

0

/files/thumbnails/206/939/003/262x150.crop.jpg?20241213131516

상품

《레고 마인크래프트 아이디어 북》 출간!

다코미

2024-12-13

1

/files/thumbnails/500/937/003/262x150.crop.jpg?20241210152228

상품

《마인크래프트 1일 1페이지 아이디어 북》 출간!

다코미

2024-12-10

0