개인 자료란 (JE)

  서버 커뮤니티

Profile 주린인 대표칭호 없음

Jurin_ ad50fa1b49684901a5ffa55f0bae87fb

Profile

질문하기 스크립트

[질문 ] 스크립트 제작을 하는데 어려운 점이 있어 물어봅니다.

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

오류는 안 뜨는데  눌으면 전직 되었다고 안 뜹니다 



구문은 밑에

on first join:    

    set {돈.%player%} to 50000

    set {직업1.%player%} to "&f&l모험가"

    set {직업2.%player%} to "&f&l없음"

    set {레벨.%player%} to 0


command /전직:

    trigger:

        open chest inventory with 6 rows named "&a&l전직" to player

        loop 100 times:

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

            add 1 to {_crb}

        set slot 0 of current inventory of player to black stained glass pane named "&7"

        set slot 4 of current inventory of player to clock named "&a&l전직"

        add "&f&l견습궁사/견습살수/주술사/내공or외공수련자/견습술사/견습기사로" to lore of slot 4 of current inventory of player

        add "&f&l전직 할수있습니다. " to lore of slot 4 of current inventory of player

        set slot 20 of current inventory of player to Bow named "&9견습궁사"

        add "&f&l견습궁사로 전직을 할수있습니다." to lore of slot 20 of current inventory of player

        add "&f&l설명: &e&l주로 활을 쓰지만 단검도 씁니다." to lore of slot 20 of current inventory of player

        

        set slot 21 of current inventory of player to wooden hoe named "&c&l견습살수"

        add "&f&l견습살수로 전직을 할수있습니다." to lore of slot 21 of current inventory of player

        add "&f&l설명: &e&l주로 단검 씁니다." to lore of slot 21 of current inventory of player

        

        set slot 23 of current inventory of player to enchanted book named "&4&l주술사"

        add "&f&l주술사로 전직을 할수있습니다." to lore of slot 23 of current inventory of player

        add "&f&l설명: &e&l주로 책을 쓰지만 지팡이도 씁니다." to lore of slot 23 of current inventory of player

        

        set slot 24 of current inventory of player to nether star named "&6&l내공/외공수련자"

        add "&f&l내공/외공수련자로 전직을 할수있습니다." to lore of slot 24 of current inventory of player

        add "&f&l설명: &e&l내공/외공을 선택할수있습니다." to lore of slot 24 of current inventory of player

        

        set slot 29 of current inventory of player to book named "&a&l견습술사"

        add "&f&l견습술사로 전직을 할수있습니다." to lore of slot 29 of current inventory of player

        add "&f&l설명: &e&l주로 책을 쓰지만 지팡이도 씁니다." to lore of slot 29 of current inventory of player

        

        set slot 31 of current inventory of player to paper named "&a&l전직초기화"

        add "&f&l설명: 전직초기화합니다. 모든스텟 모든스킬이 초기화됩니다" to lore of slot 31 of current inventory of player

        

        set slot 33 of current inventory of player to wooden sword named "&f&l견습기사"

        add "&f&l견습기사로 전직합니다." to lore of slot 33 of current inventory of player

        add "&f&l설명: &e&l주로 검을사용합니다." to lore of slot 33 of current inventory of player

        

        set slot 10 of current inventory of player to grey stained glass pane named "&7"

        set slot 11 of current inventory of player to grey stained glass pane named "&7"

        set slot 12 of current inventory of player to grey stained glass pane named "&7"

        set slot 13 of current inventory of player to grey stained glass pane named "&7"

        set slot 14 of current inventory of player to grey stained glass pane named "&7"

        set slot 15 of current inventory of player to grey stained glass pane named "&7"

        set slot 16 of current inventory of player to grey stained glass pane named "&7"

        set slot 19 of current inventory of player to grey stained glass pane named "&7"

        set slot 22 of current inventory of player to lime stained glass pane named "&7"

        set slot 25 of current inventory of player to grey stained glass pane named "&7"

        set slot 28 of current inventory of player to grey stained glass pane named "&7"

        set slot 30 of current inventory of player to lime stained glass pane named "&7"

        set slot 32 of current inventory of player to lime stained glass pane named "&7"

        set slot 34 of current inventory of player to grey stained glass pane named "&7"

        set slot 37 of current inventory of player to grey stained glass pane named "&7"

        set slot 38 of current inventory of player to grey stained glass pane named "&7"

        set slot 39 of current inventory of player to grey stained glass pane named "&7"

        set slot 40 of current inventory of player to grey stained glass pane named "&7"

        set slot 41 of current inventory of player to grey stained glass pane named "&7"

        set slot 42 of current inventory of player to grey stained glass pane named "&7"

        set slot 43 of current inventory of player to grey stained glass pane named "&7"


        set slot 49 of current inventory of player to knowledge book named "&7&l내정보"

        add "&e&l닉네임:&f %player%" to lore of slot 49 of current inventory of player

        add "&e&l직업:&f %{직업1.%player%}%" to lore of slot 49 of current inventory of player

        add "&e&l부직업:&f %{직업2.%player%}%" to lore of slot 49 of current inventory of player

        add "&e&l레벨:&f %{레벨.%player%}%" to lore of slot 49 of current inventory of player

        add "&e&l소유금액:&f %{돈.%player%}%" to lore of slot 49 of current inventory of player

        

