개인 자료란 (JE)

  서버 커뮤니티

Profile Pm08 대표칭호 없음

Pm08 ec106005f66e4c80b43626ba1b97e145

Profile

질문하기 스크립트

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

2023.05.20 조회 수 129 추천 수 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/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