개인 자료란 (JE)

  서버 커뮤니티

Profile La_pius 대표칭호 없음
Profile

질문하기 스크립트

1.7.10 스크립트를 1.12.2로 가져오면서 문제가 생겼는데 해결 가능할까요?

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

command /장신구제작 [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:

    trigger:

        if player is op:

            if player's tool is set:

                set 1th line of tool's lore to "&r---- &r( &6Option &r) ----"

                set 3th line of tool's lore to "&9추가공격력 : %arg 1%"

                set 4th line of tool's lore to "&4추가체력 : %arg 2%"

                set 5th line of tool's lore to "&8추가방어력 : %arg 3%"

                set 6th line of tool's lore to "&5추가크리티컬 : %arg 4%%%"


command /장비:

    trigger:

        open chest with 1 row named "&c[ &7장비 &c]" to player

        set slot 0 of player's current inventory to black glass named "&r"

        set slot 1 of player's current inventory to black glass named "&r"

        set slot 2 of player's current inventory to black glass named "&r"

        set slot 3 of player's current inventory to black glass named "&r"

        set slot 4 of player's current inventory to {Item.%player%}

        set slot 5 of player's current inventory to black glass named "&r"

        set slot 6 of player's current inventory to black glass named "&r"

        set slot 7 of player's current inventory to black glass named "&r"

        set slot 8 of player's current inventory to black glass named "&r"


on inventory click:

    if inventory name of current inventory of player contains "&c[ &7장비 &c]":

        if name of click item is "&r":

            cancel event

        if name of click item is "&5장신구를 장비해 주세요":

            cancel event

        if name of click item is "&c[ &5장신구 &c]":

            set {Item.%player%} to click item

            set slot 4 of player's current inventory to {Item.%player%} named "&c[ &5장비중인 장신구 &c]" 

            remove 1 of click item from player's inventory

            cancel event

        if name of click item is "&c[ &5장비중인 장신구 &c]":

            give player 1 of {Item.%player%}

            set {Item.%player%} to white glass

            set slot 4 of player's current inventory to {Item.%player%} named "&5장신구를 장비해 주세요" with lore "&a레벨제한 : 0 |||| &r---- &r( &6Option &r) ---- ||||&9추가공격력 : 0||&7추가체력 : 0||&8추가방어력 : 0||&5추가크리티컬 : 0%%"

            set {Item.%player%} to click item

            cancel event



장신구 제작과 장비창,장신구장착입니다  장신구 제작까진 잘되는데 장비창에서 아이템들이 꺼내지고 장신구가 적용이 안됩니다 

해결 가능할까요?


4개의 댓글

qsef1256
2022.06.20

name of click item -> display name of event-item

La_pius
2022.06.20
@qsef1256

on inventory click:

if inventory name of current inventory of player contains "&c[ &7장비 &c]":

if display name of event-item is "&r":

cancel event

if display name of event-item is "&5장신구를 장비해 주세요":

cancel event

if display name of event-item is "&c[ &5장신구 &c]":

set {Item.%player%} to click item

set slot 4 of player's current inventory to {Item.%player%} named "&c[ &5장비중인 장신구 &c]"

remove 1 of click item from player's inventory

cancel event

if display name of event-item is "&c[ &5장비중인 장신구 &c]":

give player 1 of {Item.%player%}

set {Item.%player%} to white glass

set slot 4 of player's current inventory to {Item.%player%} named "&5장신구를 장비해 주세요" with lore "&a레벨제한 : 0 |||| &r---- &r( &6Option &r) ---- ||||&9추가공격력 : 0||&7추가체력 : 0||&8추가방어력 : 0||&5추가크리티컬 : 0%%"

set {Item.%player%} to click item

cancel event

이렇게 하는거 맞나요?

 

qsef1256
2022.06.20
@La_pius

네 근데 코드 다 올리신 거 맞나요?

qsef1256
2022.06.20
@La_pius

그거 안되면 inventory name of current inventory -> name of event-inventory 로 바꿔보세요

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