이해도 | 입문자 |
---|---|
게임버전 (JE) | 1.19.2 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | 2.6.4 |
이 스크립트 구문에서 어떤 문제가 있나요? 자꾸 즉시 치유 효과만 나오던데
on rightclick:
if name of player's tool is "&6조커의 선물상자":
chance of 20%:
apply potion of instant health of tier 3 to player for 1 seconds
set {테::%player%::스트::초} to 15
loop 15 times:
wait 20 tick
subtract 1 from {테::%player%::스트::초}
if {테::%player%::스트::초} is 0:
delete {테::%player%::스트::초}
message "&a스킬이 다시 사용 가능합니다." to player
chance of 20%:
apply potion of strength of tier 255 to player for 2.5 seconds
set {테::%player%::스트::초} to 15
loop 15 times:
wait 20 tick
subtract 1 from {테::%player%::스트::초}
if {테::%player%::스트::초} is 0:
delete {테::%player%::스트::초}
message "&a스킬이 다시 사용 가능합니다." to player
chance of 20%:
apply potion of resistance of tier 255 to player for 3 seconds
set {테::%player%::스트::초} to 15
loop 15 times:
wait 20 tick
subtract 1 from {테::%player%::스트::초}
if {테::%player%::스트::초} is 0:
delete {테::%player%::스트::초}
message "&a스킬이 다시 사용 가능합니다." to player
chance of 3%:
apply potion of instant health of tier 3 to player for 1 seconds
apply potion of resistance of tier 255 to player for 3 seconds
apply potion of strength of tier 255 to player for 2.5 seconds
set {테::%player%::스트::초} to 15
loop 15 times:
wait 20 tick
subtract 1 from {테::%player%::스트::초}
if {테::%player%::스트::초} is 0:
delete {테::%player%::스트::초}
message "&a스킬이 다시 사용 가능합니다." to player
chance of 37%:
send title "&c꽝" to player for 2 seconds
apply potion of slowness of tier 255 to player for 3 seconds
set {테::%player%::스트::초} to 15
loop 15 times:
wait 20 tick
subtract 1 from {테::%player%::스트::초}
if {테::%player%::스트::초} is 0:
delete {테::%player%::스트::초}
message "&a스킬이 다시 사용 가능합니다." to player
qsef1256
2023.03.14확률이 장난 아니네요, 첫번째 분기인 힘 포션부터 확률이 0.04% 인데 나올리가 없죠. 들여쓰기가 의미하는게 뭔지 다시 한번 생각해보세요.