개인 자료란 (JE)

  서버 커뮤니티

Profile 대문 대표칭호 없음

DaeMooon 3a660a005a5d4340bd1d074b7ea381d7

Profile

질문하기 스크립트

스크립트 버전 관련 질문입니다.

2023.01.16 조회 수 193 추천 수 0
이해도 입문자 
게임버전 (JE) 1.19.2 
게임버전 (BE) 1.19.x 
스크립트 버전 2.6.4 

제가 1.19.2에 돈 스크립트를 적용하고 싶은데 이 스크립트가 1.19.2에 적용 되나요 ? skripts 폴더에 넣고 reload 하고 명령어를 실행 했더니 알 수 없거나 불완전한 명령어라고 나옵니다.


#Copyright 2022. 규미(Gyumy) all rights reserved.


#[개발환경]

#Java : jre1.8.0_281 build 1.8.0_281-b09

#Bukkit : git-Paper-1618 (MC: 1.12.2)

#Skript : 2.5.3

#Add-on : x


#유튜브 : https://youtu.be/ochjDHUZ-1o

#블로그 : https://nalag.tistory.com/47

#디스코드 : 규미#7691


options:

    a: &a&l[&aMoney&a&l]&f

    b: 5000 #서버에 처음접속했을때 지급되는 기본 소지금.

function FormatMoneyUnit(n:number) :: text: #숫자를 통화로 변환합니다.

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

    set {_t} to ""

    loop round up length of {_r} / 3 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 MoneyUnitToNum(t:text) :: number:    #통화를 숫자로 변환합니다.

    replace "," with "" in {_t}

    return "%{_t}%" parsed as integer

on join:

    if {money::%uuid of player%} is not set:

        set {money::%uuid of player%} to {@b}

