이해도 | 초보자(스크립트 구성요소나 기본문법은 알아요) |
---|---|
게임버전 (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}:
@노란색으로 적은건 오류난 라인!
qsef1256
2022.08.16every second 밑에 loop all players: 넣으세요
3boatSk
2022.08.16loop all players 만 넣으면 되나요?
qsef1256
2022.08.17비추 하는 방식이긴 한데, Glowstone님이 코드를 그렇게 만들어두셨어요, 어쩔 수 없어요.
xAQu
2022.08.20스크립트를 조금 더 공부 해보시는게 어떠신가요 ?