이해도 | 초보자 |
---|---|
게임버전 (JE) | 1.20, 1.20.1 |
게임버전 (BE) | 1.20.x |
스크립트 버전 | 2.7.0 beta3 |
아는 지인에게 받은 건데 스크립트가 작동하지 않아요
도와주실 수 있나요,,,
options:
j : &7[ &5출석체크 &7]
e : &c[ &fERROR &c]
function check(p: player, page: int):
set {_inv} to chest with 6 row named "{@j} 출석체크 %출석체크.%{_p}%}% 일차"
set {_num} to ({_page}*45)-45
set {_slot} to 1
loop 45 times:
if {출석체크.%{_p}%} is not {_slot}+{_num}:
set slot {_slot}-1 of {_inv} to book named "&7{_slot}+{_num}% 일차 보상" with lore "&eㄴ 우클릭시 보상을 확인하실 수 있습니다." and "&eㄴ 좌클릭시 보상을 받을 수 있습니다."
else:
set slot {_slot}-1 of {_inv} to book of protection 10 with no nbt named "&7%{_slot}+{_num}% 일차 보상" with lore "&eㄴ 우클릭시 보상을 확인하실 수 있습니다." and "&eㄴ 좌클릭시 보상을 받을 수 있습니다."
add 1 to {_slot}
set slot 45 of {_inv} to arrow named "&f&l%{_page} - 1%"
set slot 49 of {_inv} to arrow named "&f&l%{_page}%"
set slot 53 of {_inv} to arrow named "&f&l%{_page} + 1%"
open {_inv} to {_p}
function checks(p: player, name: int):
set {_inv} to chest with 3 rows named "%{_name}% 일차 보상 편집"
set {_slot} to 1
loop 27 times:
set slot {_slot}-1 of {_inv} to {item.%{_name}%::%{_slot}%}
add 1 to {_slot}
open {_inv} to {_p}
function checkss(p: player, name: int):
set {_inv} to chest with 3 rows named "%{_name}% 일차 보상 확인"
set {_slot} to 1
loop 27 times:
set slot {_slot}-1 of {_inv} to {item.%{_name}%::%{_slot}%}
add 1 to {_slot}
open {_inv} to {_p}
command /출석체크:
trigger:
check(player, 1)
on inventory click:
if player's current inventory's name contains "&7[ &b출석체크 &7]":
cancel event
if player is op:
if clicked slot < 45:
if clicked type is left mouse button:
set {_name} to uncolored name of clicked item
replace all " " and "일차" and "보상" with "" in {_name}
set {_name} to {_name} parsed as integer
checks(player, {_name})
if clicked type is right mouse button:
set {_name} to uncolored name of clicked item
replace all " " and "일차" and "보상" with "" in {_name}
set {_name} to {_name} parsed as integer
if {출석체크.%player%} is {_name}:
if {check.list %{_name}%::*} contains player:
send "{@e} 이미 %{출석체크.%player%}%일차 보상을 받으셨습니다."
else:
give {item.%{_name}%::*} to player
add player to {check.list.%{_name}%::*}
else:
send "{@e} 자신의 일차에 맞는 보상을 클릭해주세요."
else:
if clicked slot > 45:
if clicked type is left mouse button:
set {_name} to uncolored name of clicked item
replace all " " and "일차" and "보상" with "" in {_name}
set {_name} to {_name} parsed as integer
checkss(player, {_name})
if clicked type is right mouse button:
set {_name} to uncolored name of clicked item
replace all " " and "일차" and "보상" with "" in {_name}
set {_name} to {_name} parsed as integer
if {출석체크.%player%} is {_name}:
if {check.list.%{_name}%::*} contains player:
send "{@e} 이미 %{출석체크.%player%}%일차 보상을 받으셨습니다."
else:
give {item.%{_name}%::*} to player
add player to {check.list.%{_name}%::*}
else:
send "{@e} 자신의 일차에 맞는 보상을 클릭해주세요."
if clicked raw slot is 45 or 53:
set {_inv} to uncolored name of event-item
set {_inv} to {_inv} parsed as number
if {_inv} > 0:
check(player, {_inv})
if player's current inventory's name contains "확인":
cancel event
on inventory close:
if player's current inventory's name contains "편집":
if player is op:
set {_name} to uncolored name of player's current inventory
replace all " " and "편집" and "일차" and "보상" with "" in {_name}
set {_name} to {_name} parsed as integer
set {_slot} to 0
loop 27 times:
add slot {_slot} of player's current inventory to {item.%{_name}%::*}
add 1 to {_slot}
send "{@j} 성공적으로 저장됐습니다."
every 1 minute:
if "%now%" contains "오전 12:00" or "12:00 AM":
loop all offlineplayers:
add 1 to {출석체크.%lopp-offlineplayers%}
broadcast "{@j} &f출석체크가 초기화되었습니다"
on first join:
set {출석체크.%event-player%} to 1
on join:
if {출석체크.%event-player%} is not set:
set {출석체크.%event-player%} to 1
환타비
2024.07.17?
이렇게 작성 하시면 도와드릴 수 있는 사람도 도와드릴 수 없어용
적어도 무엇이 어떻게 안되는지 인게임에서 어디부분이 에러가 나는지 알려주셔야 도움을 드릴수 있어용