개인 자료란 (JE)

  서버 커뮤니티

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

windwolf0 eb03c9f65da24c338ffbbc8703e369b8

Profile

질문하기 스크립트

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

2023.07.12 조회 수 32 추천 수 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/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/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