개인 자료란 (JE)

  서버 커뮤니티

Profile jackoqp 정품인증자

jackoqp a392bd442f034ee6b45a6302a5010b49

Profile

질문하기 스크립트

스크립트

2023.08.27 조회 수 35 추천 수 0
이해도 입문자 
게임버전 (JE) 1.19.4 
게임버전 (BE) 1.9.x 
스크립트 버전 2.7.0-beta3 
스크립트 애드온 에드온 다 있음 

on rightclick on entity:

    if entity's name is "상점":

        open chest with 1 rows named "상점" to player

        set slot 1 of current inventory of player to Diamond pickaxe named "도구상점"

        set slot 2 of current inventory of player to End crystal named "pvp상점"

        set slot 3 of current inventory of player to Barrier named "후원상점"

        set slot 4 of current inventory of player to Redstone named "회로상점"

        set slot 5 of current inventory of player to Diamond named "광물상점"

        set slot 6 of current inventory of player to Barrier named "전리품상점"

        set slot 7 of current inventory of player to Wheat named "농장상점"

        

on inventory click:


    if name of current inventory is "상점":

        cancel event

        if "%index of clicked slot%" is "1":

            open chest with 3 rows named "도구상점" to player

            set slot 10 of current inventory of player to elytra named ""

            set slot 11 of current inventory of player to firework rocket named ""

            set slot 12 of current inventory of player to experience bottle named ""

            set slot 13 of current inventory of player to Shulker box named ""

            set slot 14 of current inventory of player to ender eye named ""

            set slot 15 of current inventory of player to ender chest named ""

            set slot 16 of current inventory of player to enchanting table named ""


제가 여기까지는 했는데 판매하고 구매하는 구문을 모르겠습니다 도와주세요ㅜㅜ

2개의 댓글

환타비
2023.08.27

음 사고 판매 하는구문 아주 쉽습니다!

 

먼저 그 인벤토리를 인식하는 구문부터 작성을 해주시면 됩니다!

 

밑에 구문은 위에 써있는 것 중에 겉날개 구매 하는 구문입니다

on inventory click: #인벤토리를 클릭했을때

@if name of current inventory is "도구상점": #그 인벤토리 이름이 도구 상점 이라면

@@cancel event #클릭했을때 이벤트를 캔슬하고

@@if "%index of clicked slot%" is "10": #만약 10번의 슬롯을 클릿 했고

@@@if click type is left mouse button: #마우스 왼쪽 클릭을 했다면

@@@@cancel event #이벤트 캔슬후

@@@@give player 1 of elytra #플레이어에게 겉날개를 줌

 

머 이런식으로 하면 구매 구문이 완성이 됩니다!

 

판매는 중간에 보이는 click type에서 right 으로 변경 하시면 오른쪽 클릭 했을때 작동이 되므로 그런식으로 판매도 제작 하시면 됩니다!

jackoqp
2023.08.27
@환타비

감사합니다!!

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

/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