개인 자료란 (JE)

  서버 커뮤니티

Profile 3boatSk 대표칭호 없음
Profile

질문하기 스크립트

마크 잠수 스크립트를 만드는데 오류가 계속 뜨네요;;?

2022.08.16 조회 수 589 추천 수 0
이해도 초보자(스크립트 구성요소나 기본문법은 알아요) 
게임버전 (JE) 1.19 
게임버전 (BE) 관련없음 
스크립트 버전 2.6.3 


안녕하세요!

제가 만드는 스크립트는 AFK 스크립트입니다!

하이픽셀을 하다가 몇분동안 플레이를 안하면 빨간글씨로 AFK라고 뜨는데 제가 만드는 서버에 만들고 싶어서 만드는데 오류가 계속뜨네요;;

한번 봐주시고 말해주세요!

@파일잠수.sk 


@문장

options:

    afktime: 600 


command /afk:

    trigger:

        if {afk::%player%} is not set:

            set {afk::%player%} to true

            broadcast "&4&lServername>> &c%player% Is Now &4&lAFK"

            send title "&4&LYou are AFK!" with subtitle "&cMove in any direction." to player for {@afktime} seconds

            play sound "block.note_block.pling" to player

            set {_loc} to location of player

            while {afk::%player%} is set:

                wait 1 second

                if location of player != {_loc}:

                    delete {afk::%player%}

                    broadcast "&4&lServername>> &c%player% Is No Longer &4&lAFK"

                    send title "&4&LYou are no longer AFK!" to player for 2 seconds

                    play sound "block.note_block.pling" to player


on chat:

    if {afk::%player%} is not set:

        stop

    else if {afk::%player%} is set:

        delete {afk::%player%}

        broadcast "&4&lServerName>> &c%player% Is No Longer &4&lAFK"

        send title "&4&LYou are no longer AFK!" to player for 2 seconds

        play sound "block.note_block.pling" to player

            

on any move:

    if {afk::%player%} is set:

        delete {afk::%player%}

        send title "&4&LYou are no longer AFK!" to player for 2 seconds

        play sound "block.note_block.pling" to player

        

every second:

    set {_loc} to location of player

   if location of player != {_loc}:

        set {afktime::%player%} to 0

        delete {afk::%player%}

        broadcast "&4&lServername>> &c%player% Is No Longer &4&lAFK"

        send title "&4&LYou are no longer AFK!" to player for 2 seconds

        play sound "block.note_block.pling" to player

    if location of player = {_loc}:

        add 1 to {afktime::%player%}

    if {afktime::%player%} = {@afktime}:

        set {afk::%player%} to true

        broadcast "&4&lServername>> &c%player% Is Now &4&lAFK"

        send title "&4&LYou are AFK!" with subtitle "&cMove in any direction." to player for {@afktime} seconds

        play sound "block.note_block.pling" to player

        delete {afktime::%player%}


이게 10분동안 움직이지 않으면 AFK가 되는 건데 


 [Skript] Line 37: (잠수.sk)

There's no player in a periodical event

Line: set {_loc} to location of player


 [Skript] Line 38: (잠수.sk)

There's no player in a periodical event

  Line: if location of player != {_loc}:


[Skript] Line 44: (잠수.sk)

There's no player in a periodical event

 Line: if location of player = {_loc}:


[Skript] Line 46: (잠수.sk)

There's no player in a periodical event

Line: if {afktime::%player%} = {@afktime}:


@노란색으로 적은건 오류난 라인!








4개의 댓글

qsef1256
2022.08.16

every second 밑에 loop all players: 넣으세요

3boatSk
2022.08.16
@qsef1256

loop all players 만 넣으면 되나요?

 

qsef1256
2022.08.17
@3boatSk

비추 하는 방식이긴 한데, Glowstone님이 코드를 그렇게 만들어두셨어요, 어쩔 수 없어요.

xAQu
2022.08.20

스크립트를 조금 더 공부 해보시는게 어떠신가요 ?

뉴스 및 창작물
/files/thumbnails/483/916/003/262x150.crop.jpg?20241127115329

레드스톤

[노트블럭 커버] 뉴진스 - ETA 2

노트블럭전문가

2024-11-27

0

/files/thumbnails/150/925/003/262x150.crop.jpg?20241123005717

건축

응답하라 1988 ?

팀뉴일리시

2024-11-23

4

/files/thumbnails/761/908/003/262x150.crop.jpg?20241025153749

건축

서울 숭례문(崇禮門) 6

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