개인 자료란 (JE)

  서버 커뮤니티

Profile redpanda 대표칭호 없음
Profile

질문하기 스크립트

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

2024.03.02 조회 수 74 추천 수 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/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