개인 자료란 (JE)

  서버 커뮤니티

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

질문하기 JavaScript

돈이 안 빠져나가요

2024.02.01 조회 수 35 추천 수 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/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 모드에서 악성코드 발견 2

학교가기싫다

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