개인 자료란 (JE)

  서버 커뮤니티

Profile 루커스 대표칭호 없음
Profile

질문하기 스크립트

순간이동 관련 질문

2023.11.16 조회 수 54 추천 수 0
이해도 상급자 
게임버전 (JE) 1.20.1 
게임버전 (BE) 관련없음 

이 스크립트는 두 부분으로 구성되어 있습니다.

  1. 플레이어가 참나무 압력판 위를 걸었을 때:

    • 만약 위에 있는 블록이 커맨드 블록이라면:
      • 만약 커맨드 블록의 명령어가 "a"라면, 플레이어의 8번째 인벤토리 슬롯에 "마크 아이템"이라는 이름의 인챈트된 다이아몬드 칼을 추가하고 "발판이 생성되었습니다!"라는 메시지를 플레이어에게 보냅니다.
      • 만약 커맨드 블록의 명령어가 "b"라면, 플레이어의 인벤토리에서 "마크 아이템"을 1개 제거하고 "발판이 사라졌습니다!"라는 메시지를 플레이어에게 보냅니다. 그리고 참나무 압력판 위의 블록을 공기로 변경합니다.
  2. "마크 아이템"을 우클릭했을 때:

    • 플레이어를 좌표 (0, -58, 0)로 순간이동시키고 "순간이동 완료!"라는 메시지를 플레이어에게 보냅니다.


스크립트에는

on player moves:

    if type of block at player is oak pressure plate:

        set {_blockAbove} to block above player

        if {_blockAbove} is a command block:

            set {_command} to command of {_blockAbove}

            if {_command} is "a":

                add 1 enchanted diamond sword named "&7마크 아이템" to player's inventory slot 8

                send "발판이 생성되었습니다!" to player

            else if {_command} is "b":

                remove 1 enchanted diamond sword named "&7마크 아이템" from player's inventory

                send "발판이 사라졌습니다!" to player

                set {_blockAbove}'s type to air

            else:

                send "이 발판에 대한 명령이 지정되어 있지 않습니다." to player


on right click on enchanted diamond sword named "&7마크 아이템":

    teleport player to location 0, -58, 0

    send "순간이동 완료!" to player

커맨드에는

setblock ~ ~1 ~ command_block{Command:"a"} replace

또다른 커맨드에는 

setblock ~ ~1 ~ command_block{Command:"b"} replace

하지만 계속 오류가 납니다

[01:40:04 INFO]: [Skript] Line 1: (순간이동.sk)

[01:40:04 INFO]:     Can't understand this structure: on player moves

[01:40:04 INFO]:     Line: on player moves:

[01:40:04 INFO]:

[01:40:04 INFO]: [Skript] Line 16: (순간이동.sk)

[01:40:04 INFO]:     Can't understand this structure: on right click on enchanted diamond sword named "&7마크 아이템"

[01:40:04 INFO]:     Line: on right click on enchanted diamond sword named "&7마크 아이템":

혹시 아시는 분은 알려주세요

Warning
댓글이 없습니다.

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

뉴스 및 창작물
/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1

/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0