개인 자료란 (JE)

  서버 커뮤니티

Profile 웰치포도 대표칭호 없음
Profile

질문하기 스크립트

마크 상점 아이템 질문

2023.12.18 조회 수 36 추천 수 0
이해도 초보자 
게임버전 (JE) 관련없음 
게임버전 (BE) 관련없음 
스크립트 버전 2.7.3 
스크립트 애드온 SharpSK, Skellett, SkQuery, SkRayfall, skript-gui, sKUtillties, Citizens 

on inventory click:

    if inventory name is "&5전직관":

        set {_item} to clicked item

        cancel event

        if click type is left mouse button:

            set {_lore} to colored line 4 of lore of clicked item

            replace all "&2│ &f구매 가격: &e&l" and "," and "&f원" with "" in {_lore}

            set {_lore} to {_lore} parsed as integer

            if {돈.%player%} is smaller than {_lore}:

                message "&c┃ &l돈이 부족해 전직권을 구매할수없습니다."

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

            else:

                delete lore of {_item}

                give {_item} to player

                subtract {_lore} from {돈.%player%}

                play sound "UI_BUTTON_CLICK" with volume 0.5 to the player

제가 상점에서 산 아이템에 설명을 달아서 아이템을 받는법 이 있을까요?




4개의 댓글

라아아아밍
2023.12.18

제가 제대로 이해한 건진 모르겠는데, 구매했을 때 설명을 추가하고 싶으신 거라면 give 전에
set lore line (라인) of (아이템) to "설명"

하심 될 거 같습니다.

웰치포도
2023.12.19
@라아아아밍

근데 에러나요... 아니면 특정 라인 설명만 지울수있는 방법이 있을까요?

 

라아아아밍
2023.12.19
@웰치포도

아 제가 잘못 적었습니다

set line (라인) of lore of (아이템) to "설명"

이고, 지우는 거는

delete line (라인) of lore of (아이템)

이렇게 하시면 됩니다

웰치포도
2023.12.19
@라아아아밍

오 감삼다!

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