개인 자료란 (JE)

  서버 커뮤니티

Profile ANEW 대표칭호 없음

ANEW_ 4be66e0573fe46f79942e54d78bd1e0c

Profile

질문하기 스크립트

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

2020.05.14 조회 수 1011 추천 수 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/932/812/003/262x150.crop.jpg?20240616121638

업데이트

마인크래프트 1.21 정식 업데이트

학교가기싫다

2024-06-14

1

/files/thumbnails/308/805/003/262x150.crop.jpg?20240605201646

레드스톤

[노트블럭 커버] 팬서비스/mona 【 HoneyWorks 】

노트블럭전문가

2024-06-05

0

/files/thumbnails/288/791/003/262x150.crop.jpg?20240602150002

아티클

《까다로운 시련》 업데이트 날짜 공개 및 정보

학교가기싫다

2024-06-02

0

/files/thumbnails/841/773/003/262x150.crop.jpg?20240526120908

레드스톤

마인크래프트 노트블록버전 『 봄을 고하다 (春を告げる) 』 [더블옥타브 버전]

노트블럭전문가

2024-05-26

0

/files/thumbnails/712/796/003/262x150.crop.jpg?20240525085438

레드스톤

마인크래프트 노트블록으로 만든 『 봄을 고하다 (春を告げる) 』 1

Sonttukk

2024-05-25

1