개인 자료란 (JE)

  서버 커뮤니티

Profile 민트참치 정품인증자

Mint_tuna_ 28c808be435242d191b5a93415a2a281

Profile

질문하기 멀티플레이

[스크립트] 개인변수가 on every 1 seconds 에서 안먹혀요...

2021.04.30 조회 수 1048 추천 수 0

현재 마나 시스템을 만들어서 무기에 스킬을 추가하고 있는데

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






2개의 댓글

거너아나
2021.04.30

every 1 seconds:

@loop all players:

@@add 1 to {mana.%loop-player%}

모든 player를 loop-player로 바꾸면 됩니다

자세히 설명하자면 every 1 second 구문에서는 player가 지정되지 않아 모든 플레이어를 지정한 후에 해야 작동이 됩니다

민트참치
2021.04.30
@거너아나

감사합니다! 드디어 해결했네요 ㅎㅎ

 

뉴스 및 창작물
/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240428135129

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1