개인 자료란 (JE)

  서버 커뮤니티

Profile seah 대표칭호 없음
Profile

질문하기 스크립트

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

2023.11.08 조회 수 52 추천 수 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/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