개인 자료란 (JE)

  서버 커뮤니티

Profile ANEW 대표칭호 없음

ANEW_ 4be66e0573fe46f79942e54d78bd1e0c

Profile

질문하기 스크립트

플레이어의 xp 값을 표시하고싶습니다.

2020.05.14 조회 수 989 추천 수 0
이해도 1.15 

on rightclick on entity:

    if entity's name is "경험차":

        set {xp} to level progress of player

        wait 1 tick

        open chest with 1 rows named "경험치 교환" to player

        set slot 5 of current inventory of player to book named "&6&l현재 경험치 량 :%{xp}%"

플레이어의 level 이 아닌 진짜 경험치 값을 표시하고 싶은데, 어떤 구문이 들어가야 하는지 감을 못잡겠습니다. ㅠㅠ

experience, xp point, level point 등등 해도 인식을 못하네요

도움 부탁드립니다...ㅠㅠ

3개의 댓글

스크립터브혼
2020.05.14
function ExprTotalExperience(p:player) :: integer:
    set {_level.exp} to round calcExperience( round level of {_p} )
    set {_exp} to round ( ( ( calcExperience( round level of {_p} + 1 ) ) - {_level.exp} ) * level progress of {_p} )
    set {_total.exp} to round ( {_level.exp}{_exp} )
    return {_total.exp}

이 함수를 사용해 보세요.

command /calc.exp2:
    trigger:
        set {_exp} to ExprTotalExperience( player )
        send "%{_exp}%" to console

이렇게 사용하시면 됩니다.

ANEW
2020.05.15
@스크립터브혼

이런식으로 값을 내는게 가능하군요. 정말 많은 도움 되었습니다. 스크립트 세계가 많이 깊고 흥미롭네요! 공부 정진하겠습니다!

뉴스 및 창작물
/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