개인 자료란 (JE)

  서버 커뮤니티

Profile 바람의너를 대표칭호 없음

windwolf0 eb03c9f65da24c338ffbbc8703e369b8

Profile

질문하기 스크립트

보상지급 변수가 이상합니다.

2023.07.12 조회 수 27 추천 수 0
이해도 초보자 
게임버전 (JE) 1.16.5 
게임버전 (BE) 관련없음 
스크립트 버전 2.6 
스크립트 애드온 스크비,스칼렛 다있습니다. 

on inventory click:

    if name of event-inventory is "&l보스 보상 (주의! 인벤을 받으면 보상을 수령할수 없습니다.)":

        cancel event

        if name of clicked item is "[가챠권] 확률돈가챠":

            if number of air in the player's inventory < 0:

                send "{@접두사} 인벤토리를 1칸이상 비워주세요."

                stop

        if {보상수령횟수.%player%} = 3:

            send "{@접두사} 이미 오늘치 보상을 모두 받았습니다."

            stop

        if {보상수령횟수.%player%} <= 3:

            give {보스.보상.확률돈::*} to player

            send "{@접두사} 보상이 지급되었습니다."    

            add 1 to {보상수령횟수.%player%}

            stop

        if name of clicked item is "3만원":

            if number of air in the player's inventory < 0:

                send "{@접두사} 인벤토리를 1칸이상 비워주세요."

                stop

        if {보상수령횟수.%player%} = 3:

            send "{@접두사} 이미 오늘치 보상을 모두 받았습니다."

            stop

        if {보상수령횟수.%player%} < 3:

            give {보스.보상.확정돈::*} to player

            send "{@접두사} 보상이 지급되었습니다."    

            add 1 to {보상수령횟수.%player%}

            stop

        if name of clicked item is "[가챠권] 경험치가챠":

            if number of air in the player's inventory < 0:

                send "{@접두사} 인벤토리를 1칸이상 비워주세요."

                stop

        if {보상수령횟수.%player%} = 3:

            send "{@접두사} 이미 오늘치 보상을 모두 받았습니다."

            stop

        if {보상수령횟수.%player%} < 3:

            give {보스.보상.확률경험치::*} to player

            send "{@접두사} 보상이 지급되었습니다."    

            add 1 to {보상수령횟수.%player%}

            stop

        if name of clicked item is "경험사탕L 10개":

            if number of air in the player's inventory < 0:

                send "{@접두사} 인벤토리를 1칸이상 비워주세요."

                stop

        if {보상수령횟수.%player%} = 3:

            send "{@접두사} 이미 오늘치 보상을 모두 받았습니다."

            stop

        if {보상수령횟수.%player%} < 3:

            give {보스.보상.확정경험치::*} to player

            send "{@접두사} 보상이 지급되었습니다."    

            add 1 to {보상수령횟수.%player%}

            stop

클릭한 아이템의 이름을 인식하여서 보상을 지급하는 형식의 구문인데
어떤슬롯을 클릭해도 가장 위에 있는 보상만 수령됩니다.




1개의 댓글

코코냐
2023.07.12

if문 들여쓰기가 잘못되었습니다. 코드를 다시 확인해주세요.

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

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

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

업데이트

마인크래프트 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