VIVIZ fbeec1916c63459d98c3558c702e708a
| 이해도 | 입문자 |
|---|---|
| 게임버전 (JE) | 1.18.2 |
| 게임버전 (BE) | 관련없음 |
| 스크립트 버전 | 2.6.2 |
| 스크립트 애드온 | skbee 2.17.0 ? |
요즘 AI를 이용해서 개인 서버에서
스크립트로 스킬을 만들면서 오픈은 못하지만 건축, 리소스팩, 스킬 등등 만들며 개발중 입니다!!
쿨타임 남은 시간을 채팅에 표시해주는데, 간혹 원래는 안그러다가 쿨타임 문구가 두번씩 출력되는 경우가 있더라구요ㅠㅠ
서버를 리붓 하면 돌아오기도 하고 아닐때도 있고 그런데
이런 경우는 어떤 부분에서 문제가 생겨서 그러는 지 알고 싶습니다!
원래는 안그랬다는건 코드에 문제가 있는건 아닐 것 같지만
저는 리소스팩, 건축 개발자 였는데, 스킬을 도전해보자니
엄청난 초보이기 때문에 혹시 모르니 코드도 첨부하겠습니다!
알려주시면 정말 감사드리겠습니다!!!
# [1] 세레니티 지급 명령어 (호박씨 pumpkin seeds)
command /세레니티지급:
permission: op
trigger:
give 1 of pumpkin seeds named "&e◈ 세레니티 ◈" with lore "&7손에 들고 마우스 우클릭 시", "&f하늘에 8개의 성스러운 마법진&7을 소환하여", "&e지상으로 거대한 빛의 줄기&7를 쏟아붓습니다." to player
# [2] 우클릭 시 세레니티 스킬 발동
on rightclick:
if name of player's tool contains "세레니티":
cancel event
# 11초 쿨타임 체크
set {_waited} to difference between {cooldown::serenity::%player's uuid%} and now
if {_waited} is less than 11 seconds:
send "&c세레니티 재사용 대기중... (%difference between 11 seconds and {_waited}%)" to player
stop
set {cooldown::serenity::%player's uuid%} to now
# 시전자가 서 있는 현재 좌표를 절대 기준으로 바인딩합니다.
set {_loc} to player's location
set {_cx} to {_loc}'s x-coordinate
set {_cy} to {_loc}'s y-coordinate
set {_cz} to {_loc}'s z-coordinate
# Y축 12칸 절대 고정
set {_skyY} to {_cy} + 12.0
# --------------------------------=================================
# 시전자 기준 반지름 8칸 거리에 생성
# --------------------------------=================================
set {_mX::1} to {_cx} + 8.0 # 동
set {_mZ::1} to {_cz}
set {_mX::2} to {_cx} - 8.0 # 서
set {_mZ::2} to {_cz}
set {_mX::3} to {_cx}
set {_mZ::3} to {_cz} + 8.0 # 남
set {_mX::4} to {_cx}
set {_mZ::4} to {_cz} - 8.0 # 북
# 45도 대각선 방위
set {_mX::5} to {_cx} + 5.66 # 북동
set {_mZ::5} to {_cz} - 5.66
set {_mX::6} to {_cx} - 5.66 # 북서
set {_mZ::6} to {_cz} - 5.66
set {_mX::7} to {_cx} + 5.66 # 남동
set {_mZ::7} to {_cz} + 5.66
set {_mX::8} to {_cx} - 5.66 # 남서
set {_mZ::8} to {_cz} + 5.66
# 스킬 시전 시 하늘이 열리는 부드러운 공명음
play sound "block.enchantment_table.use" with volume 1.2 and pitch 1.2 at player
play sound "block.amethyst_block.chime" with volume 1.0 and pitch 0.9 at player
# --------------------------------=================================
# [STEP 1] 하늘에 지름 7칸 마법진 8개
# --------------------------------=================================
loop 15 times:
set {_idx} to 1
loop 8 times:
set {_mx} to {_mX::%{_idx}%}
set {_mz} to {_mZ::%{_idx}%}
# A. 지름 7칸 (반지름 3.5칸) 황금빛 End Rod 테두리 원형 전사
set {_i} to 1
loop 36 times:
set {_angle} to {_i} * 10
set {_rx} to 3.5 * cos({_angle})
set {_rz} to 3.5 * sin({_angle})
execute console command "particle minecraft:end_rod %{_mx}+{_rx}% %{_skyY}% %{_mz}+{_rz}% 0 0 0 0 1 force"
add 1 to {_i}
# B. [✧ 문양 성운 곡선 - 연노란색 빛 색상]
if {_idx} is less than 5:
set {_ang} to 0
loop 40 times:
set {_rx} to 2.5 * (cos({_ang}))^3
set {_rz} to 2.5 * (sin({_ang}))^3
execute console command "particle minecraft:dust 1.0 1.0 0.6 1 %{_mx}+{_rx}% %{_skyY}% %{_mz}+{_rz}% 0 0 0 0 1 force"
add 9 to {_ang}
else:
set {_ang} to 0
loop 40 times:
set {_baseX} to 2.5 * (cos({_ang}))^3
set {_baseZ} to 2.5 * (sin({_ang}))^3
set {_rx} to ({_baseX} * 0.707) - ({_baseZ} * 0.707)
set {_rz} to ({_baseX} * 0.707) + ({_baseZ} * 0.707)
execute console command "particle minecraft:dust 1.0 1.0 0.6 1 %{_mx}+{_rx}% %{_skyY}% %{_mz}+{_rz}% 0 0 0 0 1 force"
add 9 to {_ang}
add 1 to {_idx}
wait 2 ticks
# --------------------------------=================================
# [STEP 2] 빛줄기
# --------------------------------=================================
play sound "block.conduit.activate" with volume 1.3 and pitch 1.0 at player
set {_idx} to 1
loop 8 times:
set {_mx} to {_mX::%{_idx}%}
set {_mz} to {_mZ::%{_idx}%}
# 사운드
set {_soundLoc} to location at {_mx}, {_cy}, {_mz} in player's world
play sound "block.beacon.power_select" with volume 1.4 and pitch 1.2 at {_soundLoc}
play sound "block.amethyst_block.chime" with volume 0.8 and pitch 1.4 at {_soundLoc}
# [Y축 사거리 12칸 고정 매커니즘]:
set {_currY} to {_skyY}
while {_currY} is greater than {_cy}:
execute console command "particle minecraft:glow %{_mx}% %{_currY}% %{_mz}% 0.5 0.5 0.5 0.01 15 force"
execute console command "particle minecraft:dust 1.0 1.0 0.8 2.0 %{_mx}% %{_currY}% %{_mz}% 0.3 0.1 0.3 0.05 10 force"
remove 0.8 from {_currY}
# 지면 충돌 이펙트도 딱 시전자 발밑 높이에 고정 표출
execute console command "particle minecraft:flash %{_mx}% %{_cy}+0.5% %{_mz}% 0 0 0 0 1 force"
execute console command "particle minecraft:totem_of_undying %{_mx}% %{_cy}+1.0% %{_mz}% 1.5 2.0 1.5 0.1 80 force"
execute console command "particle minecraft:instant_effect %{_mx}% %{_cy}+1.0% %{_mz}% 2.0 1.0 2.0 0.05 40 force"
add 1 to {_idx}
wait 1 tick
# --------------------------------=================================
# [STEP 3] 마법진 내부 및 중심 영역 전체 타격 판정
# --------------------------------=================================
# 타격의 중심도 시전자의 현재 위치로 직결하여 정밀 필터링합니다.
set {_targetCenter} to location at {_cx}, {_cy}, {_cz} in player's world
loop entities in radius 11.5 of {_targetCenter}:
if loop-entity is a living entity:
if loop-entity is not player:
damage loop-entity by 24
apply blindness 1 to loop-entity for 3.5 seconds
apply slowness 2 to loop-entity for 3 seconds
execute console command "particle minecraft:wax_off %loop-entity's x-coordinate% %loop-entity's y-coordinate + 1.0% %loop-entity's z-coordinate% 0.2 0.5 0.2 0.01 5 force"

qsef1256
24 일 전Skript 구버전에 남아있었던 버그일 확률이 커보이네요, Skript 및 애드온들을 1.18.2를 지원하는 제일 최근 버전으로 업데이트 해보세요
코드 상으로는 쿨타임 명령어가 두번씩 뜰 이유는 없어보여요
열우
24 일 전감사합니다!!