이해도 | 초보자(스크립트 구성요소나 기본문법은 알아요) |
---|---|
게임버전 (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
이렇게 되어 있는데 레벨이 소수점이 되면 반올림해서 자연 수 가 되게 하는 법 아시는분?
거너아나
2022.01.12round(변수) 일시 변수가 반올림됩니다
초코초콜YT
2022.01.13제가 잘 이해가 안되서 그러는데 어떻게 한는지 예시 보여 주 실 수 있나요?
거너아나
2022.01.14set {%uuid of player%.레벨} to round({%uuid of player%.레벨})