#크리티컬 확률

1 messages · Page 1 of 1 (latest)

exotic tusk
#

헬멧에 있는 로어에 크리티컬확률에 따라 헬멧 착용시 크리티컬확률이 올라가고 해제시 크리티컬확률이 내려가는걸 만들고싶은데 오류는 없는데 작동이 안됩니다.. 잘못된 부분있을까요?
if {_random} is 1:
set {_num} to random integer between 1 and 10

on armor equip:
if event-item is helmet:
if 4th line of lore of event-item contain "크리티컬":
set {_lore} to 4th line of lore of event-item
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_helmetcri} to {_lore} parsed as number
add {_helmetcri} to {criticalChance::%uuid of player%}

on armor unequip:
if event-item is helmet:
if 4th line of lore of event-item contain "크리티컬":
set {_lore} to 4th line of lore of event-item
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_helmetcri} to {_lore} parsed as number
remove {_helmetcri} from {criticalChance::%uuid of player%}

on damage:
set {_critical} to {criticalChance::%uuid of attacker%} + {_num}
if attacker's tool is sword or axe:
if 4th line of lore of attacker's tool contain "크리티컬":
set {_lore} to 4th line of lore of attacker's tool
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_num} to {_lore} parsed as number

if {_critical} > 0:
    chance of {_critical}/100:
        set damage to damage * 1.5
        send "&c크리티컬 발동!" to attacker
        play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to the attacker
#

on armor equip:
if event-item is helmet:
if lore of event-item contains "크리티컬 확률 증가":
set {_lore} to 4th line of lore of event-item
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_num} to {_lore} parsed as number
add {_num} to {criticalChance::%uuid of player%}
send "&a크리티컬 확률이 %{_num}% 증가했습니다." to player

on armor unequip:
if event-item is helmet:
if lore of event-item contains "크리티컬 확률 증가":
set {_lore} to 4th line of lore of event-item
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_num} to {_lore} parsed as number
remove {_num} from {criticalChance::%uuid of player%}
send "&c크리티컬 확률이 %{_num}% 감소했습니다." to player

on damage:
if attacker is a player:
if attacker's tool is sword or axe:
set {_criticalChance} to {@criticalChanceBase} + {criticalChance::%uuid of attacker%}
if {_criticalChance} is not set:
set {_criticalChance} to {@criticalChanceBase}
chance of {_criticalChance} / 100:
set damage to damage * 1.5
send "&c크리티컬 발동!" to attacker
play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to attacker

#

이방법도 시도해봤습니다..ㅠㅠ

torn lark
#

대미지을 새로 줘야할거같은데요

exotic tusk
#

on damage: 이걸 하나더 추가해서 해볼까요?

torn lark
#

그게 아니라

#

크리티컬이 나오면

#

캔슬 이벤트 하고

#

대미지 1.5배로 대미지 주는거

#

하면되지 않을까요

#

근데 이러면 또 대미지 이벤트 발생할수있으니까 맨위에 어태 유형이 플레이어 어택인지 하면 될거같고 대미지 줄때 유형을 플레이어 어택 말고 다른거로 해야하나

#

대미지가 10(5하트)인데 10하트을 깎을수도 있으니까 테스트 해보세영

exotic tusk
#

if attacker is a player:
set {_critical} to {criticalChance::%uuid of attacker%} + {_num}
if {_critical} > 0:
chance of {_critical}/100:
set damage to damage * 1.5
send "&c크리티컬 발동!" to attacker
play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to the attacker

#

이렇게 말씀이신가영?

#

이것도 맨손으로 때리면 크리티컬 발동! 메세지가 안와요ㅠㅠ

torn lark
#

set damage to damage * 1.5 이거을
cancel event
damage victim by damage hearts
이런식으로 바꾸면 되지 않을까요

#

플레이어 끼리 때리는건가요

exotic tusk
#

아뇨 몬스터 때릴때입니다!

torn lark
#

아 애초에 어택커가 플레이어 이구나

#

저런식으로 바꾸면 될거같은데

#

#

해봤더니까

#

서버가 꺼졌네

#

엄;

exotic tusk
#

엌ㅋㅋㅋㅋ

torn lark
#

이렇게 하는거 아니였나

exotic tusk
#

