이해도 | 초보자 |
---|---|
게임버전 (JE) | 1.19.3 |
게임버전 (BE) | 관련없음 |
밑 스크립트를 서버를 껏다 키면 변수로 지정한 것들이 none라고 뜹니다.. /레벨초기화 를 하면 정상 작동은 하는데 명령어를 치기 전까진 none이라고 뜨네요..
options:
a : &f[&b&l알림&f]
every 10 tick:
loop all players:
#if {level백분율.%loop-player%} is true:
#set {_xp} to ({경험치::%uuid of loop-player%}/{최대경험치::%uuid of loop-player%})*100
#send action bar "&cHP &f: %health of loop-player% / %max health of loop-player% &eLv &f%{레벨::%uuid of loop-player%}% &eExp &a%rounded {_xp}%%%" to loop-player
if {level백분율.%uuid of loop-player%} is false:
send action bar "&cHP &f: %health of loop-player% / %max health of loop-player% &eLv &f%{레벨::%uuid of loop-player%}% &aExp &f%{경험치::%uuid of loop-player%}% &f/ &f%{최대경험치::%{레벨::%uuid of loop-player%}%}%" to loop-player
command /액션바설정 [<text>]:
trigger:
if arg 1 is "표시":
set {level백분율.%uuid of player%} to false
if arg 1 is "비표시":
delete {level백분율.%uuid of player%}
send action bar "" to player
on join:
make player run command "/액션바설정 표시" as op
command /레벨초기화:
trigger:
player is op:
loop all players:
set {레벨::%uuid of loop-player%} to 0
set {경험치::%uuid of loop-player%} to 0
set {만렙::%uuid of loop-player%} to false
set {최대경험치::0} to 30
message "{@a} 경험치 세팅이 리로드 되었습니다!" to player
broadcast "{@a} &f레벨이 초기화되었습니다!"
command /만렙변경 [<integer>]:
trigger:
player is op:
if arg 1 is set:
set {만렙} to arg 1
loop all players:
if {레벨::%uuid of loop-player%} = {최대레벨}:
set {만렙::%uuid of loop-player%} to false
set {최대레벨} to arg-1
set {경험치::%uuid of loop-player%} to 0
else:
set {최대레벨} to arg-1
message "{@a} 만렙 경험치 세팅이 리로드 되었습니다!" to loop-player
message "최대레벨 : %{최대레벨}%" to loop-player
else:
send "/만렙변경 [최대레벨]" to player
loop {만렙} times:
set {만렙숫자} to loop-number
set {만렙숫자플러스} to {만렙숫자} * 2.5
set {경험치에요} to {만렙숫자} + 64 * {만렙숫자플러스}
set {최대경험치::%{만렙숫자}%} to {경험치에요}
#set {최대경험치::%{만렙}%} to "MAX"
#================================================================================================================
every 10 tick:
loop all players:
if {경험치::%uuid of loop-player%} >= {최대경험치::%{레벨::%uuid of loop-player%}%}:
if {레벨::%uuid of loop-player%} < {최대레벨}:
subtract {최대경험치::%{레벨::%uuid of loop-player%}%} from {경험치::%uuid of loop-player%}
wait 1 tick
add 1 to {레벨::%uuid of loop-player%}
message "&6----------------------------------------" to loop-player
message "{@a} &a축하합니다! &d레벨&f이 1 올랐습니다!" to loop-player
message "&6----------------------------------------" to loop-player
play sound "ENTITY_PLAYER_LEVELUP" to loop-player
if {레벨::%uuid of loop-player%} = {최대레벨}:
#set {경험치::%uuid of loop-player%} to "MAX"
set {최대경험치::%{만렙}%} to "MAX"
if {만렙::%uuid of loop-player%} is false:
set {경험치::%uuid of loop-player%} to "MAX"
#set {최대경험치::%{만렙}%} to "MAX"
play sound "ui.toast.challenge_complete" with volume 1 and pitch 1 at loop-player
message "&6----------------------------------------" to loop-player
message "{@a}&a 축하합니다! &d레벨&f이 최대치에 도달하였습니다!" to loop-player
message "&6----------------------------------------" to loop-player
set {만렙::%uuid of loop-player%} to true
command /경험치주기 [<offlineplayer>] [<integer>]:
trigger:
player is op:
if arg 2 is not set:
message "&6----------------------------------------" to player
message "{@a} : &e경험치주기사용법 &f/경험치주기 &a[지급할경험치] &b[유저닉네임]" to player
message "&6----------------------------------------" to player
else:
if arg 1 is not set:
message "{@a} : 지급 할 &b플레이어 닉네임&f을 입력해주세요!"
else:
add arg 2 to {경험치::%uuid of arg 1%}
message "{@a} : &b%arg 1%&f님에게 &a경험치&f를 &a%arg 2%&f만큼 보냈습니다!"
message "{@a} : &e관리자로부터 &a%arg 2%&f만큼 지급받으셨습니다!" to arg 1
every 1 tick:
loop all players:
set loop-player's level to {레벨::%uuid of loop-player%}
set loop-player's level progress to {경험치::%uuid of loop-player%}/{최대경험치::%{레벨::%uuid of loop-player%}%}
댓글이 없습니다.
새로운 댓글을 등록해 주세요!