개인 자료란 (JE)

  서버 커뮤니티

Profile 아랍사람 대표칭호 없음
Profile

질문하기 스크립트

상점 스크립트 오류

2023.12.30 조회 수 31 추천 수 0
게임버전 (BE) 관련없음 
스크립트 버전 2.7.3 

on inventory click:

    if event-inventory's display name contains "상점":

        cancel event

        if event-slot is not air:

            if event-inventory is open inventory:

                set {_lore::*} to uncolored lore of click item

                loop {_lore::*}:

                    if {_lore::%loop-index%} contains "판매가격":

                        set {_buy} to {_lore::%loop-index%}

                        replace all " " and "[" and "]" and "판매가격" with "" in {_buy}

                        set {_buy} to {_buy} parsed as integer

                        if click type is right mouse button:

                            if {_buy} is not 0:

                                if amount of 1 of clicked item in inventory of player >= 1:

                                    add {_buy} to {money::%uuid of player%}

                                    send "%clicked item% 1개를 %{_buy}%원에 판매 완료"

                                    remove 1 of clicked item from player's inventory

                                else:

                                    send "판매할 아이템을 보유하고 있지 않습니다."

                            else:

                                send "판매가 불가능한 아이템입니다."

                        if click type is right mouse button with shift:

                            if {_buy} is not 0:

                                if amount of 1 of clicked item in inventory of player >= 1:

                                    set {_item_amount} to amount of clicked item in inventory of player

                                    add {_buy} * {_item_amount} to {money::%uuid of player%}

                                    send "%clicked item% %{_item_amount}%개를 %{_buy} * {_item_amount}%원에 판매 완료"

                                    remove {_item_amount} of clicked item from player's inventory

                                else:

                                    set {_item_amount} to item amount of clicked slot

                                    send "판매할 아이템을 보유하고 있지 않습니다. %clicked item% %{_item_amount}%"

                            else:

                                send "판매가 불가능한 아이템입니다."


이 구문을 쓰고 오류 메세지는 안떴는데 상점에 있는 아이템을 우클릭 하면 계속 판매할 아이템을 보유하고 있지 않다고 뜨는데 뭐가 잘못된건가요??



Warning
댓글이 없습니다.

새로운 댓글을 등록해 주세요!

뉴스 및 창작물
/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견

학교가기싫다

2024-05-08

0

/files/thumbnails/384/778/003/262x150.crop.jpg?20240507003327

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1

/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