개인 자료란 (JE)

  서버 커뮤니티

Profile ysj5896 대표칭호 없음
Profile

질문하기 스크립트

레벨 스크립트

2023.02.27 조회 수 514 추천 수 0
이해도 초보자 
게임버전 (JE) 1.19.3 
게임버전 (BE) 관련없음 

밑 스크립트를 서버를 껏다 키면 변수로 지정한 것들이 none라고 뜹니다.. /레벨초기화 를 하면 정상 작동은 하는데 명령어를 치기 전까진 none이라고 뜨네요..


options:

    a : &f[&b&l알림&f]



every 10 tick:

    loop all players:

        #if {level백분율.%loop-player%} is true:

            #set {_xp} to ({경험치::%uuid of loop-player%}/{최대경험치::%uuid of loop-player%})*100

            #send action bar "&cHP &f: %health of loop-player% / %max health of loop-player% &eLv &f%{레벨::%uuid of loop-player%}% &eExp &a%rounded {_xp}%%%" to loop-player

        if {level백분율.%uuid of loop-player%} is false:

            send action bar "&cHP &f: %health of loop-player% / %max health of loop-player% &eLv &f%{레벨::%uuid of loop-player%}% &aExp &f%{경험치::%uuid of loop-player%}% &f/ &f%{최대경험치::%{레벨::%uuid of loop-player%}%}%" to loop-player



command /액션바설정 [<text>]:

    trigger:

        if arg 1 is "표시":

            set {level백분율.%uuid of player%} to false

        if arg 1 is "비표시":

            delete {level백분율.%uuid of player%}

            send action bar "" to player


on  join:

    make player run command "/액션바설정 표시" as op


    

command /레벨초기화:

    trigger:

        player is op:

            loop all players:

                set {레벨::%uuid of loop-player%} to 0

                set {경험치::%uuid of loop-player%} to 0

                set {만렙::%uuid of loop-player%} to false

                set {최대경험치::0} to 30


            message "{@a} 경험치 세팅이 리로드 되었습니다!" to player

            broadcast "{@a} &f레벨이 초기화되었습니다!"


        

            


command /만렙변경 [<integer>]:

    trigger:

        player is op:

            if arg 1 is set:    

                set {만렙} to arg 1

                

                loop all players:

                    if {레벨::%uuid of loop-player%} = {최대레벨}:

                        set {만렙::%uuid of loop-player%} to false

                        set {최대레벨} to arg-1

                        set {경험치::%uuid of loop-player%} to 0

                    else:

                        set {최대레벨} to arg-1

                        message "{@a} 만렙 경험치 세팅이 리로드 되었습니다!" to loop-player

                        message "최대레벨 : %{최대레벨}%" to loop-player    

            else:

                send "/만렙변경 [최대레벨]" to player

            loop {만렙} times:

                set {만렙숫자} to loop-number

                set {만렙숫자플러스} to {만렙숫자} * 2.5

                set {경험치에요} to {만렙숫자} + 64 * {만렙숫자플러스}

                set {최대경험치::%{만렙숫자}%} to {경험치에요}

                #set {최대경험치::%{만렙}%} to "MAX"


#================================================================================================================


every 10 tick:

    loop all players:

        if {경험치::%uuid of loop-player%} >= {최대경험치::%{레벨::%uuid of loop-player%}%}:

            if {레벨::%uuid of loop-player%} < {최대레벨}:

                subtract {최대경험치::%{레벨::%uuid of loop-player%}%} from {경험치::%uuid of loop-player%}

                wait 1 tick

                add 1 to {레벨::%uuid of loop-player%}

                message "&6----------------------------------------" to loop-player

                message "{@a} &a축하합니다! &d레벨&f이 1 올랐습니다!" to loop-player

                message "&6----------------------------------------" to loop-player

                play sound "ENTITY_PLAYER_LEVELUP" to loop-player

            if {레벨::%uuid of loop-player%} = {최대레벨}:

                #set {경험치::%uuid of loop-player%} to "MAX"

                set {최대경험치::%{만렙}%} to "MAX"

                if {만렙::%uuid of loop-player%} is false:

                    set {경험치::%uuid of loop-player%} to "MAX"

                    #set {최대경험치::%{만렙}%} to "MAX"

                    play sound "ui.toast.challenge_complete" with volume 1 and pitch 1 at loop-player

                    message "&6----------------------------------------" to loop-player

                    message "{@a}&a 축하합니다! &d레벨&f이 최대치에 도달하였습니다!" to loop-player

                    message "&6----------------------------------------" to loop-player

                    set {만렙::%uuid of loop-player%} to true



command /경험치주기 [<offlineplayer>] [<integer>]:

    trigger:

        player is op:

            if arg 2 is not set:

                message "&6----------------------------------------" to player

                message "{@a} : &e경험치주기사용법 &f/경험치주기 &a[지급할경험치] &b[유저닉네임]" to player

                message "&6----------------------------------------" to player

            else:    

                if arg 1 is not set:

                    message "{@a} : 지급 할 &b플레이어 닉네임&f을 입력해주세요!"

                else:

                    add arg 2 to {경험치::%uuid of arg 1%}

                    message "{@a} : &b%arg 1%&f님에게 &a경험치&f를 &a%arg 2%&f만큼 보냈습니다!"

                    message "{@a} : &e관리자로부터 &a%arg 2%&f만큼 지급받으셨습니다!" to arg 1


every 1 tick:

    loop all players:

        set loop-player's level to {레벨::%uuid of loop-player%} 

        set loop-player's level progress to {경험치::%uuid of loop-player%}/{최대경험치::%{레벨::%uuid of loop-player%}%}


Warning
댓글이 없습니다.

새로운 댓글을 등록해 주세요!

뉴스 및 창작물
/files/thumbnails/761/908/003/262x150.crop.jpg?20241025153749

건축

서울 숭례문(崇禮門) 4

KHC

2024-10-25

2

/files/thumbnails/578/899/003/262x150.crop.jpg?20241010142350

건축

경주 월정교 1

KHC

2024-10-10

2

/files/thumbnails/219/899/003/262x150.crop.jpg?20241009200950

건축

송전탑+도시 2

dbasd12

2024-10-09

2

/files/thumbnails/246/898/003/262x150.crop.jpg?20241008102328

레드스톤

단다단 - 오토노케(オトノケ) | 마인크래프트 노트블럭 커버

노트블럭전문가

2024-10-08

1

/files/thumbnails/348/896/003/262x150.crop.jpg?20241006103035

디도스/봇테러등등을 낚는 방법 4

물귀신

2024-10-06

3