#===============================================================================
command /크리스탈:
trigger:
if player is op:
give 1 of ender pearl named “<##37fbfb>귀<##52effb>환 <##6de3fc>크<##87d8fc>리<##a2ccfd>스<##bdc0fd>탈” to player
send “&a크리스탈을 소환했습니다.”
remove 1 ender pearl from player # 크리스탈을 사용할 때 아이템 소모 추가
else:
send “&c권한이 없습니다. 이 명령어는 관리자만 사용할 수 있습니다.”
#===============================================================================
on rightclick:
player’s tool’s name is “<##37fbfb>귀<##52effb>환 <##6de3fc>크<##87d8fc>리<##a2ccfd>스<##bdc0fd>탈”:
cancel event
set {_loc} to location 1.5 up and 1 forward player’s location
spawn armor stand at {_loc}
set {_stand} to last spawned armor stand
set gravity of {_stand} to false
make {_stand} invisible
make {_stand} invulnerable
set {_stand}'s display name to “&6우클릭하여 이동 &c[&f&l10&c]”
set {_time} to 10
play sound “block.beacon.power_select” at {_loc}
# Particle effect simplifies for better performance
set {_p} to pitch of player’s location
set {_y} to yaw of player’s location
set {_v} to vector from yaw {_y} and pitch {_p}
set {_ver} to vector from yaw {_y} and pitch {_p} + 90
wait 1 tick
# First loop for particle generation
async:
loop 20 times:
adjust y-coordinate of {_loc} by 0.1
play redstone dust at {_loc}
rotate {_ver} around {_v} by 18 # Increase step to decrease iterations for performance
wait 1 tick
# Timer countdown in another async task
async:
loop 10 times:
wait 20 ticks # 1 second delay between each update
subtract 1 from {_time}
set {_stand}'s display name to “&6우클릭하여 이동 &c[&f&l%{_time}%&c]”
if {_time} <= 0:
kill {_stand}
play sound “block.beacon.deactivate” at {_loc}
play sound “block.glass.break” at {_loc} # 크리스탈을 우클릭했을 때 소리 추가
set {player_original_location::%player%} to player’s location
send “&e디버그: 현재 위치가 저장되었습니다. - %player’s location%”
stop
# Save location right after the stand is spawned
set {player_original_location::%player%} to player’s location
send “&e디버그: 현재 위치가 저장되었습니다. - %player’s location%” # 디버그 메시지 추가
#===============================================================================
command /돌아가기:
trigger:
if {player_original_location::%player%} is set:
set {_location} to {player_original_location::%player%}
send “&e디버그: 저장된 좌표 정보 - %{_location}%”
# 좌표 및 월드 정보 분할
set {_world} to world of {_location}
set {_x} to x-coordinate of {_location}
set {_y} to y-coordinate of {_location}
set {_z} to z-coordinate of {_location}
send “&e디버그: 좌표(X, Y, Z) - %{_x}%, %{_y}%, %{_z}%”
send “&e디버그: 월드 정보 - %{_world}%”
# 플레이어를 저장된 위치로 텔레포트
teleport player to location({_x}, {_y}, {_z}, {_world})
send title “&a돌아가기” with subtitle “&7원래 위치로 돌아왔습니다.” to player
play sound “block.portal.travel” at player
# 위치 정보 삭제
delete {player_original_location::%player%}
else:
send “&c원래 위치를 찾을 수 없습니다.”
# 예외 처리 추가 가능
#===============================================================================
on rightclick on armor stand:
if entity’s name contains “&6우클릭하여 &a스폰&6으로 이동”:
teleport player to location(16, -60, -15, world(“flat_world”))
send title “<##37fbfb>귀<##52effb>환 <##6de3fc>크<##87d8fc>리<##a2ccfd>스<##bdc0fd>탈” with subtitle “&a스폰으로 이동되었습니다” to player
wait 1 tick
play sound “entity.allay.ambient_without_item” to player
이 스크립트를 작성하고 나서 생긴일이야