개인 자료란 (JE)

  서버 커뮤니티

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

질문하기 스크립트

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

2022.01.12 조회 수 586 추천 수 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/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

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

업데이트

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