개인 자료란 (JE)

  서버 커뮤니티

Profile seah 대표칭호 없음
Profile

질문하기 스크립트

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

2023.11.08 조회 수 112 추천 수 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 로 변경해두세요