개인 자료란 (JE)

  서버 커뮤니티

Profile qjdurh03 대표칭호 없음
Profile

질문하기 스크립트

스크립트 클릭이벤트 질문

2022.07.21 조회 수 56 추천 수 0
이해도 입문자(아무것도 몰라요) 
게임버전 (JE) 1.12.2 
게임버전 (BE) 관련없음 

주식 스크립트중 클릭이벤트 부분이 1.12.2와 맞지 않는것 같아 질문드립니다.

어디를 어떻게 고쳐야할까요? 자세히 설명해주시면 감사하겠습니다.

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 click:

                    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 click:

                    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


1개의 댓글

qsef1256
2022.07.21

어느 구문에서 문제가 발생하는지 까지는 적어오셔야죠

뉴스 및 창작물
/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240428135129

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1