개인 자료란 (JE)

  서버 커뮤니티

Profile 세찐찐 에메랄드 유저

sejinjin 6943192ee1b44a4ca430580bc286725a

Profile

질문하기 스크립트

스크립트에 문제가 있습니다..

2022.09.17 조회 수 71 추천 수 0
게임버전 (JE) 플러그인, 기타 

on rightclick on entity:

    if entity's name is "[ &a마녀&f ]":

        add 1 to {say1.%player%}

        if {say1.%player%} is 1:

            if {quest1.%player%} is not set:

                message "[ &a마녀&f ] 거미눈을 얻어야하는데..." to player

                play sound "entity.villager.ambient" with volume 1 to the player

                wait 4 seconds

                message "[ &a마녀&f ] 너무 힘들어..." to player

                play sound "entity.villager.ambient" with volume 1 to the player

                wait 4 seconds

                message "[ &a마녀&f ] 어이 거기" to player

                play sound "entity.villager.ambient" with volume 1 to the player

                wait 4 seconds

                message "[ &a마녀&f ] 혹시 거미눈좀 가져다줄 수 있나?" to player

                play sound "entity.villager.ambient" with volume 1 to the player

                wait 4 seconds

                message "[ &a마녀&f ] 거미눈를 준다면 내가 보상을 주도록 하지!" to player

                play sound "entity.villager.ambient" with volume 1 to the player

                wait 4 seconds

                play sound "entity.experience_orb.pickup" with volume 1 to the player

                message "[ &e퀘스트&f ] 마녀에게 거미눈 20개를 주도록 하자 <ttp:&a퀘스트 수락하기><cmd:/quest1 accept>&a&l[수락]<reset> <ttp:&c퀘스트 거절하기><cmd:/quest1 cancel>&c&l[거절]<reset>" to player

                play sound "entity.experience_orb.pickup" with volume 1 to the player

                set {say1.%player%} to 0

            if {quest1.%player%} is true:

                if player has 20 oak log:

                    remove 20 of oak log from inventory of player

                    message "[ &a마녀&f ] 거미눈을 주다니.. 고맙군.." to player

                    play sound "entity.villager.ambient" with volume 1 to the player

                    wait 3 seconds

                    message "[ &a마녀&f ] 여기 보상이 있으니 가져가도록.." to player

                    play sound "entity.villager.ambient" with volume 1 to the player

                    wait 3 seconds

                    message "[ &e퀘스트&f ] &e보상 : &f[ &a마녀의 도끼 &f]" to player

                    give 15 gold ingot to player

                    send title "&a퀘스트 성공" to player for 3 seconds

                    play sound "ui.toast.challenge_complete" with volume 1 to the player

                    set {quest1.%player%} to clear

                    set {say1.%player%} to 0

                else:

                    cancel event

                    message "[ &a마녀&f ] 거미눈이 부족하다네.." to player

                    play sound "entity.villager.no" with volume 1 to the player

                    set {say1.%player%} to 0

            if {quest1.%player%} is clear:

                cancel event

                message "[ &e퀘스트&f ] 이미 퀘스트를 클리어했습니다." to player

                play sound "entity.experience_orb.pickup" with volume 1 to the player

                set {say1.%player%} to 0

        if {say1.%player%} > 1:

            cancel event

    

command /quest1 [<string>]:

    trigger:

        if arg 1 is "accept":

            if {quest1.%player%} is not set:

                message "[ &e퀘스트&f ] 퀘스트를 수락하였습니다." to player

                play sound "entity.villager.trade" with volume 1 to the player

                set {quest1.%player%} to true

            else:

                message "[ &e퀘스트&f ] 퀘스트가 진행중입니다."

                play sound "entity.experience_orb.pickup" with volume 1 to the player

        if arg 1 is "cancel":

            if {quest1.%player%} is not set:

                loop 100 times:

                    message "" to player

                message "[ &e퀘스트&f ] 퀘스트를 거절하였습니다." to player

                play sound "entity.villager.no" with volume 1 to the player

            else:

                message "[ &e퀘스트&f ] 퀘스트가 진행중입니다."

                play sound "entity.experience_orb.pickup" with volume 1 to the player

    

command /questclear:

    trigger:

        if player is op:

            set {say1.%player%} to 0

라는 스크립트를 적었는데 /questclear입력해도 안먹히는데 어떻게 해야할까요?

2개의 댓글

qsef1256
2022.09.17

논리 오류의 경우 본인이 변수 값 확인하고 디버그를 진행해야 합니다. 남 코드는 답변하기가 어렵습니다

qsef1256
2022.09.17

못 하겠으면 최소한 재현 가능할 정도의 정보를 제공해야만 합니다.

뉴스 및 창작물
/files/thumbnails/520/751/003/262x150.crop.jpg?20240328020349

레드스톤

마인크래프트 노트블록으로 만든 『 Bling‐Bang‐Bang‐Born 』 1

Sonttukk

2024-03-23

1

/files/thumbnails/467/742/003/262x150.crop.jpg?20240311163123

레드스톤

[노트블럭커버] MILGRAM -ミルグラム(밀그램)- / 아마네 「숙청 행진」 제 2심 2

리비온

2024-03-11

0

/files/thumbnails/846/741/003/262x150.crop.jpg?20240310221214

레드스톤

워든 vs 라마 200마리 1

GlassesFilm

2024-03-10

0

/files/thumbnails/542/739/003/262x150.crop.jpg?20240309070457

레드스톤

[고인의 명복을 빕니다][노트블럭]드래곤볼 GT 오프닝 - 점점 마음이 끌려

리비온

2024-03-09

0

/files/thumbnails/326/738/003/262x150.crop.jpg?20240328020414

레드스톤

마인크래프트 노트블록으로 만든 『 Build Our Machine 』

Sonttukk

2024-03-07

0