칼을 들면 크리티컬 발동이 뜨는데 모자쓰고 맨손으로 때리면 절때 안뜨네요..ㅠㅠ

#

바꿔서 해봤는데 그러네용...

torn lark
#

예전에

#

만들어둔거 있는데

#

찾아볼게요 ㄱㄷ

exotic tusk
#

넵! 도와주셔서 감사합니다

torn lark
#

아 보니까 대미지 주면 계속 반복 되네요 딴 타입으로 대미지 줘야하나

#

근데

#

맨손으로

#

하실때 크리티컬이

#

안뜨시나요

#

맨손은

exotic tusk
#

마크 자체 점프공격 크리티컬은 뜨고 데미지도 적용되는데

torn lark
#

if attacker's tool is sword or axe:
이거 떄문에

#

안될텐데

exotic tusk
#

저건 안되네요..

#

그거 때문에 밑에 따로

#

적용했는데 그래도 안되나요?

torn lark
#

아 저거 지웠는데 안되는건가요

exotic tusk
#

on damage:

if attacker's tool is sword or axe:
    if 4th line of lore of attacker's tool contain "크리티컬":
        set {_lore} to 4th line of lore of attacker's tool
        replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
        replace all "%% 증가" with "" in {_lore}
        set {_num} to {_lore} parsed as number
if attacker is a player:
    set {_critical} to {criticalChance::%uuid of attacker%} + {_num}
    if {_critical} > 0:
        chance of {_critical}/100:
            set damage to damage * 1.5
            cancel event
            damage victim by damage hearts
            send "&c크리티컬 발동!" to attacker
            play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to the attacker
#

이렇게

torn lark
#

set damage to damage*1.5 이거는 문제 없을것 같은데

exotic tusk
#

맞아요 칼도 크리뜨면 데미지까지 다적용되요..ㅠㅠ

torn lark
#

정확히

#

어떻게 하고 싶으시나요

#

뭘해도 send "&c크리티컬 발동!" to attacker
이게 안뜬다는건요

exotic tusk
#

로어에 크리티컬 확률 10% 인 투구를 착용했을때 크리티컬확률이 10% 상승해서 10% 확률로 크리데미지를 입히고 해제 했을때는 크리티컬확률이 10% 감소하는걸 만들고 싶어요!

#

네네 맨손으로는

#

안뜨네요..

torn lark
#

if attacker's tool is sword or axe:이거 지우시고

#

했는데도

#

안되;나요

exotic tusk
#

잠시만요 한번더 테스트해보겠습니다!

#

on damage:
if 4th line of lore of attacker's tool contain "크리티컬":
set {_lore} to 4th line of lore of attacker's tool
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_num} to {_lore} parsed as number
set {_critical} to {criticalChance::%uuid of attacker%} + {_num}
if {_critical} > 0:
chance of {_critical}/100:
set damage to damage * 1.5
cancel event
damage victim by damage hearts
send "&c크리티컬 발동!" to attacker
play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to the attacker

#

이렇게 테스트했는데 안뜨네요..

#

근데 칼은 또

torn lark
#

cancel event
damage victim by damage hearts 이거 지우시고

exotic tusk
#

적용되네요..

#

네 똑같이 칼에 들어있는 크리확률만 적용되고 헬멧에 있는 크리확률을 적용이 안되네요..ㅠㅠ

torn lark
exotic tusk
#

했습니당

torn lark
#

구문상태가

#

어케대져

exotic tusk
#

on armor equip:
if event-item is helmet:
if 4th line of lore of event-item contain "크리티컬":
set {_lore} to 4th line of lore of event-item
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_helmetcri} to {_lore} parsed as number
add {_helmetcri} to {criticalChance::%uuid of player%}

on armor unequip:
if event-item is helmet:
if 4th line of lore of event-item contain "크리티컬":
set {_lore} to 4th line of lore of event-item
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_helmetcri} to {_lore} parsed as number
remove {_helmetcri} from {criticalChance::%uuid of player%}

on damage:
if 4th line of lore of attacker's tool contain "크리티컬":
set {_lore} to 4th line of lore of attacker's tool
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_num} to {_lore} parsed as number
set {_critical} to {criticalChance::%uuid of attacker%} + {_num}
if {_critical} > 0:
chance of {_critical}/100:
set damage to damage * 1.5
send "&c크리티컬 발동!" to attacker
play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to the attacker

