개인 자료란 (JE)

  서버 커뮤니티

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

질문하기 스크립트

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

2024.07.10 조회 수 64 추천 수 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/348/896/003/262x150.crop.jpg?20241006103035

디도스/봇테러등등을 낚는 방법 3

물귀신

2024-10-06

1

/files/thumbnails/839/895/003/262x150.crop.jpg?20241006021227

SRV레코드는 보안도메인이 아닙니다. [서버오픈시 필독]

물귀신

2024-10-05

2

/files/thumbnails/648/892/003/262x150.crop.jpg?20241002184058

아티클

마인크래프트 라이브 2024 후기: 무성의가 느껴졌던 '절망편' 라이브

라비

2024-10-02

2

/files/thumbnails/693/890/003/262x150.crop.jpg?20241007140310

소식

[방송인 필독] 시참 컨텐츠 방송인분들께 DDoS(디도스) 공격을 퍼붓는 용의자 특정중, 예방 & 대처법 정리 9

해그

2024-10-01

1

사진이 없습니다.

레드스톤

[노트블럭 패러디] 신창섭 - 모장이 다해줬잖아

노트블럭전문가

2024-09-28

0