개인 자료란 (JE)

  서버 커뮤니티

Profile seah 대표칭호 없음
Profile

질문하기 스크립트

주식 스크립트 도와주세요 ㅠㅠ

2023.11.08 조회 수 53 추천 수 0
이해도 초보자 
게임버전 (JE) 1.16.5 
게임버전 (BE) 1.16.x 

on inventory click:

    if iname contains "&6주식목록":

        if clicked raw slot is between 10 and 16:

            cancel event

            loop {주식::목록::*}:

                if name of clicked item contains loop-index:

                    if click type is right mouse button:

                        if {주식::목록::%loop-index%::현재갯수} >= 1:

                            if player has space for 1 of loop-value named loop-index:

                                if {돈.%uuid of player%} >= {주식::목록::%loop-index%::매매가}:

                                    subtract 1 from {주식::목록::%loop-index%::현재갯수}

                                    subtract {주식::목록::%loop-index%::매매가} from {돈.%uuid of player%}

                                    give player 1 of loop-value named "&6%loop-index%"

                    if click type is right mouse button with shift:

                        if {주식::목록::%loop-index%::현재갯수} >= 10:

                            if player has space for 10 of loop-value named loop-index:

                                if {돈.%uuid of player%} >= {주식::목록::%loop-index%::매매가}*10:

                                    subtract 10 from {주식::목록::%loop-index%::현재갯수}

                                    subtract {주식::목록::%loop-index%::매매가}*10 from {돈.%uuid of player%}

                                    give player 10 of loop-value named "&6%loop-index%"

                    if click type is left mouse button:

                        if player has 1 of loop-value named "&6%loop-index%":

                            add 1 to {주식::목록::%loop-index%::현재갯수}

                            add {주식::목록::%loop-index%::매매가} to {돈.%uuid of player%}

                            remove 1 of loop-value named "&6%loop-index%" from player's inventory

                    if click type is left mouse button with shift:

                        if player has 10 of loop-value named "&6%loop-index%":

                            add 10 to {주식::목록::%loop-index%::현재갯수}

                            add {주식::목록::%loop-index%::매매가}*10 to {돈.%uuid of player%}

                            remove 10 of loop-value named "&6%loop-index%" from player's inventory

        else:

            cancel event


   

 if iname contains "&6주식목록": 부분이 에러 뜨면서 밑에 처럼 에러가 뜨는데 어떻게 해야하나요?





3개의 댓글

세찐찐
2023.11.08

if iname contains는 1.13+ 버전에서는 사용이 불사능 합니다

seah
2023.11.08
@세찐찐

그럼 어떻게 해야하나요?

 

세찐찐
2023.11.08
@seah

if name of event-inventory is 로 변경해두세요

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

모드

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

학교가기싫다

2024-05-08

1

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

업데이트

마인크래프트 자바 에디션 스냅샷 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