이해도 | 초보자(스크립트 구성요소나 기본문법은 알아요) |
---|---|
게임버전 (JE) | 1.12.2 |
스크립트 버전 | 최신 |
#무기 스텟
every 1 tick:
loop all players:
if lore of loop-player's tool contains "공격력":
set {_lore::*} to uncolored lore of loop-player's tool
loop {_lore::*}:
if {_lore::%loop-index%} contains "공격력":
set {_공격력} to "%{_lore::%loop-index%}%"
replace all "공격력" and " " and "-" with "" in {_공격력}
set {무기::%loop-player%::무기상수} to {_공격력} parsed as number
if {_lore::%loop-index%} contains "크뎀":
set {_크뎀} to "%{_lore::%loop-index%}%"
replace all "크뎀" and " " and "-" with "" in {_크뎀}
set {무기::%loop-player%::크뎀} to {_크뎀} parsed as number
else:
delete {무기::%loop-player%::*}
#스텟 동기화
every 1 seconds:
loop all players:
set {체력.%loop-player%} to 10 + {신발::%loop-player%::체력} + {갑바::%loop-player%::체력} + {헬멧::%loop-player%::체력} + {바지::%loop-player%::체력}
set {공격력.%loop-player%} to {신발::%loop-player%::공격력} + {갑바::%loop-player%::공격력} + {헬멧::%loop-player%::공격력} + {바지::%loop-player%::공격력}
set {무기상수.%loop-player%} to {무기::%loop-player%::무기상수}
set {크뎀.%loop-player%} to {무기::%loop-player%::크뎀} + 200
set {크확.%loop-player%} to 10
if loop-player's helmet is air:
set {헬멧::%loop-player%::체력} to 0
set {헬멧::%loop-player%::공격력} to 1
if loop-player's chestplate is air:
set {갑바::%loop-player%::체력} to 0
set {갑바::%loop-player%::공격력} to 1
if loop-player's leggings is air:
set {바지::%loop-player%::체력} to 0
set {바지::%loop-player%::공격력} to 1
if loop-player's boots is air:
set {신발::%loop-player%::체력} to 0
set {신발::%loop-player%::공격력} to 1
command /능력치:
trigger:
message "무기상수 : %{무기상수.%player%}%"
message "공격력 : %{공격력.%player%}%"
message "크확 : %{크확.%player%}%"
message "크뎀 : %{크뎀.%player%}%"
message "체력 : %{체력.%player%}%"
이리 하고
스크립트 불러오기 했는데 오류 뜬 것도 없길래
이거들고
/능력치 쳤는데 크뎀하고 무기상수가 <none>으로 뜨고 크뎀은 적용안되는데 왜 이런건가요?
스크립터브혼
2021.09.04지식인에 같은 질문이 있어 그쪽으로 답변드렸습니다.
laevateinn
2021.09.06감사합니다!