개인 자료란 (JE)

  서버 커뮤니티

Profile 빈수빈수 대표칭호 없음
Profile

질문하기 스크립트

리젠광산 스크립트 도와주세요 ㅠ

2024.06.13 조회 수 90 추천 수 0
이해도 입문자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 
스크립트 버전 2.8.5 

리젠광산 스크립트를 만들었는데 지정 위치가 아닌 곳에서도 돌을 캐면 리젠이 되어버려요 ㅠ

어디가 잘못된건가요??


on right click with bone:

    if player is op:

        if event-block is stone or coal ore or diamond ore or iron ore or emerald ore:

            if {mine::%location of event-block%} is set:

                delete {mine::%location of event-block%}

                message "광산 지정위치가 삭제되었습니다." to player

                play sound "UI_BUTTON_CLICK" with volume 0.5 to the player

            else:

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

                message "광산 위치가 추가되었습니다." to player

                set {mine::%location of event-block%} to 1

        

        

on break:

    if event-block is stone:

        clear drops

        set {_ran} to random integer between 1 and 1000

        if {_ran} is between 0 and 100:

            set event-block to hay block

        if {_ran} is between 101 and 400:

            set event-block to cobblestone

        if {_ran} is between 401 and 650:

            set event-block to copper ore

        if {_ran} is between 651 and 850:

            set event-block to coal ore

        if {_ran} is between 851 and 950:

            set event-block to iron ore

        if {_ran} is between 951 and 997:

            set event-block to gold ore

        if {_ran} is between 998 and 1000:

            set event-block to diamond ore

    if event-block is hay block:

        clear drops

        set event-block to bedrock

        give 1 bread to player

        wait 4 seconds

        set event-block to stone

    if event-block is cobblestone:

        clear drops

        set event-block to bedrock

        give 1 of stone to player

        wait 4 seconds

        set event-block to stone

    if event-block is coal ore:

        clear drops

        set event-block to bedrock

        give 1 of coal to player

        wait 4 seconds

        set event-block to stone

    if event-block is copper ore:

        clear drops

        set event-block to bedrock

        give 1 of copper ingot to player

        wait 4 seconds

        set event-block to stone

    if event-block is iron ore:

        clear drops

        set event-block to bedrock

        give 1 of iron ingot and experience bottle to player

        wait 4 seconds

        set event-block to stone

    if event-block is gold ore:

        clear drops

        set event-block to bedrock

        give 1 of gold ingot and experience bottle to player

        wait 4 seconds

        set event-block to stone

    if event-block is diamond ore:

        clear drops

        set event-block to bedrock

        give 1 of diamond and experience bottle to player

        wait 4 seconds

        set event-block to stone




1개의 댓글

세찐찐
2024.06.13

블럭을 파괴했을때 그 위치에 대한 mine변수가 1인지 확인하는 코드가 없네요

뉴스 및 창작물
/files/thumbnails/761/908/003/262x150.crop.jpg?20241025153749

건축

서울 숭례문(崇禮門) 5

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