개인 자료란 (JE)

  서버 커뮤니티

Profile ANEW 대표칭호 없음

ANEW_ 4be66e0573fe46f79942e54d78bd1e0c

Profile

질문하기 스크립트

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

2020.05.14 조회 수 979 추천 수 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/520/751/003/262x150.crop.jpg?20240328020349

레드스톤

마인크래프트 노트블록으로 만든 『 Bling‐Bang‐Bang‐Born 』 1

Sonttukk

2024-03-23

1

/files/thumbnails/467/742/003/262x150.crop.jpg?20240311163123

레드스톤

[노트블럭커버] MILGRAM -ミルグラム(밀그램)- / 아마네 「숙청 행진」 제 2심 2

리비온

2024-03-11

0

/files/thumbnails/846/741/003/262x150.crop.jpg?20240310221214

레드스톤

워든 vs 라마 200마리 1

GlassesFilm

2024-03-10

0

/files/thumbnails/542/739/003/262x150.crop.jpg?20240309070457

레드스톤

[고인의 명복을 빕니다][노트블럭]드래곤볼 GT 오프닝 - 점점 마음이 끌려

리비온

2024-03-09

0

/files/thumbnails/326/738/003/262x150.crop.jpg?20240328020414

레드스톤

마인크래프트 노트블록으로 만든 『 Build Our Machine 』

Sonttukk

2024-03-07

0