#

이렇게 되어있습니다

#

어택커 넣어볼까요?

torn lark
#

이래도 이제

#

맨손이

#

안된다는건가요

exotic tusk
#

#

안떠용..

torn lark
#

if 4th line of lore of attacker's tool contain "크리티컬":

#

이거 때문인거 같은데

#

맨손인데 4번째 로어가 없지 안한

#

않나

exotic tusk
#

#

툴이라서

torn lark
#

그 검ㅇ데

#

검에

#

크리티컬

#

있나요

exotic tusk
#

네네

#

잇어요

torn lark
#

그러면 진짜 대참산데

#

엄;

exotic tusk
#

#

;;

#

#

진짜 전혀생각못했네요..

#

그럼 헬멧을할려면

#

혹시

torn lark
#

if 4th line of lore of attacker's tool contain "크리티컬":
f attacker's tool is sword or axe: 이거 때문에

#

안되시는듯

exotic tusk
#

이벤트아이템인가요?

torn lark
#

helmet of attacker

#

아닐까요

exotic tusk
#

와...

#

됩니다..

#

감사합니다 선생님..ㅠㅠ

torn lark
#

ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ

exotic tusk
#

죄송합니다

#

간단한걸로

#

너무 귀찬게해드렷네요...ㅠㅠㅠ

#

와 생각도 못하고있엇어요...

torn lark
#

이상한 대미지나 건들고 있었넹

exotic tusk
#

죄송합니다 ㅠㅠㅠ

#

#

#

선생님 혹시 하나만 더질문해도될까요?ㅠㅠ

torn lark
#

뭔데영

exotic tusk
#

그럼 칼이랑 헬멧에 있는거 동시에 적용하려면 두개 따로따로 구문을 작성해야되나요?

torn lark
#

그냥 합쳐서 하시면 될듯

exotic tusk
#

엌ㅋㅋ 합쳐서는 한번도 안해봐서 구문이 어떻게 되는지 잘모르겠습니다..ㅠㅠ if 4th line of lore of helmet of attacker or attacker's tool contain "크리티컬":

#

이건 아니네요..ㅠㅠ

torn lark
#

if 4th line of lore of player's tool or helmet of player contain "크리티컬": 이대로 하면 되는거 아닌가요

#

플레이어 바꾸고

#

잠시만요 제가 이해 편하게 써드림

exotic tusk
#

on damage:
if 4th line of lore of helmet of attacker or attacker's tool contain "크리티컬":
set {_lore} to 4th line of lore of helmet of attacker or attacker's tool
replace all "&e&l램프 효과: &e&l(공통) 크리티컬 확률 " with "" in {_lore}
replace all "%% 증가" with "" in {_lore}
set {_num} to {_lore} parsed as number
set {_critical} to {criticalChance::%uuid of attacker%} + {_num}
if {_critical} > 0:
chance of {_critical}/100:
set damage to damage * 1.5
send "&c크리티컬 발동!" to attacker
play sound "ENTITY_PLAYER_ATTACK_CRIT" with volume 0.5 to the attacker

#

오류는 안뜨는데 적용이 안되네요..

#

엌ㅋ contains 로 하닌깐 되는거 같기도 한데 크리티컬 50퍼로 한번 테스트 해볼게용

#

오 선생님!! 됩니다

torn lark
#

?

#

이왜진

exotic tusk
#

감사합니다 선생님 정말 감사합니다!!

#

다 해결된거같습니다

torn lark
#
    #대충 무기 크리티컬 있는가:
        #크리티컬 확률 계산
    #대충 헬멧 크리티컬 있는가:
        #크리티컬 확률 계산:
    #크리티컬 터졌는가 게싼:
        #크리티컬 구문```
#

이런식으로

#

하면 되는거 아닌가

#

두 ㄹ다 50퍼로 하고

#

합치면 100일떄 무조건 터지시면

#

글케 하셔도 될듯

exotic tusk
#

둘다해서 100퍼센트로 터집니다

torn lark
#

이왜진

#

exotic tusk
#

감사합니다 선생님!!! 스크립트 아직 초보라 많이 배워가네요 감사합니다!!

torn lark
#

진짜 될줄은 몰랐네요 ㅋㅋ