개인 자료란 (JE)

  서버 커뮤니티

Profile akdakd 대표칭호 없음
Profile

질문하기 스크립트

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

2021.12.09 조회 수 95 추천 수 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/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