개인 자료란 (JE)

  서버 커뮤니티

Profile 귀농놀부 대표칭호 없음

Lee0119 68530d1dba174206be5f736313d6e714

Profile

질문하기 스크립트

GUI에서 아이템을 클릭하면 TP가 되게 하고 싶은데 방법을 모르겠습니다.

2023.07.07 조회 수 99 추천 수 0
이해도 입문자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 
스크립트 버전 2.7.0 -beta3 

command /lobby:

    trigger:

        set {location 1} to location of player

        message "&a텔레포트 할 위치가 설정되었습니다."


command /world:

    trigger:

        set {location 2} to location of player

        message "&a텔레포트 할 위치가 설정되었습니다."

        

command /villige:

    trigger:

        set {location 3} to location of player

        message "&a텔레포트 할 위치가 설정되었습니다."

        

command /meetingroom:

    trigger:

        set {location 4} to location of player

        message "&a텔레포트 할 위치가 설정되었습니다."


command /로비:

    trigger:

        teleport player to {location 1}

        

command /야생:

    trigger:

        teleport player to {location 2}


command /마을:

    trigger:

        teleport player to {location 3}

        

command /회의실:

    trigger:

        teleport player to {location 4}


on right click on entity:

    if entity's name is "텔레포트":

        open chest with 3 rows named "&cTeleport" to player 

        loop 27 times:

            set {_slot} to loop-num - 1

            set slot {_slot} of current inventory of player to black stained glass pane named "&7"

        set slot 10 of current inventory of player to red bed named "&c로비" with lore " " and "로비로 순간이동합니다." and " " and "&e클릭하면 로비로 이동합니다." 

        set slot 12 of current inventory of player to diamond sword named "&c야생" with lore " " and "야생으로 순간이동합니다." and " " and "&e클릭하면 야생으로 이동합니다."

        set slot 14 of current inventory of player to hay block named "&c마을" with lore " " and "마을로 순간이동합니다." and " " and "&e클릭하면 마을로 이동합니다."

        set slot 16 of current inventory of player to clock named "&c회의장" with lore " " and "회의장으로 순간이동합니다." and " " and "&e클릭하면 회의장으로 이동합니다."


on inventory click:

    if name of current inventory of player is "&cTeleport":

        cancel event


여기에서 GUI에 있는 아이템을 클릭하면 TP가 되게 하고 싶은데..

어디에 어떤 문구를 추가 해야 되는지 아시는 분들 도와주세요.




2개의 댓글

거너아나
2023.07.07


on inventory click:

    if name of current inventory of player is "&cTeleport":

        cancel event

        if clicked slot is 10:

                teleport player to {location 1}

        if clicked slot is 11:

                teleport player to {location 2}

        if clicked slot is 12:

                teleport player to {location 3}

      

귀농놀부
2023.07.07
@거너아나

감사합니다!

뉴스 및 창작물
/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