개인 자료란 (JE)

  서버 커뮤니티

Profile redpanda 대표칭호 없음
Profile

질문하기 스크립트

입,출금 스크립트 질문이요!

2024.03.02 조회 수 31 추천 수 0
이해도 입문자 
게임버전 (JE) 1.19.4, 1.20 
게임버전 (BE) 관련없음 

command /atm출금:

    trigger:

        play sound "entity.experience_orb.pickup" with volume 1 and pitch 2 at player

        open chest with 3 rows named "&cATM출금" to player

        set slot 10 of current inventory of player to cyan dye named "&b1coin" with lore "클릭시 계좌에서 1coin 차감 후 현금 1coin을 지급합니다,"

        set slot 11 of current inventory of player to green dye named "&b10coin" with lore "클릭시 계좌에서 10coin 차감 후 현금 10coin을 지급합니다,"

        set slot 12 of current inventory of player to yellow dye named "&b50coin" with lore "클릭시 계좌에서 50coin 차감 후 현금 50coin을 지급합니다,"

        set slot 13 of current inventory of player to purple dye named "&b100coin" with lore "클릭시 계좌에서 100coin 차감 후 현금 100coin을 지급합니다,"

        set slot 14 of current inventory of player to magenta dye named "&b500coin" with lore "클릭시 계좌에서 500coin 차감 후 현금 500coin을 지급합니다,"

        set slot 15 of current inventory of player to orange dye named "&b1000coin" with lore "클릭시 계좌에서 1000coin 차감 후 현금 1000coin을 지급합니다,"

        set slot 16 of current inventory of player to light gray dye named "&b5000coin" with lore "클릭시 계좌에서 5000coin 차감 후 현금 5000coin을 지급합니다,"

        

        

on inventory click:

    if event-inventory's name contains "&cATM출금":

        cancel event

        if clicked slot is 10:

            if {돈::%uuid of player%} > 0:

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

                give cyan dye of mending 1 named "&o1coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

        

        

        if clicked slot is 11:

            if {돈::%uuid of player%} > 10:

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

                give green dye of mending 1 named "&o10coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

            

            

        if clicked slot is 12:

            if {돈::%uuid of player%} > 50:

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

                give yellow dye of mending 1 named "&o50coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

            

            

        if clicked slot is 13:

            if {돈::%uuid of player%} > 100:

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

                give purple dye of mending 1 named "&o100coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

            

            

        if clicked slot is 14:

            if {돈::%uuid of player%} > 500:

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

                give magenta dye of mending 1 named "&o500coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

            

            

        if clicked slot is 15:

            if {돈::%uuid of player%} > 1000:

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

                give orange dye of mending 1 named "&o1000coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

            

            

        if clicked slot is 16:

            if {돈::%uuid of player%} > 5000:

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

                give light gray dye of mending 1 named "&o5000coin" to the player

            else:

                message "{@오류} 돈이 없습니다"

                

give 와 subtract의 반대 명령어가 뭔가요ㅠㅠ

수정을 어떻게해야하나요?ㅠㅠㅠ




1개의 댓글

환타비
2024.03.02

give 의 반대는 remove고

subtract 반대는 add 입니당

뉴스 및 창작물
/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견

학교가기싫다

2024-05-08

0

/files/thumbnails/384/778/003/262x150.crop.jpg?20240507003327

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1

/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