개인 자료란 (JE)

  서버 커뮤니티

Profile sso5334 대표칭호 없음
Profile

질문하기 스크립트

주식 스크립트 오류

2022.08.03 조회 수 181 추천 수 0
이해도 초보자(스크립트 구성요소나 기본문법은 알아요) 
게임버전 (JE) 1.18.1 
게임버전 (BE) 관련없음 


options:

    o : of current inventory of player

    

command /주식확인:

    trigger:

        open chest with 3 rows named "&c주식" to player

        set {_crb} to 0

        loop 36 times:

            set slot {_crb} of current inventory of player to black stained glass pane named "&7"

            add 1 to {_crb}

        set slot 10 {@o} to paper named "&a호싸주식"

        set slot 13 {@o} to paper named "&b에벩주식"

        set slot 16 {@o} to paper named "&c누구세용주식"

        add "&f현재 가격: &e%{주식가격::호싸주식}%&e원" to lore of slot 10 {@o}

        add " " to lore of slot 10 {@o}

        add "&6가격 변동폭: -30~+45%" to lore of slot 10 {@o}

        add "&a보유 주식: &2%{주식.%uuid of player%::호싸주식}%&a(개)" to lore of slot 10 {@o}

        add " " to lore of slot 10 {@o}

        add "&c좌클릭으로 구매, 우클릭으로 판매" to lore of slot 10 {@o}

        add "&4쉬프트+좌클릭으로 100개 구매, 쉬프트+우클릭으로 전부 판매" to lore of slot 10 {@o}

        add " " to lore of slot 10 {@o}

        add "&e이전 변동 기록: %{주식기록::호싸주식}%" to lore of slot 10 {@o}

        

        add "&f현재 가격: &e%{주식가격::에벩주식}%&e원" to lore of slot 13 {@o}

        add " " to lore of slot 13 {@o}

        add "&6가격 변동폭: -20~+35%" to lore of slot 13 {@o}

        add "&a보유 주식: &2%{주식.%uuid of player%::에벩주식}%&a(개)" to lore of slot 13 {@o}

        add " " to lore of slot 13 {@o}

        add "&c좌클릭으로 구매, 우클릭으로 판매" to lore of slot 13 {@o}

        add "&4쉬프트+좌클릭으로 100개 구매, 쉬프트+우클릭으로 전부 판매" to lore of slot 13 {@o}

        add " " to lore of slot 13 {@o}

        add "&e이전 변동 기록: %{주식기록::에벩주식}%" to lore of slot 13 {@o}

        

        add "&f현재 가격: &e%{주식가격::누구세용주식}%&e원" to lore of slot 16 {@o}

        add " " to lore of slot 16 {@o}

        add "&6가격 변동폭: -10~+25%" to lore of slot 16 {@o}

        add "&a보유 주식: &2%{주식.%uuid of player%::누구세용주식}%&a(개)" to lore of slot 16 {@o}

        add " " to lore of slot 16 {@o}

        add "&c좌클릭으로 구매, 우클릭으로 판매" to lore of slot 16 {@o}

        add "&4쉬프트+좌클릭으로 100개 구매, 쉬프트+우클릭으로 전부 판매" to lore of slot 16 {@o}

        add " " to lore of slot 16 {@o}

        add "&e이전 변동 기록: %{주식기록::누구세용주식}%" to lore of slot 16 {@o}

        

command /주식초기화:

    trigger:

        broadcast "&c운영자가 주식 데이터를 모두 초기화 했습니다."

        set {주식가격::호싸주식} to 200000

        set {주식가격::에벩주식} to 100000

        set {주식가격::누구세용주식} to 50000

        set {주식변동시간} to 120

        loop all players:

            set {주식.%uuid of loop-player%::호싸주식} to 0

            set {주식.%uuid of loop-player%::에벩주식} to 0

            set {주식.%uuid of loop-player%::누구세용주식} to 0

            set {주식기록::호싸주식} to "&f기록 없음"

            set {주식기록::에벩주식} to "&f기록 없음"

            set {주식기록::누구세용주식} to "&f기록 없음"

            

