aliases:
aktif = 351:10
deaktif = 351:8
options:
ODUL: 8 diamond named "&a&lMCTR | &eHediyesi."
ODUL2: 10 gold_ingot named "&a&lMCTR | &eHediyesi."
ODUL3: 10 iron_ingot named "&a&lMCTR | &eHediyesi."
ODUL4: 9 emerald named "&a&lMCTR | &eHediyesi."
Prefix: &a&lMC-TR
Acıklama_Ad: &6Hakkında
Acıklama_Lore: &7Gunluk odul sisdemi yenilendi.||&7Hediyeni almadiysan ne bekliyorusun.||&e&l» &8mc-tr.com
function MCDEYIZ_updateLastData(new: player):
set {mcdeyiz::gö::last::5::name} to {mcdeyiz::gö::last::4::name}
set {mcdeyiz::gö::last::4::name} to {mcdeyiz::gö::last::3::name}
set {mcdeyiz::gö::last::3::name} to {mcdeyiz::gö::last::2::name}
set {mcdeyiz::gö::last::2::name} to {mcdeyiz::gö::last::1::name}
set {mcdeyiz::gö::last::1::name} to {_new}
set {mcdeyiz::gö::last::5::date} to {mcdeyiz::gö::last::4::date}
set {mcdeyiz::gö::last::4::date} to {mcdeyiz::gö::last::3::date}
set {mcdeyiz::gö::last::3::date} to {mcdeyiz::gö::last::2::date}
set {mcdeyiz::gö::last::2::date} to {mcdeyiz::gö::last::1::date}
set {mcdeyiz::gö::last::1::date} to now
function MCDEYIZ_getReward(p: player):
give {@ODUL} to {_p}
give {@ODUL2} to {_p}
give {@ODUL3} to {_p}
give {@ODUL4} to {_p}
set {mcdeyiz::gö::data::%{_p}%} to now
MCDEYIZ_updateLastData({_p})
send "{@Prefix} &7Günlük Ödülünü Aldın Yarın Yeniden Bekleriz." to {_p}
command /gunluködül:
permission: günlük.ödül
trigger:
open virtual chest with size 6 named "&6Günlük Ödül" to player
if {mcdeyiz::gö::data::%player%} is set:
set {_time} to difference between {mcdeyiz::gö::data::%player%} and now
if {_time} > 24 hours:
set {_open} to true
else:
set {_open} to true
set {_slot} to 0
if {_open} is true:
loop 54 times:
format gui slot {_slot} of player with green stained glass pane named " " to nothing
add 1 to {_slot}
wait 1 tick
format gui slot 31 of player with aktif named "&eÖdülünüz Hazır" to close then run function MCDEYIZ_getReward(player)
format gui slot 22 of player with aktif named "&eÖdülünüz Hazır" to close then run function MCDEYIZ_getReward(player)
else:
loop 54 times:
format gui slot {_slot} of player with red stained glass pane named " " to nothing
add 1 to {_slot}
wait 1 tick
set {_timeFull} to 24 hours
remove {_time} from {_timeFull}
set {_time} to "%{_timeFull}%"
replace all "day" with "Gün," in {_time}
replace all "hours" with "Saat," in {_time}
replace all "hour" with "Saat," in {_time}
replace all "minutes" with "Dakika," in {_time}
replace all "minute" with "Dakika," in {_time}
replace all "seconds" with "Saniye" in {_time}
replace all "second" with "Saniye" in {_time}
replace all "and " with "" in {_time}
format gui slot 31 of player with deaktif named "&eÖdülünüz Henüz Hazır Değil Beklemelisiniz" with lore "&7Geriye Sadece &e%{_time}% &7Kaldı" to nothing
format gui slot 22 of player with deaktif named "&eÖdülünüz Henüz Hazır Değil Beklemelisiniz" with lore "&7Geriye Sadece &e%{_time}% &7Kaldı" to nothing
set {_status} to ""
loop 5 times:
set {_status} to "%{_status}%&e&l» &b%{mcdeyiz::gö::last::%loop-number%::name}% &8&l| &7&o%{mcdeyiz::gö::last::%loop-number%::date}%||"
format gui slot 49 of player with paper named "&eSon Ödül Alanlar:" with lore "%{_status}%" to nothing
format gui slot 4 of player with book named "{@Acıklama_Ad}" with lore "{@Acıklama_Lore}" to nothing
command /gunlukodulsifirla [<player>]:
permission: sk.admin
trigger:
delete {mcdeyiz::gö::data::%arg-1%}
send "{@Prefix} &7Üyenin bekleme süresi sıfırlandı"
on script load:
if {mcdeyiz::gö::last::1::name} is not set:
set {mcdeyiz::gö::last::1::name} to "-"
set {mcdeyiz::gö::last::2::name} to "-"
set {mcdeyiz::gö::last::3::name} to "-"
set {mcdeyiz::gö::last::4::name} to "-"
set {mcdeyiz::gö::last::5::name} to "-"
set {mcdeyiz::gö::last::1::date} to "-"
set {mcdeyiz::gö::last::2::date} to "-"
set {mcdeyiz::gö::last::3::date} to "-"
set {mcdeyiz::gö::last::4::date} to "-"
set {mcdeyiz::gö::last::5::date} to "-"