개인 자료란 (JE)

  서버 커뮤니티

Profile 박아키 대표칭호 없음
Profile

질문하기 스크립트

마크 데미지 스크립드 자문 버전 1.20.2

2024.03.18 조회 수 24 추천 수 0
이해도 초보자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 

on damage:

    if attacker's tool is sword,  bow, trident, Crossbow:

        if 1st line of lore of attacker's tool contains "(무기) 공격력 +%{_num}%":

            set {_lore} to 1st line of lore of attacker's tool

            set {lore_axe::*} to {_num}

            set {_lore_axe} to {lore_axe::1} parsed as number

            set damage to damage + {_lore_axe}

on damage:

    if attacker's tool is sword:

        if 1st line of lore of attacker's tool contains "타격시":

            set {_lore} to 1st line of lore of attacker's tool

            replace all "&e&l큐브 효과: &e&l(검) 타격시 " with "" in {_lore}

            replace all "%% 확률로 " with "" in {_lore}

            replace all "초 동안 공격딜레이 제거" with "" in {_lore}

            set {lore_delay::*} to {_lore} split by " "

            set {_lore_delay1} to {lore_delay::1} parsed as number

            set {_lore_delay2} to {lore_delay::2} parsed as number

            chance of {_lore_delay1}%:

                set maximum damage delay of attacker to 1 tick

                send "공격딜레이 제거" to player

                wait 5 seconds

                set maximum damage delay of attacker to 20 tick

현재 위 구문을 만들어서 리로드는 되는데 {_lore} 값에

                if {_random1} is 1:

                    set {_num} to random integer between 0.5 and 5

                    set {_grant} to "&r&e&l(무기) 공격력 +%{_num}%"

                if {_random1} is 2:

                    set {_percent} to random integer between 1 and 10

                    set {_num} to random integer between 1 and 5

                    set {_grant} to "&r&e&l(검) 타격시 %{_percent}%%% 확률로 %{_num}%초 동안 공격딜레이 제거"

에 있는 num값이 0으로 나오는 건지 아니면 구문이 틀려서 작동을 안 하는 건지 모르겠네요 고수 분들에게 자문을 구합니다.

제가 하고 싶은 건 조건을 만족하면 무기에 기본 공격력에 추가로 데미지{num}값을 주고 싶고, 

검에 조건이 중족하면 확률적으로 무기 딜레이를 {num}초 동안 1틱으로 만들고 싶습니다

Warning
댓글이 없습니다.

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

뉴스 및 창작물
/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1

/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