개인 자료란 (JE)

  서버 커뮤니티

Profile redpanda 대표칭호 없음
Profile

질문하기 스크립트

스크립트 오류입니다!

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

options:

    돈시스템: &a&l[&6&lMoney&a&l]&f

    설명: &b&l[&2&lMoney Help&b&l]&f

    수표: &a&l[&e&l수표&a&l]&f

    오류: &4&l[&c&l오류&4&l]&f

    

function Conversion_text(n:number) :: text:

    set {_r} to "%{_n}%"

    set {_t} to ""

    set {_itme} to length of {_r}

    set {_itme} to round up {_itme} / 3

    loop {_itme} times:

        set {_l} to the last 3 characters of {_r}

        set {_r} to the first length of {_r} - 3 characters of {_r}

        if loop-number = 1:

            set {_t} to "%{_l}%%{_t}%"

        else:

            set {_t} to "%{_l}%,%{_t}%"

    return {_t}

    

function Conversion_number(t:text) :: number:

    replace "," with "" in {_t}

    return "%{_t}%" parsed as integer


command /돈 [<text>] [<player>] [<integer>]:

    trigger:

        if arg 1 is not set:

            if player is not op:

                message "{@설명} /돈 확인"

            message "{@설명} /돈 보내기 [플레이어] [금액]"

            if player is op:

                message "&c[관리자 전용]"

                message "{@설명} /돈 확인 [플레이어]"

                message "{@설명} /돈 지급 [플레이어] [금액]"

                message "{@설명} /돈 차감 [플레이어] [금액]"

                message "{@설명} /돈 설정 [플레이어] [금액]"

                

        if arg 1 is "확인":

            if player is op:

                if arg 2 is not set:

                    message "{@돈시스템} %player%님이 가진 돈은 &e%{돈::%uuid of player%}%원 &f입니다."

                else:

                    message "{@돈시스템} %arg 2%님이 가진 돈은 &e%{돈::%uuid of arg-2%}%원 &f입니다."

            else:

                message "{@돈시스템} %player%님이 가진 돈은 &e%{돈::%uuid of player%}%원 &f입니다."

                

        if arg 1 is "보내기":

            if arg 3 >= 1:

                if {돈::%uuid of player%} >= arg 3:

                    remove arg 3 from {돈::%uuid of player%}

                    add arg 3 to {돈::%uuid of arg-2%}

                    message "{@돈시스템} %arg 2%님에게 &e%arg 3%원&f을 보냈습니다"

                else:

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

            else:

                message "{@오류} 1원 이상의 금액만 보내실 수 있습니다."

                

        if player is op:

            if arg 1 is "지급":

                add arg 3 to {돈::%uuid of arg-2%}

                message "{@돈시스템} %arg 2%님에게 &e%arg 3%원&f을 지급하였습니다"

                

            if arg 1 is "차감":

                remove arg 3 from {돈::%uuid of arg-2%}

                message "{@돈시스템} %arg 2%님에게 &e%arg 3%원&f을 차감하셨습니다"

                

            if arg 1 is "설정":

                set {돈::%uuid of arg-2%} to arg 3

                message "{@돈시스템} %arg 2%님의 돈을 &e%arg 3%원&f으로 설정하셨습니다"

                

        if sender is console:

            if arg 1 is "지급":

                add arg 3 to {돈::%uuid of arg-2%}

                

            if arg 1 is "차감":

                remove arg 3 from {돈::%uuid of arg-2%}

                

            if arg 1 is "설정":

                set {돈::%uuid of arg-2%} to arg 3

                message "{@돈시스템} %arg 2%님의 돈을 &e%arg 3%원&f으로 설정하셨습니다"

                

command /수표 [<integer>] [<integer>]:

    trigger:

        if arg 1 is not set:

            message "/수표 [금액] [갯수]"

        if arg 2 is not set:

            if arg 1 >= 1:

                if {돈::%uuid of player%} >= arg 1:

                    remove arg 1 from {돈::%uuid of player%}

                    give 1 of paper named "{@수표} &b%Conversion_text(arg 1)%&e원" with lore "&c우클릭시 돈이 %Conversion_text(arg 1)%원 들어옵니다." to player

                    message "{@돈시스템} &e%Conversion_text(arg 1)%&f원 만큼 &c1&f장의 수표를 만들었습니다."

                else:

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

            else:

                message "{@오류} 1원 이상의 금액만 뽑으실 수 있습니다."

        else:

            if arg 2 >= 1:

                if arg 1 >= 1:

                    if {돈::%uuid of player%} >= arg 1 * arg 2:

                        remove arg 1 * arg 2 from {돈::%uuid of player%}

                        give arg 2 of paper named "{@수표} &b%Conversion_text(arg 1)%&e원" with lore "&c우클릭시 돈이 %Conversion_text(arg 1)%원 들어옵니다." to player

                        message "{@돈시스템} &e%Conversion_text(arg 1)%&f원 만큼 &c%arg 2%&f장의 수표를 만들었습니다."

                    else:

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

                else:

                    message "{@오류} 1원 이상의 금액만 뽑으실 수 있습니다."

            else:

                message "{@오류} 1개 이상의 수표만 뽑으실 수 있습니다."

                

on rightclick with paper:

    if player's tool's name contains "{@수표}":

        set {_money} to uncolored name of player's tool

        remove 1 of player's tool from player's inventory

        replace all "수표" and " " and "[" and "]" and "원" with "" in {_money}

        add Conversion_number("%{_money}%") to {돈::%uuid of player%}

        message "{@돈시스템} &c%{_money}%&f원 만큼 돈을 얻으셨습니다." to player

        




수표 명령어를 사용하면


이렇게 뜹니다ㅠㅠ 어떻게 해결해야 하나요..?





1000은 안돼고 999는 됩니다. 그런데 openchest 스크립트가 실행이 안되는 것 같아요




11개의 댓글

JINAH
2024.02.20

스크립트 위에 있는 옵션까지 전부 적어서 올려주시길 바랍니다

redpanda
2024.02.20
@JINAH

수정했습니다! 어디가 문제인걸까요..?

JINAH
2024.02.20
@redpanda

테스트 결과 문제 없습니다. 명령어를 어떻게 치면 저렇게 나오나요?

redpanda
2024.02.20
@JINAH

/수표 (숫자) 라고 치면 저러네요..

JINAH
2024.02.20
@redpanda

op상태와 deop 상태로

 

/수표

 

명령어 써봤는데 정상작동 되네요 서버 스크립트를 잘못 적으신거같네요

redpanda
2024.02.20
@JINAH

현재 사용중인 애드온도 같이 올려봤습니다!

JINAH
2024.02.20
@redpanda

skbee 애드온 넣어보시겠어요?

redpanda
2024.02.20
@JINAH

넵! 잠시만요

 

redpanda
2024.02.20
@JINAH

1000은 안돼고 999는 됩니다. 그리고openchest 스크립트가 실행이 안되는 것 같아요

JINAH
2024.02.20
@redpanda

kata.rina. 디스코드 친추 주세요

redpanda
2024.02.20
@JINAH

보냈습니다

뉴스 및 창작물
/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