on inventory click:

    if inventory name is "&상점":

        cancel event

        if clicked item is not black stained glass pane:

            set {_stock} to uncolored name of clicked item

            replace all " 주식" with "" in {_stock}

            if clicked type is left mouse button:

                if {돈.%uuid of player%} is not smaller than {주식가격::%{_stock}%}:

                    subtract {주식가격::%{_stock}%} from {돈.%uuid of player%}

                    add 1 to {주식.%uuid of player%::%{_stock}%}

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

                else:

                    play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                    message "&c돈이 부족합니다!"

            else if clicked type is left mouse button with shift:

                if {돈.%uuid of player%} is not smaller than {주식가격::%{_stock}%}*10:

                    subtract {주식가격::%{_stock}%}*10 from {돈.%uuid of player%}

                    add 100 to {주식.%uuid of player%::%{_stock}%}

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

                else:

                    play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                    message "&c돈이 부족합니다!"

            else if clicked type is right mouse button:

                if {주식.%uuid of player%::%{_stock}%} is bigger than 0:

                    add {주식가격::%{_stock}%} to {돈.%uuid of player%}

                    subtract 1 from {주식.%uuid of player%::%{_stock}%}

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

                else:

                    play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                    message "&c주식이 부족합니다!"

            else if clicked type is right mouse button with shift:

                if {주식.%uuid of player%::%{_stock}%} is bigger than 0:

                    add {주식가격::%{_stock}%}*{주식.%uuid of player%::%{_stock}%} to {돈.%uuid of player%}

                    set {주식.%uuid of player%::%{_stock}%} to 0

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

                    message "&4주식을 모두 판매하였습니다!"

                else:

                    play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                    message "&c주식이 부족합니다!"

            make player execute command "/주식확인"

        

on join:

    create bossbar titled "&c주식 변동까지 &4%{주식변동시간}%&4초&c남았습니다!" and id "주식타이머" for player with progress 100 with colors blue with style segmented 10

    

command /주식강제변동:

    trigger:

        if player is op:

            set {주식변동시간} to 0

            broadcast "&c김태원이 강제로 주식을 변동시켰습니다!"

            

every 1 second:

    if {주식변동시간} is 0:

        set {주식변동시간} to 30

        loop all players:

            create bossbar titled "&c주식 변동까지 &4%{주식변동시간}%&4초&c남았습니다!" and id "주식타이머" for loop-player with progress 100 with colors blue with style segmented 10

        broadcast "&4주식 가격이 변동되었습니다!"

        set {_stock} to "호싸주식"

        set {_ran} to random integer between -38 and 43

        set {_price} to round ({주식가격::%{_stock}%}/100*40)

        if {_ran} is bigger than 0:

            add {_price} to {주식가격::%{_stock}%}

            set {주식기록::%{_stock}%} to "&a🔺&2(+%{_price}%&2)"

        else:

            subtract {_price} from {주식가격::%{_stock}%}

            set {주식기록::%{_stock}%} to "&c🔻&4 (-%{_price}%&4)"

            

        set {_stock} to "에벩주식"

        set {_ran} to random integer between -25 and 32

        set {_price} to round ({주식가격::%{_stock}%}/100*40)

        if {_ran} is bigger than 0:

            add {_price} to {주식가격::%{_stock}%}

            set {주식기록::%{_stock}%} to "&a🔺&2(+%{_price}%&2)"

        else:

            subtract {_price} from {주식가격::%{_stock}%}

            set {주식기록::%{_stock}%} to "&c🔻&4(-%{_pricee}%&4)"

        set {_stock} to "누구세용주식"

        set {_ran} to random integer between -15 and 17

        set {_price} to round ({주식가격::%{_stock}%}/100*40)

        if {_ran} is bigger than 0:

            add {_price} to {주식가격::%{_stock}%}

            set {주식기록::%{_stock}%} to "&a🔺&2(+%{_price}%&4)"

        else:

            subtract {_price} from {주식가격::%{_stock}%}

            set {주식기록::%{_stock}%} to "&c🔻&4(-%{_price}%&4)"

        loop all players:

            if name of current inventory of loop-player is "&c주식":

                make loop-player execute command "/주식확인"

    else:

        subtract 1 from {주식변동시간}

        set bossbar "주식타이머" progress to round ({주식변동시간}/60*100)

        set bossbar "주식타이머" title to "&c주식 변동까지 &4%{주식변동시간}%&4초&c남았습니다!"

                        

                        

            

        

        이렇게 구문을 썼는데 

 Can't understand this condition: 'clicked item is not black stained glass pane

if clicked item is not black stained glass pane: 이렇게 떠요 

어떻게 해야돼요?

        

1개의 댓글

거너아나
2022.08.05

if type of clicked item

뉴스 및 창작물
/files/thumbnails/761/908/003/262x150.crop.jpg?20241025153749

건축

서울 숭례문(崇禮門) 4

KHC

2024-10-25

2

/files/thumbnails/578/899/003/262x150.crop.jpg?20241010142350

건축

경주 월정교 1

KHC

2024-10-10

2

/files/thumbnails/219/899/003/262x150.crop.jpg?20241009200950

건축

송전탑+도시 2

dbasd12

2024-10-09

2

/files/thumbnails/246/898/003/262x150.crop.jpg?20241008102328

레드스톤

단다단 - 오토노케(オトノケ) | 마인크래프트 노트블럭 커버

노트블럭전문가

2024-10-08

1

/files/thumbnails/348/896/003/262x150.crop.jpg?20241006103035

디도스/봇테러등등을 낚는 방법 4

물귀신

2024-10-06

3