개인 자료란 (JE)

  서버 커뮤니티

Profile akdakd 대표칭호 없음
Profile

질문하기 스크립트

랜덤보상 스크립트

2021.12.06 조회 수 142 추천 수 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개의 댓글

거너아나
2021.12.06

give 1 of {event4.item} to player를 give {event4.item} to player로 고쳐보시겠어요?

akdakd
2021.12.06
@거너아나

똑같아요 ㅜ 아마 이미 그렇게 했엇는데 이것저것 해보다가 저렇게 되어있는것 같네요