Skript1.21Resmi#skript#afk#sunucu
AFK Sistemi
Hareketsiz oyuncuları otomatik AFK yapar, sekme listesinde gösterir, /afk komutu ve isteğe bağlı uzun AFK'da atma (Skript).
Tüm hakları saklıdırSunucuda kullanDeğiştirTicari· Atıf gerekli
scripts/afksistemi.sk
1# AFK Sistemi — MinborAI şablonu (Skript)2options:3prefix: &7[&eAFK&7]&r4# Kaç dakika hareketsiz kalınca AFK sayılır5afk-minutes: 56# Kaç dakika AFK kalınca atılır (0 = atma)7kick-minutes: 3089on join:10set {afk::last::%uuid of player%} to now11delete {afk::state::%uuid of player%}1213on quit:14delete {afk::state::%uuid of player%}15delete {afk::since::%uuid of player%}1617function leaveAfk(p: player):18delete {afk::state::%uuid of {_p}%}19delete {afk::since::%uuid of {_p}%}20set tab list name of {_p} to name of {_p}21broadcast "{@prefix} &f%{_p}% &7artık AFK değil."2223function enterAfk(p: player):24set {afk::state::%uuid of {_p}%} to true25set {afk::since::%uuid of {_p}%} to now26set tab list name of {_p} to "&7[AFK] %name of {_p}%"27broadcast "{@prefix} &f%{_p}% &7AFK oldu."2829on chat:30set {afk::last::%uuid of player%} to now31if {afk::state::%uuid of player%} is true:32leaveAfk(player)3334on move:35set {afk::last::%uuid of player%} to now36if {afk::state::%uuid of player%} is true:37leaveAfk(player)3839every 30 seconds:40loop all players:41set {_id} to uuid of loop-player42if {afk::state::%{_id}%} is not set:43set {_last} to {afk::last::%{_id}%}44if {_last} is set:45if difference between {_last} and now is more than {@afk-minutes} minutes:46enterAfk(loop-player)47else if {@kick-minutes} is more than 0:48loop-player does not have permission "afk.bypass.kick"49difference between {afk::since::%{_id}%} and now is more than {@kick-minutes} minutes50kick loop-player due to "Uzun süre AFK kaldın."5152command /afk:53description: AFK moduna gir ya da çık54permission: afk.use55trigger:56if {afk::state::%uuid of player%} is true:57leaveAfk(player)58else:59enterAfk(player)60