on rightclick with paper:

    name of tool contains "{@a} "

    cancel event

    set {_m} to uncolored name of tool

    replace "[Money]", "원 (우클릭)" and " " with "" in {_m}

    remove 1 of tool from tool

    set {_m} to MoneyUnitToNum({_m})

    add {_m} to {money::%uuid of player%}

    play sound "block.note.bell"

    send "{@a} 수표를 소비해 &e%FormatMoneyUnit({_m})%&e원&f을 획득하였습니다. &7(소지금 : %FormatMoneyUnit({money::%uuid of player%})%&7원)" 

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

    trigger:

        if arg 1 or arg 2 is not set:

            send "{@a} &7/&f수표 [금액] [갯수] &6- &e돈을 소비하여 수표를 발행합니다."

        else if {money::%uuid of player%} + 0 < arg-1 * arg-2 :

            send "{@a} 돈이 부족해 수표를 발행 할 수 없습니다. &7(소지금 : %FormatMoneyUnit({money::%uuid of player%})%&7원)"

        else:    

            set {_i} to arg-2 of paper named "{@a} &e%FormatMoneyUnit(arg-1)%&e원 &7(우클릭)" with lore " &7우클릭시 수표가 소비되며 돈이 지급됩니다."

            if player has space for {_i}:

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

                give {_i} to player

                send "{@a} &e%FormatMoneyUnit(arg-1)%&e원 &f수표 &e%arg-2%&f장을 발행하였습니다. &7(소지금 : %FormatMoneyUnit({money::%uuid of player%})%&7원)"

            else:

                send "{@a} 인벤토리에 자리가 부족해 수표를 발행할 수 없습니다."

        

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

    trigger:                

        if arg 1 is "설정" or "주기" or "뺏기" or "초기화":

            if player is not op:

                play sound "entity.villager.no"

                send "{@a} 권한이 부족해 명령어를 실행 할 수 없습니다."

                stop

            if arg 2 is not set:

                play sound "entity.villager.no"

                send "{@a} 이름을 입력하지 않았습니다."

                stop            

            if "%arg 1% %arg-2%" is "초기화 전체":    

                delete {money::*}

                play sound "block.note.bell" to players

                broadcast "{@a} 관리자에 의해 서버의 모든 유저의 돈이 초기화되었습니다."

                stop

            set {_a::*} to offlineplayers

            loop {_a::*}:

                set {_a::%loop-index%} to "%loop-value%"

            if {_a::*} doesn't contain arg-2:

                send "{@a} &e%arg-2%&f님은 서버에 존재하지않는 플레이어입니다."

            else:

                if arg 1 is "초기화":

                    set {_p} to arg-2 parsed as offlineplayer

                    set {_u} to uuid of {_p}    

                    play sound "block.note.bell" to {_p}

                    play sound "block.note.bell"                    

                    delete {money::%{_u}%}

                    send "{@a} &e%{_p}%&f님의 돈을 초기화하였습니다."

                    send "{@a} 관리자가 &e%{_p}%&f님의 돈을 초기화하였습니다." to {_p}

                    stop        

                if arg 3 is not set:

                    play sound "entity.villager.no"

                    send "{@a} 금액을 입력하지 않았습니다."

                    stop                        

                set {_p} to arg-2 parsed as offlineplayer

                set {_u} to uuid of {_p}    

                play sound "block.note.bell" to {_p}

                play sound "block.note.bell"

                if arg 1 is "설정":

                    set {money::%{_u}%} to arg-3

                    send "{@a} 관리자가 &e%arg-2%&f님돈을 &e%FormatMoneyUnit(arg-3)%&e원&f으로 설정했습니다." to {_p}

                    send "{@a} &e%arg-2%&f님의 돈을 &e%FormatMoneyUnit(arg-3)%&e원&f으로 설정했습니다."                

                else if arg 1 is "주기":

                    add arg-3 to {money::%{_u}%}

                    send "{@a} 관리자가 &e%FormatMoneyUnit(arg-3)%&e원&f을 지급했습니다. &7(소지금 : %FormatMoneyUnit({money::%{_u}%})%&7원)" to {_p}

                    send "{@a} &e%arg-2%님에게 &e%FormatMoneyUnit(arg-3)%&e원&f을 지급했습니다. &7(소지금 : %FormatMoneyUnit({money::%{_u}%})%&7원)"

                else if arg 1 is "뺏기":    

                    remove arg-3 from {money::%{_u}%}                

                    send "{@a} 관리자가 &e%FormatMoneyUnit(arg-3)%&e원&f을 뺏었습니다. &7(소지금 : %FormatMoneyUnit({money::%{_u}%})%&7원)" to {_p}

                    send "{@a} &e%arg-2%님의 돈을 &e%FormatMoneyUnit(arg-3)%&e원&f을 뺏었습니다. &7(소지금 : %FormatMoneyUnit({money::%{_u}%})%&7원)"

        else:        

            if arg 1 is "순위":

                play sound "block.note.bell"

                loop {money::*}:

                    add loop-index to {_rank::%loop-value%::*}

                set {_index::*} to reversed indexes of {_rank::*}

                send "&6&l&m=========&6&l [ &e서버의 부자들 Top 5 &6&l] &6&l&m========="

                if {_index::*} is not set:

                    send ""

                    send "서버에 등록된 데이터가 존재하지않습니다."

                    send ""

                else:

                    loop {_index::*}:

                        loop {_rank::%loop-value-1%::*}:

                            add 1 to {_rank}

                            send " &6Top %{_rank}% &e%loop-value-2 parsed as offlineplayer% &7: &e%FormatMoneyUnit(loop-value-1 parsed as integer)%&f원"

                            stop if {_rank} is 5

                stop

            else if arg 1 is "보내기":

                if arg 2 or arg 3 is not set:

                    send "{@a} 이름 또는 금액 을 입력하지 않았습니다."

                else if arg-2 parsed as player is offline: #캐시되지않은 오프라인 플레이어를 불러올때 렉이 발생해 온라인일때만 보내지게함.

                    send "{@a} 해당 플레이어가 접속중이지 않습니다."

                else if arg 2 is player:

                    send "{@a} 자기자신에게는 돈을 보낼 수 없습니다."

                else if arg 3 <= 0:    

                    send "{@a} 보낼 금액이 0원보다 커야합니다."

                else if arg 3 > {money::%uuid of player%} + 0:

                    send "{@a} 소지금이 부족하여 돈을 보낼 수 없습니다."

                else:

                    set {_p} to arg-2 parsed as player

                    set {_u} to uuid of arg-2 parsed as player

                    remove arg-3 from {money::%uuid of player%}

                    add arg-3 to {money::%{_u}%}

                    play sound "block.note.bell"

                    play sound "block.note.bell" to {_p}

                    send "{@a} &e%arg-2%&f님에게 &e%FormatMoneyUnit(arg-3)%&e원&f을 보냈습니다. &7(소지금 : %FormatMoneyUnit({money::%{_u}%})%&7원)"

                    send "{@a} &e%player%&f님께서 &e%FormatMoneyUnit(arg-3)%&e원&f을 보냈습니다. &7(소지금 : %FormatMoneyUnit({money::%{_u}%})%&7원)" to {_p}                                

                    stop

                play sound "entity.villager.no"    

            else if arg 1 is "확인":

                if arg 2 is not set:

                    play sound "entity.villager.no"

                    send "{@a} 이름 을 입력하지 않았습니다."

                    stop                

                if arg-2 parsed as player is offline: #캐시되지않은 오프라인 플레이어를 불러올때 렉이 발생해 온라인일때만 보내지게함.

                    send "{@a} 해당 플레이어가 접속중이지 않습니다."            

                    stop

                play sound "block.note.bell"

                send ""

                send "{@a} &e%arg-2%님의 소지금 : &e%FormatMoneyUnit({money::%uuid of arg-2 parsed as player%} + 0)% 원"

                send ""    

            else:

                play sound "block.note.hat"

                send "&2&l&m=========&2&l [ &a돈 도움말 &2&l] &2&l&m========="

                send ""

                send "       &a▣ &e%player%님의 소지금 : &e%FormatMoneyUnit({money::%uuid of player%}+0)% 원"

                send ""

                send " &8/&f돈 확인 &f[이름] &6- &e다른 유저의 소지금을 확인합니다."

                send " &8/&f돈 순위 &6- &e서버내의 돈이 많은 유저들을 확인합니다."

                send " &8/&f돈 보내기 &f[이름] [금액] &6- &e다른 유저에게 돈을 보냅니다."

                player is op

                send ""

                send " &8/&f돈 설정 &f[이름] [금액] &6- &e유저의 돈을 설정합니다. &c(Op)"

                send " &8/&f돈 주기 &f[이름] [금액] &6- &e유저에게 돈을 지급합니다. &c(Op)"

                send " &8/&f돈 뺏기 &f[이름] [금액] &6- &e유저의 돈을 차감합니다. &c(Op)"

                send " &8/&f돈 초기화 &f[이름|전체] &6- &e돈 변수를 초기화합니다. &c(Op)"    

                stop        

2개의 댓글

Dalsu
2023.01.16

마인크래프트 1.12.2 버전, 스크립트 2.5.3버전을 기준으로 제작된 스크립트네요. 아마 스크립트 버전이 달라서 생긴 오류인듯 합니다

대문
2023.01.16
@Dalsu

앗 감사합니다 !

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

모드

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

학교가기싫다

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

/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