개인 자료란 (JE)

  서버 커뮤니티

Profile 초코초콜YT 대표칭호 없음
Profile

질문하기 스크립트

스크립트 잘 아시는 고수분 도와주세요!

2022.01.12 조회 수 607 추천 수 0
이해도 초보자(스크립트 구성요소나 기본문법은 알아요) 
게임버전 (JE) 1.17.1 
게임버전 (BE) 관련없음 
스크립트 버전 2.6 

command /레벨초기화:

    trigger:

        if player is op:

            set {%uuid of player%.레벨} to 1

            set {%uuid of player%.경험치} to 0

            set {%uuid of player%.최대경험치} to 30

            set {%uuid of player%.100레벨} to true

            set {%uuid of player%.150레벨} to true

            set {%uuid of player%.200레벨} to true

            message "&e레벨, 겸험치, 최대경험치를 초기화 하였습니니다."


every 1 tick:

    loop all players:

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

            set {%uuid of loop-player%.경험치} to ({%uuid of loop-player%.경험치} - {%uuid of loop-player%.최대경험치})

            set {%uuid of loop-player%.최대경험치} to ({%uuid of loop-player%.최대경험치} * 1.1)

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

            message " %{레벨}% &e%{%uuid of loop-player%.레벨}%&e레벨을 달성하였습니다" to loop-player

            

every 1 tick:

    loop all players:

        if {%uuid of loop-player%.레벨} = 100:

            if {%uuid of loop-player%.100레벨} is true:

                broadcast "&e==============================%nl% %nl%&e(&a축&e) &6%loop-player%&6님이 100레벨을 달성하였습니다. &e(&a축&e)%nl% %nl%&e=============================="

                set {%uuid of loop-player%.100레벨} to false

        if {%uuid of loop-player%.레벨} = 150:

            if {%uuid of loop-player%.150레벨} is true:

                broadcast "&e==============================%nl% %nl%&e(&a축&e) &6%loop-player%&6님이 150레벨을 달성하였습니다. &e(&a축&e)%nl% %nl%&e=============================="

                set {%uuid of loop-player%.150레벨} to false

        if {%uuid of loop-player%.레벨} = 200:

            if {%uuid of loop-player%.200레벨} is true:

                broadcast "&e==============================%nl% %nl%&e(&a축&e) &6%loop-player%&6님이 200레벨을 달성하였습니다. &e(&a축&e)%nl% %nl%&e=============================="

                set {%uuid of loop-player%.200레벨} to false


command /레벨설정 [<integer>]:

    trigger:

        if player is op:

            set {%uuid of player%.레벨} to arg-1

            

command /경험치설정 [<integer>]:

    trigger:

        if player is op:

            set {%uuid of player%.경험치} to arg-1

            

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

    trigger:

        if player is op:

            add arg-1 to {%uuid of player%.경험치}

            

command /최대경험치설정 [<integer>]:

    trigger:

        if player is op:

            set {%uuid of player%.최대경험치} to arg-1

이렇게 되어 있는데 레벨이 소수점이 되면 반올림해서 자연 수 가 되게 하는 법 아시는분?




3개의 댓글

거너아나
2022.01.12

round(변수) 일시 변수가 반올림됩니다

초코초콜YT
2022.01.13
@거너아나

제가 잘 이해가 안되서 그러는데 어떻게 한는지 예시 보여 주 실 수 있나요?

거너아나
2022.01.14
@초코초콜YT

set {%uuid of player%.레벨} to round({%uuid of player%.레벨})

뉴스 및 창작물
/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/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