개인 자료란 (JE)

  서버 커뮤니티

Profile 그냥초보 대표칭호 없음
Profile

질문하기 JavaScript

돈이 안 빠져나가요

2024.02.01 조회 수 37 추천 수 0
이해도 초보자 
게임버전 (JE) 1.19 
게임버전 (BE) 관련없음 
스크립트 버전 2.8.0 
스크립트 애드온 skellett, skrayfall, skutilities 

command /메뉴:

    trigger:

        set {_gui} to chest with 1 rows named "&a메뉴"

        set slot 4 of {_gui} to diamond named "&a야생으로 이동하기" with lore "가격: 15000" and ""

        set slot 2 of {_gui} to wooden axe named "&a광장으로 이동하기" with lore "" and "&6클릭하면 광장으로 이동합니다" and ""

        open {_gui} to player

        

on inventory click:

    if inventory name is "&a메뉴":

        cancel event

        if click type is left mouse:

            if clicked slot is 4:

                set {_ lore} to uncolored line 1 of lore of clicked item

                replace all "가격:" and " " with "" in {_lore}

                if {돈::%uuid of player%} < {_lore}:

                    send "&c돈이 부족합니다"

                else:

                    subtract {_lore} from { 돈::%uuid of player%} 

                    teleport player to location(2.5,105,2.5,world("overworld"))

            if clicked slot is 2:

                execute player command "광장"




이렇게 입력하고 /메뉴 치고 다이아몬드를 클릭하면 순간이동만되고 돈은 안빠져나갑니다. 어떻게 해야할까요?

1개의 댓글

슈퍼레몬
2024.02.02

변수명 앞에 띄어쓰기가 있습니다.

뉴스 및 창작물
/files/thumbnails/288/791/003/262x150.crop.jpg?20240602150002

아티클

《까다로운 시련》 업데이트 날짜 공개 및 정보

학교가기싫다

2024-06-02

0

/files/thumbnails/841/773/003/262x150.crop.jpg?20240526120908

레드스톤

마인크래프트 노트블록버전 『 봄을 고하다 (春を告げる) 』 [더블옥타브 버전]

노트블럭전문가

2024-05-26

0

/files/thumbnails/712/796/003/262x150.crop.jpg?20240525085438

레드스톤

마인크래프트 노트블록으로 만든 『 봄을 고하다 (春を告げる) 』 1

Sonttukk

2024-05-25

0

/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