개인 자료란 (JE)

  서버 커뮤니티

Profile akdakd 대표칭호 없음
Profile

질문하기 스크립트

플레이어헤드,랜덤보상스크립트 급해요 ㅜㅜ

2021.12.09 조회 수 62 추천 수 0
이해도 초보자(스크립트 구성요소나 기본문법은 알아요) 
게임버전 (JE) 1.17.1 
게임버전 (BE) 관련없음 
스크립트 버전 version: 2.6-beta3 
스크립트 애드온 Skellett-Legacy-2.0.0.jar,SkQuery-4.1.5.jar,skRayFall+v1.9.26.jar,skUtilities.v0.9.2.jar 

on right click:

    if name of player's tool contain "&6&l[선물상자]":

        cancel event

        remove 1 of player's tool from player's tool

        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player

        send "[선물상자를 열었어요.]"

        wait 0.6 seconds

        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player

        wait 0.6 seconds

        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player

        wait 0.6 seconds

        chance of 60%:

            send "[착한 아이는 선물을 받아야지!]"

            set {_int} to random integer between 1 and 100

            if {_int} is between 1 and 9:

                give 1 of {event1.item} to player

            if {_int} is between 10 and 19:

                give 1 of {event2.item} to player

            if {_int} is between 20 and 29:

                give 1 of {event3.item} to player

            if {_int} is between 30 and 39:

                give 1 of {event4.item} to player

            if {_int} is between 40 and 49:

                give 1 of {event5.item} to player

            if {_int} is between 50 and 59:

                give 1 of {event6.item} to player

            if {_int} is between 60 and 69:

                 give 1 of {event7.item} to player

            if {_int} is between 70 and 79:

                give 1 of {event8.item} to player

            if {_int} is between 80 and 89:

                give 1 of {event9.item} to player

            if {_int} is between 90 and 100:

                give 1 of {event10.item} to player

            play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 at player

        else:

            send "[좀 더 착한 일을 하고 오렴]"

--------------------------------------------

command /이벤트 [<text>]:

    trigger:

        else if arg 1 is "1":

            player is op

            set {event1.item} to player's tool

        else if arg 1 is "2":

            player is op

            set {event2.item} to player's tool

        else if arg 1 is "3":

            player is op

            set {event3.item} to player's tool

        else if arg 1 is "4":

            player is op

            set {event4.item} to player's tool

        else if arg 1 is "5":

            player is op

            set {event5.item} to player's tool

        else if arg 1 is "6":

            player is op

            set {event6.item} to player's tool

        else if arg 1 is "7":

            player is op

            set {event7.item} to player's tool

        else if arg 1 is "8":

            player is op

            set {event8.item} to player's tool

        else if arg 1 is "9":

            player is op

            set {event9.item} to player's tool

        else if arg 1 is "10":

            player is op

            set {event10.item} to player's tool

-----------------------------------------------


on place of  player head:

    if player's world is "event":

        give 1 of emerald to player

        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player

        send "크리스마스 트리를 장식했습니다."

-------------------------------------------


loop는 잘 몰라서 이런식으로 하나하나 아이템 지정했는데,, 상자를 열어도 아이템이 안나오네요 ㅠㅠ 

block 으로 해봐도 안나와요 .(보상아이템은 플레이어헤드입니다.플레이어헤드를 설치하면 에메랄드1개를 받도록 하고싶어요.)

세번째 구문도 적용이 안되네요 ㅠ "minecraft:player_head" 로 해봐도 똑같아요.


더 간단한 방법이 있으면 예시좀 써 주세요 ㅠ




2개의 댓글

qsef1256
2021.12.09

https://skripthub.net/docs/?id=981 


그냥 스티브 머리 얻게 하고 싶으시면 %player's tool% 을 띄우면 손에 들고 있는 아이템 이름이 나옵니다. 그거 그대로 적으시면 되요

qsef1256
2021.12.09
코드 기능은 장식이 아닙니다.
단락 > 코드
on right click:
    if name of player's tool contain "&6&l[선물상자]":
        cancel event
        remove 1 of player's tool from player's tool
        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player
        send "[선물상자를 열었어요.]"
        wait 0.6 seconds
        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player
        wait 0.6 seconds
        play sound "minecraft:block.powder_snow.hit" with volume 1 and pitch 1 at player
        wait 0.6 seconds
        chance of 60%:
            send "[착한 아이는 선물을 받아야지!]"
            set {_int} to random integer between 1 and 100
            if {_int} is between 1 and 9:
                give 1 of {event1.item} to player
            if {_int} is between 10 and 19:
                give 1 of {event2.item} to player
            if {_int} is between 20 and 29:
                give 1 of {event3.item} to player
            if {_int} is between 30 and 39:
                give 1 of {event4.item} to player
            if {_int} is between 40 and 49:
                give 1 of {event5.item} to player
            if {_int} is between 50 and 59:
                give 1 of {event6.item} to player
            if {_int} is between 60 and 69:
                 give 1 of {event7.item} to player
            if {_int} is between 70 and 79:
                give 1 of {event8.item} to player
            if {_int} is between 80 and 89:
                give 1 of {event9.item} to player
            if {_int} is between 90 and 100:
                give 1 of {event10.item} to player
            play sound "ENTITY_PLAYER_LEVELUP" with volume 1 and pitch 1 at player
        else:
            send "[좀 더 착한 일을 하고 오렴]"
뉴스 및 창작물
/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