개인 자료란 (JE)

  서버 커뮤니티

Profile 구원좌 대표칭호 없음
Profile

질문하기 스크립트

방어구 로어 체력적용

2024.01.11 조회 수 42 추천 수 0
이해도 초보자 
게임버전 (JE) 1.12.2 
게임버전 (BE) 1.12.x 
스크립트 버전 Skript-2.6.4 

# 스텟에 따른 능력치 조정

every 10 tick:

    loop all players:

        if loop-player's helmet is not air:

            set {_lore::*} to uncolored lore of loop-player's helmet

            loop {_lore::*}:

                if loop-value-2 contains "■체력":

                    set {_hh} to loop-value-2

                    replace all "■체력" and ":" and " " with "" in {_hh}

                    set {_hh} to {_hh} parsed as number

        if loop-player's chestplate is not air:

            set {_lore::*} to uncolored lore of loop-player's chestplate

            loop {_lore::*}:

                if loop-value-2 contains "■체력":

                    set {_hc} to loop-value-2

                    replace all "■체력" and ":" and " " with "" in {_hc}

                    set {_hc} to {_hc} parsed as number

        if loop-player's leggings is not air:

            set {_lore::*} to uncolored lore of loop-player's leggings

            loop {_lore::*}:

                if loop-value-2 contains "■체력":

                    set {_hl} to loop-value-2

                    replace all "■체력" and ":" and " " with "" in {_hl}

                    set {_hl} to {_hl} parsed as number

        if loop-player's boots is not air:

            set {_lore::*} to uncolored lore of loop-player's boots        

            loop {_lore::*}:

                if loop-value-2 contains "■체력":

                    set {_hb} to loop-value-2

                    replace all "■체력" and ":" and " " with "" in {_hb}

                    set {_hb} to {_hb} parsed as number

        

        if loop-player's boots is not air:

            set {_lore::*} to uncolored lore of loop-player's boots        

            loop {_lore::*}:

                if loop-value-2 contains "■이동속도":

                    set {_spb} to loop-value-2

                    replace all "■이동속도" and ":" and " " with "" in {_spb}

                    set {_spb} to {_spb} parsed as number

        

        set loop-player's max health to 10 + ({level.%uuid of loop-player%}*20/2 - 10) + {체력.%uuid of loop-player%}*5/2 + {공격력능력치.%uuid of loop-player%}*2/2 + {_hh}/2 + {_hc}/2 + {_hl}/2 + {_hb}/2

        set loop-player's walk speed to 0.2 + {민첩.%uuid of loop-player%}*0.0025 + {_spb}*0.0025


능력치가 서버에 들어와있는 전체 플레이어에게 모두 적용되는데 이유가 무엇일까요?




Warning
댓글이 없습니다.

새로운 댓글을 등록해 주세요!

뉴스 및 창작물
/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1