개인 자료란 (JE)

  서버 커뮤니티

Profile Pm08 대표칭호 없음

Pm08 ec106005f66e4c80b43626ba1b97e145

Profile

질문하기 스크립트

인챈트북 레벨을 변수로 저장

2023.05.20 조회 수 65 추천 수 0
이해도 초보자 
게임버전 (JE) 1.19.4 
게임버전 (BE) 관련없음 
스크립트 버전 Skript-2.6.4 
스크립트 애드온 SkQuery-4.1.9, SkBee-2.9.0 


제가 하고싶은건 슬롯 28에 있는 인챈트북의 인챈트 레벨을 변수에 저장하고싶은데 될까요?


 


#모루 우클릭 감지 + gui

on right click on anvil:

    cancel event

    set {_anvil} to chest with 5 rows named "[모루]"

    loop 45 times:

        set slot loop-num -1 of {_anvil} to black stained glass pane named " "

    set slot 28 and 34 of {_anvil} to air


    set slot 13 of {_anvil} to red stained glass pane named " "

    set slot 19, 20, 21, 12, 25, 24, 23 and 14 of {_anvil} to white stained glass pane named " "


    open {_anvil} to player



#gui

on inventory click:

    if inventory name is "[모루]":

        if item is a black stained glass pane named " ":

            cancel event


        if item is a white stained glass pane named " ":

            cancel event


        if item is a green stained glass pane named " ":

            cancel event    


        if item is a red stained glass pane named " ":

            cancel event


        if item is a anvil named "&r&l&5합치기":

            cancel event




on inventory click:

    if inventory name is "[모루]":

        wait 1 tick


#슬롯28(왼쪽 밑 빈칸) + 슬롯13(중간 위)

        if slot 28 of current inventory of player is enchanted book:

            if {28} is not true:

                set slot 19, 20, 21 and 12 of current inventory of player to green stained glass pane named " "

                play sound "entity.experience_orb.pickup" with volume 0.5 to the player

                set {28} to true

                set {E28} to slot 28 of current inventory of player

        else:

            set {28} to false

            delete {E28}

            set slot 19, 20, 21 and 12 of current inventory of player to white stained glass pane named " "

            set slot 13 of current inventory of player to red stained glass pane named " "


#슬롯34(오른쪽 밑 빈칸) + 슬롯13(중간 위)

        if slot 34 of current inventory of player is enchanted book:

            if {34} is not true:

                set slot 25, 24, 23 and 14 of current inventory of player to green stained glass pane named " "

                play sound "entity.experience_orb.pickup" with volume 0.5 to the player

                set {34} to true

                set {E34} to slot 34 of current inventory of player    

        else:

            set {34} to false

            delete {E34}

            set slot 25, 24, 23 and 14 of current inventory of player to white stained glass pane named " "

            set slot 13 of current inventory of player to red stained glass pane named " "


#슬롯28과 슬롯34의 아이템이 같은지 확인

        if {E28} = {E34}:

            set slot 13 of current inventory of player to anvil named "&r&l&5합치기"


#인벤 닫았을 때 아이템 보호

on inventory close:

    if event-inventory's display name contains "[모루]":


        if slot 13 of current inventory of player is not red stained glass pane named " ":

            if slot 13 of current inventory of player is not anvil named "&r&l&5합치기":

                if player has enough space for slot 13 of current inventory of player:

                    give slot 13 of current inventory of player to player

                    play sound "entity.item.pickup" with volume 0.5 to the player

                else:

                    drop slot 13 of current inventory of player at player


        if slot 28 of current inventory of player is not air:

            if player has enough space for slot 28 of current inventory of player:

                give slot 28 of current inventory of player to player

                play sound "entity.item.pickup" with volume 0.5 to the player

            else:

                drop slot 28 of current inventory of player at player


        if slot 34 of current inventory of player is not air:

            if player has enough space for slot 34 of current inventory of player:

                give slot 34 of current inventory of player to player

                play sound "entity.item.pickup" with volume 0.5 to the player

            else:

                drop slot 34 of current inventory of player at player

Warning
댓글이 없습니다.

새로운 댓글을 등록해 주세요!

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