on inventory click:

    if iname is "&a&l전직":

        cancel event

        if clicked item is not stained glass pane:

            play sound "UI_BUTTON_CLICK" with volume 0.4 to the player

            if {직업1.%player%} = "모험가":

                if clicked raw slot is 20:

                    if {돈.%player%} >= 5000:

                        subtract 5000 from {돈.%player%}

                        set {직업1.%player%} to "&f&l견습궁사"

                        message "{@s} %player%님 &e&l견습궁사&f&l로 전직하셨습니다."

                    else if {돈.%player%} < 5000:

                        message "{@s} %player%님 돈이 부족합니다."

                

                if clicked raw slot is 21:

                    if {돈.%player%} >= 5000:

                        subtract 5000 from {돈.%player%}

                        set {직업1.%player%} to "&f&l견습살수"

                        message "{@s} %player%님 &e&l견습살수&f&l로 전직하셨습니다."

                    else if {돈.%player%} < 5000:

                        message "{@s} %player%님 돈이 부족합니다."

                    

                    

                if clicked raw slot is 23:

                    if {돈.%player%} >= 5000:

                        subtract 5000 from {돈.%player%}

                        set {직업1.%player%} to "&e&l주술사"

                        message "{@s} %player%님 &e&l주술사&f&l로 전직하셨습니다."

                    else if {돈.%player%} < 5000:

                        message "{@s} %player%님 돈이 부족합니다."

                        

                if clicked raw slot is 24:

                    if {돈.%player%} >= 5000:

                        subtract 5000 from {돈.%player%}

                        set {직업1.%player%} to "&e&l내공/외공수련자"

                        message "{@s} %player%님 &e&l내공/외공수련자&f&l로 전직하셨습니다."

                    else if {돈.%player%} < 5000:

                        message "{@s} %player%님 돈이 부족합니다."

                        

                if clicked raw slot is 30:

                    if {돈.%player%} >= 5000:

                        subtract 5000 from {돈.%player%}

                        set {직업1.%player%} to "&e&l견습술사"

                        message "{@s} %player%님 &e&l견습술사&f&l로 전직하셨습니다."

                    else if {돈.%player%} < 5000:

                        message "{@s} %player%님 돈이 부족합니다."

                        

                if clicked raw slot is 32:

                    if {돈.%player%} >= 50000:

                        subtract 50000 from {돈.%player%}

                        set {직업1.%player%} to "&e&l모험가&f&l"

                        message "{@s} %player%님 전직이 초기화됬습니다."

                    else if {돈.%player%} < 50000:

                        message "{@s} %player%님 돈이 부족합니다."

                        

                if clicked raw slot is 34:

                    if {돈.%player%} >= 5000:

                        subtract 50000 from {돈.%player%}

                        set {직업1.%player%} to "&e&l견습기사&f&l"

                        message "{@s} %player%님 &e&l견습기사&f&l로 전직하셨습니다."

                    else if {돈.%player%} < 5000:

                        message "{@s} %player%님 돈이 부족합니다."

파일까지 남겨드리겠습니다. 

전직설정.sk 


2개의 댓글

거너아나
2022.03.19

그거만 보면 {직업.1.%player%} 변수가 설정되어있지 않은 것 같아요

주린인
2022.03.19
@거너아나

감사합니다 구문 보니 if {직업1.%player%} = "모험가" 이것을 if {직업1.%player%} = "&f&l모험가" 바꿔 바로 되네요 감사합니다 ~