개인 자료란 (JE)

  서버 커뮤니티

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

질문하기 JavaScript

돈이 안 빠져나가요

2024.02.01 조회 수 33 추천 수 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/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

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1