Mint_tuna_ 28c808be435242d191b5a93415a2a281
현재 마나 시스템을 만들어서 무기에 스킬을 추가하고 있는데
1초마다 마나가 차게 하려고 처음에는
every one seconds:
add 1 to {mana}
if {mana} > 100:
subtract 1 from {mana}
이렇게 했는데
개인변수로 해야할 것 같아서
every one seconds:
add 1 to {mana.%player%}
if {mana.%player%} > 100:
subtract 1 from {mana.%player%}
이렇게 했는데
There's no world in a periodic event if no world is given in the event (e.g like every hour in "world") (아이템.sk, line 2: add 1 to {mana.%player%}
There's no world in a periodic event if no world is given in the event (e.g like every hour in "world") (아이템.sk, line 3: if {mana.%player%} > 100:
이렇게 오류가 뜨더라구요 ㅠ
해결 방법을 알 수 있을까요?
혹시 몰라서 전체 구문도 올립니다
every 2 seconds:
add 1 to {mana.%player%}
if {mana.%player%} > 100:
subtract 1 from {mana.%player%}
command /ski:
trigger:
give 1 diamond sword named "&7&l프로토 스킬 V1" with lore "&3-우클릭으로 스킬 발동" and "&3-5초간 투명/힘 효과를 받는다" to player
give 1 diamond sword named "&7&l프로토 스킬 V2" with lore "&8스킬 테스트" to player
give 1 diamond sword named "&7&l프로토 스킬 V3" with lore "&8스킬 테스트" to player
give 1 stick named "&6&l파티클" with lore "파티클 테스트" to player
give 1 netherite hoe named "&8&l사신의 낫" with lore "&7>우클릭으로 스킬 발동" and "&7>우클릭시 위더 머리를 발사" and "&7>5초간 투명/재생/힘 효과를 받는다" and "&4&lUNIQUE" to player
command /mana:
trigger:
if player is op:
set {mana.%player%} to 100
else:
message "당신은 관리자가 아닙니다!"
on right click:
if {mana.%player%} > 20:
if name of player's tool contains "&7&l프로토 스킬 V1":
apply potion of invisibility of tier 0 to player for 5 seconds
apply potion of strength of tier 2 to player for 5 seconds
player command "/particle dust 1 1 1 1 ~ ~1 ~ 0.5 0.5 0.5 0.01 1080"
subtract 20 from {mana.%player%}
message "&b&l20마나를 사용" to player
if {mana.%player%} = 100:
if name of player's tool contains "&7&l프로토 스킬 V3":
if player is sneaking:
apply potion of Regeneration of tier 5 to player for 5 seconds
apply potion of Absorption of tier 5 to player for 5 seconds
apply potion of Fire Resistance of tier 5 to player for 5 seconds
player command "/particle dust 1 0 0 1 ~ ~1 ~ 0.5 0.5 0.5 0.01 1080"
subtract 100 from {mana.%player%}
message "&b&l100마나를 사용" to player
if {mana.%player%} > 30:
if name of player's tool contains "&7&l프로토 스킬 V2":
apply potion of speed of tier 5 to player for 2 seconds
push the player upwards at speed 0.7
wait 0.6 seconds
push the player forwards at speed 2
player command "/particle dust 0 1 0 1 ~ ~1 ~ 0.5 0.5 0.5 0.01 1080"
subtract 30 from {mana.%player%}
message "&b&l30마나를 사용" to player
if {mana.%player%} > 50:
if name of player's tool contains "&8&l사신의 낫":
shoot wither skull from player at speed 1
apply potion of invisibility of tier 0 to player for 5 seconds
apply potion of strength of tier 2 to player for 5 seconds
apply potion of Regeneration of tier 5 to player for 5 seconds
execute player command "/particle dust 0.5 0 10 2 ~ ~1 ~ 0.5 0.5 0.5 1 100"
execute player command "/playsound minecraft:entity.wither.shoot player @s ~ ~ ~ 100 2"
wait 1 seconds
subtract 50 from {mana.%player%}
message "&b&l50마나를 사용" to player
거너아나
2021.04.30every 1 seconds:
@loop all players:
@@add 1 to {mana.%loop-player%}
모든 player를 loop-player로 바꾸면 됩니다
자세히 설명하자면 every 1 second 구문에서는 player가 지정되지 않아 모든 플레이어를 지정한 후에 해야 작동이 됩니다
민트참치
2021.04.30감사합니다! 드디어 해결했네요 ㅎㅎ