Çözüldü Günlük ödül süre sistemi!

  • Konuyu Başlatan Konuyu Başlatan xVeryz
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 528
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

xVeryz

Yay Yok, İskelet Yok
Katılım
6 Haziran 2021
Mesajlar
290
Elmaslar
42
Puan
9.170
Minecraft
Rotxeein

Discord:

rotxeein0

Aşağıda yer alan günlük ödül skriptine süre sistemi eklenmesi gerekiyor oyuncu günlük ödülünü aldığında bir sonraki ödüle ne kadar süre kaldığını görmeli yani.
Şimdiden herkese çok teşekkür ederim!

Örnek oyuniçi görüntü:
1752773922203.webp

Kod:
options:
    prefix: <##E1FFAF>&l** &8•

on join:
    set {_uuid} to player's uuid
    set {_lastLogin} to {gunlukodul.son.%{_uuid}%}
    if {_lastLogin} is set:
        set {_gecenZaman} to difference between now and {_lastLogin}
        if {_gecenZaman} >= 2 days:
            loop 7 times:
                delete {gun%loop-number%.%{_uuid}%}
                delete {gun%loop-number%alindi.%{_uuid}%}
            set {gun1.%{_uuid}%} to true
            set {gunlukodul.son.%{_uuid}%} to now
            gunlukodul(player)
        else if {_gecenZaman} >= 1 day:
            loop 7 times:
                if {gun%loop-number%.%{_uuid}%} is not set:
                    set {gun%loop-number%.%{_uuid}%} to true
                    set {gunlukodul.son.%{_uuid}%} to now
                    gunlukodul(player)
                    stop
    else:
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1
    while {_day} <= 7:
        if {gun%{_day}%.%{_p}'s uuid%} is set:
            if {gun%{_day}%alindi.%{_p}'s uuid%} is not set:
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: &c "
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player)
                    else:
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                else:
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
            add 1 to {_day}
            add 1 to {_slot}
 
Çalışıyormu Denemedim


Kod:
options:
    prefix: <##E1FFAF>&l** &8•

on join:
    set {_uuid} to player's uuid
    set {_lastLogin} to {gunlukodul.son.%{_uuid}%}
    if {_lastLogin} is set:
        set {_gecenZaman} to difference between now and {_lastLogin}
        if {_gecenZaman} >= 2 days:
            loop 7 times:
                delete {gun%loop-number%.%{_uuid}%}
                delete {gun%loop-number%alindi.%{_uuid}%}
            set {gun1.%{_uuid}%} to true
            set {gunlukodul.son.%{_uuid}%} to now
            gunlukodul(player)
        else if {_gecenZaman} >= 1 day:
            loop 7 times:
                if {gun%loop-number%.%{_uuid}%} is not set:
                    set {gun%loop-number%.%{_uuid}%} to true
                    set {gunlukodul.son.%{_uuid}%} to now
                    gunlukodul(player)
                    stop
    else:
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1
    while {_day} <= 7:
        if {gun%{_day}%.%{_p}'s uuid%} is set:
            if {gun%{_day}%alindi.%{_p}'s uuid%} is not set:
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            # Süre hesaplama
            set {_lastReward} to {gunlukodul.son.%{_p}'s uuid%}
            if {_lastReward} is set:
                set {_gecenZaman} to difference between now and {_lastReward}
                set {_kalanZaman} to 1 day - {_gecenZaman}
                if {_kalanZaman} > 0:
                    set {_saatler} to floor({_kalanZaman} / 1 hour)
                    set {_dakikalar} to floor(({_kalanZaman} mod 1 hour) / 1 minute)
                    set {_saniyeler} to floor(({_kalanZaman} mod 1 minute) / 1 second)
                    
                    if {_saatler} > 0:
                        set {_sureMetni} to "&c%{_saatler}%s %{_dakikalar}%d %{_saniyeler}%sn"
                    else if {_dakikalar} > 0:
                        set {_sureMetni} to "&c%{_dakikalar}%d %{_saniyeler}%sn"
                    else:
                        set {_sureMetni} to "&c%{_saniyeler}%sn"
                else:
                    set {_sureMetni} to "&aʜᴀᴢɪʀ!"
            else:
                set {_sureMetni} to "&aʜᴀᴢɪʀ!"
            
            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: %{_sureMetni}%"
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player)
                    else:
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                        send "{@prefix} &7Bu ödülü zaten aldın!" to player
                else:
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
                    # Süre bilgisi göster
                    set {_lastReward} to {gunlukodul.son.%player's uuid%}
                    if {_lastReward} is set:
                        set {_gecenZaman} to difference between now and {_lastReward}
                        set {_kalanZaman} to 1 day - {_gecenZaman}
                        if {_kalanZaman} > 0:
                            set {_saatler} to floor({_kalanZaman} / 1 hour)
                            set {_dakikalar} to floor(({_kalanZaman} mod 1 hour) / 1 minute)
                            set {_saniyeler} to floor(({_kalanZaman} mod 1 minute) / 1 second)
                            
                            if {_saatler} > 0:
                                set {_sureMetni} to "%{_saatler}% saat %{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else if {_dakikalar} > 0:
                                set {_sureMetni} to "%{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else:
                                set {_sureMetni} to "%{_saniyeler}% saniye"
                            
                            send "{@prefix} &7Bir sonraki ödüle &c%{_sureMetni}% &7kaldı!" to player
                        else:
                            send "{@prefix} &7Bir sonraki ödül hazır!" to player
                    else:
                        send "{@prefix} &7Bir sonraki ödül hazır!" to player
            add 1 to {_day}
            add 1 to {_slot}

# Süre güncellemesi için her 30 saniyede bir çalışan sistem
every 30 seconds:
    loop all players:
        set {_uuid} to loop-player's uuid
        if metadata tag "gunlukodul" of loop-player is set:
            gunlukodul(loop-player)
 
Kod:
options:
    prefix: <##E1FFAF>&l** &8•
    # Günlük ödül alınabilmesi için geçmesi gereken süre.
    # Örnekler: 24 hours, 1 day, 1 day and 12 hours
    daily_reward_interval: 24 hours

on join:
    set {_uuid} to player's uuid
    set {_lastTaken} to {gunlukodul.son.%{_uuid}%} # Son ödül alma zamanı

    # Eğer son ödül alma zamanı ayarlıysa
    if {_lastTaken} is set:
        set {_timeSinceLastTaken} to difference between now and {_lastTaken}

        # Eğer son ödül alınmasının üzerinden 'daily_reward_interval' süresinden fazla zaman geçtiyse
        # ve oyuncu zaten ödülünü almadıysa (örneğin, zamanı gelmiş ama almamış)
        # Buradaki mantık, oyuncunun yeni bir döngüye geçişini sağlamak içindir.
        if {_timeSinceLastTaken} >= {@daily_reward_interval}:
            # Eğer son ödül alındıysa ve yeni bir güne geçildiyse, tüm ödülleri sıfırla
            # Bu kısım, oyuncu seriyi bozduğunda veya uzun süre girmediğinde tüm ödülleri sıfırlar.
            # Örneğin, 2 gün üst üste girmediyse seri sıfırlanır.
            # Şu anki mantıkta 24 saatten fazla girmediyse otomatik olarak bir sonraki ödülü alabilir.
            # Eğer seriyi kırmak istiyorsak, farklı bir mantık gerekebilir (örneğin {gunlukodul.son.%{_uuid}%} değişkenini silebiliriz).
            # Mevcut Skript'inizdeki "2 days" mantığına göre düzenledim.
            if {_timeSinceLastTaken} >= 2 days: # Seriyi kırmak için 2 gün bekleme süresi
                loop 7 times:
                    delete {gun%loop-number%.%{_uuid}%}
                    delete {gun%loop-number%alindi.%{_uuid}%}
                # İlk ödülü almaya hazır hale getir
                set {gun1.%{_uuid}%} to true
                send "{@prefix} &aGünlük ödül serin sıfırlandı. Yeni bir seriye başlayabilirsin!"
            # else if {_timeSinceLastTaken} >= 1 day: # Eğer 1 gün geçtiyse ve hala ödülü almadıysa, yeni ödül bekliyor demektir.
            #    # Bu kısım aslında alttaki 'gunlukodul' fonksiyonu çağrısı ile yönetiliyor, burada özel bir işlem yapmaya gerek yok.
            #    # oyuncu envanteri açtığında ödülü almaya hazır görecektir.

    else: # İlk defa giriş yapan oyuncu için
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now # İlk kez ödül alınmaya hazırlandığı zamanı kaydet

# Günlük ödül menüsünü açan komut (örneğin /gunlukodul)
command /gunlukodul:
    trigger:
        gunlukodul(player)

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1

    set {_lastTakenTime} to {gunlukodul.son.%uuid of {_p}%}

    while {_day} <= 7:
        if {gun%{_day}%.%uuid of {_p}%} is set:
            if {gun%{_day}%alindi.%uuid of {_p}%} is not set:
                # Ödül alınabilir durumda
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟıᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                # Ödül zaten alınmış durumda
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟıᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            # Ödül kilitli
            set {_remainingTime} to 0 seconds # Varsayılan olarak 0 saniye
            if {_lastTakenTime} is set:
                # Kalan süreyi hesapla
                set {_nextAvailableTime} to {_lastTakenTime} + {@daily_reward_interval}
                if now < {_nextAvailableTime}:
                    set {_remainingTime} to difference between {_nextAvailableTime} and now

            set {_timeString} to ""
            if {_remainingTime} is not 0 seconds:
                set {_hours} to floor({_remainingTime} / 1 hour)
                set {_remainingTime} to {_remainingTime} - {_hours} hours
                set {_minutes} to floor({_remainingTime} / 1 minute)
                set {_remainingTime} to {_remainingTime} - {_minutes} minutes
                set {_seconds} to floor({_remainingTime})

                if {_hours} > 0:
                    set {_timeString} to "%{_timeString}%%{_hours}%s %hours%"
                if {_minutes} > 0:
                    set {_timeString} to "%{_timeString}%%{_minutes}%d %minutes%"
                if {_seconds} > 0:
                    set {_timeString} to "%{_timeString}%%{_seconds}%s %seconds%"
                if {_timeString} is "":
                    set {_timeString} to "&aŞimdi alınabilir!" # Tamamen alınabilir olduğunda
            else:
                set {_timeString} to "&aŞimdi alınabilir!" # Zaman dolduysa veya ilk günse

            if {_timeString} is "":
                 set {_timeString} to "&cHesaplanamıyor" # Beklenmedik bir durum için

            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟıᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: &c%{_timeString}%"
        
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
            stop # İşlemi durdur

        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                # Eğer ödül alınabilir durumdaysa (kilitli değilse ve daha önce alınmadıysa)
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        # Ödül alındığında son alınma zamanını güncelle
                        set {gunlukodul.son.%player's uuid%} to now
                        send "{@prefix} &aGünlük ödül #%{_day}% başarıyla alındı!" to player
                        # Ödül dağıtımı burada yapılabilir (Örnek: give player 1 diamond)
                        # Örnek: if {_day} is 1: give player 1 diamond
                        # Örnek: if {_day} is 2: give player 5 gold ingot
                        # Örnek: if {_day} is 7: execute console command "eco give %player% 1000"
                        
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player) # Menüyü yenile
                    else:
                        send "{@prefix} &cBu ödülü zaten aldın!" to player
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                else:
                    # Kilitli ödül
                    send "{@prefix} &cBu ödül şu an kilitli!" to player
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
            add 1 to {_day}
            add 1 to {_slot}



Dener misiniz?
 
Kod:
options:
    prefix: <##E1FFAF>&l** &8•
    # Günlük ödül alınabilmesi için geçmesi gereken süre.
    # Örnekler: 24 hours, 1 day, 1 day and 12 hours
    daily_reward_interval: 24 hours

on join:
    set {_uuid} to player's uuid
    set {_lastTaken} to {gunlukodul.son.%{_uuid}%} # Son ödül alma zamanı

    # Eğer son ödül alma zamanı ayarlıysa
    if {_lastTaken} is set:
        set {_timeSinceLastTaken} to difference between now and {_lastTaken}

        # Eğer son ödül alınmasının üzerinden 'daily_reward_interval' süresinden fazla zaman geçtiyse
        # ve oyuncu zaten ödülünü almadıysa (örneğin, zamanı gelmiş ama almamış)
        # Buradaki mantık, oyuncunun yeni bir döngüye geçişini sağlamak içindir.
        if {_timeSinceLastTaken} >= {@daily_reward_interval}:
            # Eğer son ödül alındıysa ve yeni bir güne geçildiyse, tüm ödülleri sıfırla
            # Bu kısım, oyuncu seriyi bozduğunda veya uzun süre girmediğinde tüm ödülleri sıfırlar.
            # Örneğin, 2 gün üst üste girmediyse seri sıfırlanır.
            # Şu anki mantıkta 24 saatten fazla girmediyse otomatik olarak bir sonraki ödülü alabilir.
            # Eğer seriyi kırmak istiyorsak, farklı bir mantık gerekebilir (örneğin {gunlukodul.son.%{_uuid}%} değişkenini silebiliriz).
            # Mevcut Skript'inizdeki "2 days" mantığına göre düzenledim.
            if {_timeSinceLastTaken} >= 2 days: # Seriyi kırmak için 2 gün bekleme süresi
                loop 7 times:
                    delete {gun%loop-number%.%{_uuid}%}
                    delete {gun%loop-number%alindi.%{_uuid}%}
                # İlk ödülü almaya hazır hale getir
                set {gun1.%{_uuid}%} to true
                send "{@prefix} &aGünlük ödül serin sıfırlandı. Yeni bir seriye başlayabilirsin!"
            # else if {_timeSinceLastTaken} >= 1 day: # Eğer 1 gün geçtiyse ve hala ödülü almadıysa, yeni ödül bekliyor demektir.
            #    # Bu kısım aslında alttaki 'gunlukodul' fonksiyonu çağrısı ile yönetiliyor, burada özel bir işlem yapmaya gerek yok.
            #    # oyuncu envanteri açtığında ödülü almaya hazır görecektir.

    else: # İlk defa giriş yapan oyuncu için
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now # İlk kez ödül alınmaya hazırlandığı zamanı kaydet

# Günlük ödül menüsünü açan komut (örneğin /gunlukodul)
command /gunlukodul:
    trigger:
        gunlukodul(player)

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1

    set {_lastTakenTime} to {gunlukodul.son.%uuid of {_p}%}

    while {_day} <= 7:
        if {gun%{_day}%.%uuid of {_p}%} is set:
            if {gun%{_day}%alindi.%uuid of {_p}%} is not set:
                # Ödül alınabilir durumda
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟıᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                # Ödül zaten alınmış durumda
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟıᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            # Ödül kilitli
            set {_remainingTime} to 0 seconds # Varsayılan olarak 0 saniye
            if {_lastTakenTime} is set:
                # Kalan süreyi hesapla
                set {_nextAvailableTime} to {_lastTakenTime} + {@daily_reward_interval}
                if now < {_nextAvailableTime}:
                    set {_remainingTime} to difference between {_nextAvailableTime} and now

            set {_timeString} to ""
            if {_remainingTime} is not 0 seconds:
                set {_hours} to floor({_remainingTime} / 1 hour)
                set {_remainingTime} to {_remainingTime} - {_hours} hours
                set {_minutes} to floor({_remainingTime} / 1 minute)
                set {_remainingTime} to {_remainingTime} - {_minutes} minutes
                set {_seconds} to floor({_remainingTime})

                if {_hours} > 0:
                    set {_timeString} to "%{_timeString}%%{_hours}%s %hours%"
                if {_minutes} > 0:
                    set {_timeString} to "%{_timeString}%%{_minutes}%d %minutes%"
                if {_seconds} > 0:
                    set {_timeString} to "%{_timeString}%%{_seconds}%s %seconds%"
                if {_timeString} is "":
                    set {_timeString} to "&aŞimdi alınabilir!" # Tamamen alınabilir olduğunda
            else:
                set {_timeString} to "&aŞimdi alınabilir!" # Zaman dolduysa veya ilk günse

            if {_timeString} is "":
                 set {_timeString} to "&cHesaplanamıyor" # Beklenmedik bir durum için

            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟıᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: &c%{_timeString}%"
       
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
            stop # İşlemi durdur

        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                # Eğer ödül alınabilir durumdaysa (kilitli değilse ve daha önce alınmadıysa)
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        # Ödül alındığında son alınma zamanını güncelle
                        set {gunlukodul.son.%player's uuid%} to now
                        send "{@prefix} &aGünlük ödül #%{_day}% başarıyla alındı!" to player
                        # Ödül dağıtımı burada yapılabilir (Örnek: give player 1 diamond)
                        # Örnek: if {_day} is 1: give player 1 diamond
                        # Örnek: if {_day} is 2: give player 5 gold ingot
                        # Örnek: if {_day} is 7: execute console command "eco give %player% 1000"
                       
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player) # Menüyü yenile
                    else:
                        send "{@prefix} &cBu ödülü zaten aldın!" to player
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                else:
                    # Kilitli ödül
                    send "{@prefix} &cBu ödül şu an kilitli!" to player
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
            add 1 to {_day}
            add 1 to {_slot}



Dener misiniz?
Kusura bakmayın, geç cevap verdim. Ancak skript hata verdi:

1752861688663.webp
 
Çalışıyormu Denemedim


Kod:
options:
    prefix: <##E1FFAF>&l** &8•

on join:
    set {_uuid} to player's uuid
    set {_lastLogin} to {gunlukodul.son.%{_uuid}%}
    if {_lastLogin} is set:
        set {_gecenZaman} to difference between now and {_lastLogin}
        if {_gecenZaman} >= 2 days:
            loop 7 times:
                delete {gun%loop-number%.%{_uuid}%}
                delete {gun%loop-number%alindi.%{_uuid}%}
            set {gun1.%{_uuid}%} to true
            set {gunlukodul.son.%{_uuid}%} to now
            gunlukodul(player)
        else if {_gecenZaman} >= 1 day:
            loop 7 times:
                if {gun%loop-number%.%{_uuid}%} is not set:
                    set {gun%loop-number%.%{_uuid}%} to true
                    set {gunlukodul.son.%{_uuid}%} to now
                    gunlukodul(player)
                    stop
    else:
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1
    while {_day} <= 7:
        if {gun%{_day}%.%{_p}'s uuid%} is set:
            if {gun%{_day}%alindi.%{_p}'s uuid%} is not set:
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            # Süre hesaplama
            set {_lastReward} to {gunlukodul.son.%{_p}'s uuid%}
            if {_lastReward} is set:
                set {_gecenZaman} to difference between now and {_lastReward}
                set {_kalanZaman} to 1 day - {_gecenZaman}
                if {_kalanZaman} > 0:
                    set {_saatler} to floor({_kalanZaman} / 1 hour)
                    set {_dakikalar} to floor(({_kalanZaman} mod 1 hour) / 1 minute)
                    set {_saniyeler} to floor(({_kalanZaman} mod 1 minute) / 1 second)
                   
                    if {_saatler} > 0:
                        set {_sureMetni} to "&c%{_saatler}%s %{_dakikalar}%d %{_saniyeler}%sn"
                    else if {_dakikalar} > 0:
                        set {_sureMetni} to "&c%{_dakikalar}%d %{_saniyeler}%sn"
                    else:
                        set {_sureMetni} to "&c%{_saniyeler}%sn"
                else:
                    set {_sureMetni} to "&aʜᴀᴢɪʀ!"
            else:
                set {_sureMetni} to "&aʜᴀᴢɪʀ!"
           
            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: %{_sureMetni}%"
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player)
                    else:
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                        send "{@prefix} &7Bu ödülü zaten aldın!" to player
                else:
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
                    # Süre bilgisi göster
                    set {_lastReward} to {gunlukodul.son.%player's uuid%}
                    if {_lastReward} is set:
                        set {_gecenZaman} to difference between now and {_lastReward}
                        set {_kalanZaman} to 1 day - {_gecenZaman}
                        if {_kalanZaman} > 0:
                            set {_saatler} to floor({_kalanZaman} / 1 hour)
                            set {_dakikalar} to floor(({_kalanZaman} mod 1 hour) / 1 minute)
                            set {_saniyeler} to floor(({_kalanZaman} mod 1 minute) / 1 second)
                           
                            if {_saatler} > 0:
                                set {_sureMetni} to "%{_saatler}% saat %{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else if {_dakikalar} > 0:
                                set {_sureMetni} to "%{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else:
                                set {_sureMetni} to "%{_saniyeler}% saniye"
                           
                            send "{@prefix} &7Bir sonraki ödüle &c%{_sureMetni}% &7kaldı!" to player
                        else:
                            send "{@prefix} &7Bir sonraki ödül hazır!" to player
                    else:
                        send "{@prefix} &7Bir sonraki ödül hazır!" to player
            add 1 to {_day}
            add 1 to {_slot}

# Süre güncellemesi için her 30 saniyede bir çalışan sistem
every 30 seconds:
    loop all players:
        set {_uuid} to loop-player's uuid
        if metadata tag "gunlukodul" of loop-player is set:
            gunlukodul(loop-player)
Kusura bakmayın, geç cevap verdim. Ancak skript hata verdi:

1752862018757.webp
 
Kusura bakmayın, geç cevap verdim. Ancak skript hata verdi:

Ekli dosyayı görüntüle 268752
Bunuda denermisiniz test edicek vaktim olmuyor kusura bakmayın


Kod:
options:
    prefix: <##E1FFAF>&l** &8•

on join:
    set {_uuid} to player's uuid
    set {_lastLogin} to {gunlukodul.son.%{_uuid}%}
    if {_lastLogin} is set:
        set {_gecenZaman} to difference between now and {_lastLogin}
        if {_gecenZaman} >= 2 days:
            loop 7 times:
                delete {gun%loop-number%.%{_uuid}%}
                delete {gun%loop-number%alindi.%{_uuid}%}
            set {gun1.%{_uuid}%} to true
            set {gunlukodul.son.%{_uuid}%} to now
            gunlukodul(player)
        else if {_gecenZaman} >= 1 day:
            loop 7 times:
                if {gun%loop-number%.%{_uuid}%} is not set:
                    set {gun%loop-number%.%{_uuid}%} to true
                    set {gunlukodul.son.%{_uuid}%} to now
                    gunlukodul(player)
                    stop
    else:
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1
    while {_day} <= 7:
        if {gun%{_day}%.%{_p}'s uuid%} is set:
            if {gun%{_day}%alindi.%{_p}'s uuid%} is not set:
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            # Süre hesaplama
            set {_lastReward} to {gunlukodul.son.%{_p}'s uuid%}
            if {_lastReward} is set:
                set {_gecenZaman} to difference between now and {_lastReward}
                set {_kalanZaman} to 1 day - {_gecenZaman}
                if {_kalanZaman} > 0:
                    set {_kalanSaniye} to {_kalanZaman} / 1 second
                    set {_saatler} to floor({_kalanSaniye} / 3600)
                    set {_dakikalar} to floor(({_kalanSaniye} mod 3600) / 60)
                    set {_saniyeler} to floor({_kalanSaniye} mod 60)
                    
                    if {_saatler} > 0:
                        set {_sureMetni} to "&c%{_saatler}%s %{_dakikalar}%d %{_saniyeler}%sn"
                    else if {_dakikalar} > 0:
                        set {_sureMetni} to "&c%{_dakikalar}%d %{_saniyeler}%sn"
                    else:
                        set {_sureMetni} to "&c%{_saniyeler}%sn"
                else:
                    set {_sureMetni} to "&aʜᴀᴢɪʀ!"
            else:
                set {_sureMetni} to "&aʜᴀᴢɪʀ!"
            
            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: %{_sureMetni}%"
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player)
                    else:
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                        send "{@prefix} &7Bu ödülü zaten aldın!" to player
                else:
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
                    # Süre bilgisi göster
                    set {_lastReward} to {gunlukodul.son.%player's uuid%}
                    if {_lastReward} is set:
                        set {_gecenZaman} to difference between now and {_lastReward}
                        set {_kalanZaman} to 1 day - {_gecenZaman}
                        if {_kalanZaman} > 0:
                            set {_kalanSaniye} to {_kalanZaman} / 1 second
                            set {_saatler} to floor({_kalanSaniye} / 3600)
                            set {_dakikalar} to floor(({_kalanSaniye} mod 3600) / 60)
                            set {_saniyeler} to floor({_kalanSaniye} mod 60)
                            
                            if {_saatler} > 0:
                                set {_sureMetni} to "%{_saatler}% saat %{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else if {_dakikalar} > 0:
                                set {_sureMetni} to "%{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else:
                                set {_sureMetni} to "%{_saniyeler}% saniye"
                            
                            send "{@prefix} &7Bir sonraki ödüle &c%{_sureMetni}% &7kaldı!" to player
                        else:
                            send "{@prefix} &7Bir sonraki ödül hazır!" to player
                    else:
                        send "{@prefix} &7Bir sonraki ödül hazır!" to player
            add 1 to {_day}
            add 1 to {_slot}

# Süre güncellemesi için her 30 saniyede bir çalışan sistem
every 30 seconds:
    loop all players:
        set {_uuid} to loop-player's uuid
        if metadata tag "gunlukodul" of loop-player is set:
            gunlukodul(loop-player)
 
Skript yerine rewards eklentisi kullanmayı denedinizmi ?
 
Bunuda denermisiniz test edicek vaktim olmuyor kusura bakmayın


Kod:
options:
    prefix: <##E1FFAF>&l** &8•

on join:
    set {_uuid} to player's uuid
    set {_lastLogin} to {gunlukodul.son.%{_uuid}%}
    if {_lastLogin} is set:
        set {_gecenZaman} to difference between now and {_lastLogin}
        if {_gecenZaman} >= 2 days:
            loop 7 times:
                delete {gun%loop-number%.%{_uuid}%}
                delete {gun%loop-number%alindi.%{_uuid}%}
            set {gun1.%{_uuid}%} to true
            set {gunlukodul.son.%{_uuid}%} to now
            gunlukodul(player)
        else if {_gecenZaman} >= 1 day:
            loop 7 times:
                if {gun%loop-number%.%{_uuid}%} is not set:
                    set {gun%loop-number%.%{_uuid}%} to true
                    set {gunlukodul.son.%{_uuid}%} to now
                    gunlukodul(player)
                    stop
    else:
        set {gun1.%{_uuid}%} to true
        set {gunlukodul.son.%{_uuid}%} to now

function gunlukodul(p: player):
    set metadata tag "gunlukodul" of {_p} to chest inventory with 3 rows named "&8ɢüɴʟüᴋ öᴅüʟ"
    set slot (numbers between 0 to 26) of metadata "gunlukodul" of {_p} to light gray stained glass pane named "<##E1FFAF>**"
    set slot 18 of metadata "gunlukodul" of {_p} to arrow named "&7ɢᴇʀi ᴅöɴ" with lore "&f • &7Buradan bir önceki sayfaya dönebilirsin."
    set {_slot} to 10
    set {_day} to 1
    while {_day} <= 7:
        if {gun%{_day}%.%{_p}'s uuid%} is set:
            if {gun%{_day}%alindi.%{_p}'s uuid%} is not set:
                set slot {_slot} of metadata "gunlukodul" of {_p} to gold block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &6ᴀʟɪɴᴀʙiʟiʀ"
            else:
                set slot {_slot} of metadata "gunlukodul" of {_p} to diamond block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &aᴀʟɪɴᴅɪ"
        else:
            # Süre hesaplama
            set {_lastReward} to {gunlukodul.son.%{_p}'s uuid%}
            if {_lastReward} is set:
                set {_gecenZaman} to difference between now and {_lastReward}
                set {_kalanZaman} to 1 day - {_gecenZaman}
                if {_kalanZaman} > 0:
                    set {_kalanSaniye} to {_kalanZaman} / 1 second
                    set {_saatler} to floor({_kalanSaniye} / 3600)
                    set {_dakikalar} to floor(({_kalanSaniye} mod 3600) / 60)
                    set {_saniyeler} to floor({_kalanSaniye} mod 60)
                   
                    if {_saatler} > 0:
                        set {_sureMetni} to "&c%{_saatler}%s %{_dakikalar}%d %{_saniyeler}%sn"
                    else if {_dakikalar} > 0:
                        set {_sureMetni} to "&c%{_dakikalar}%d %{_saniyeler}%sn"
                    else:
                        set {_sureMetni} to "&c%{_saniyeler}%sn"
                else:
                    set {_sureMetni} to "&aʜᴀᴢɪʀ!"
            else:
                set {_sureMetni} to "&aʜᴀᴢɪʀ!"
           
            set slot {_slot} of metadata "gunlukodul" of {_p} to coal block named "&dɢüɴʟüᴋ öᴅüʟ #%{_day}%" with lore "&8**" and "&8**" and "" and " &7• ᴅᴜʀᴜᴍ: &cᴋiʟiᴛʟi" and " &7┖ ѕüʀᴇ: %{_sureMetni}%"
        add 1 to {_slot}
        add 1 to {_day}
    open metadata tag "gunlukodul" of {_p} to {_p}

on inventory click:
    if event-inventory = metadata tag "gunlukodul" of player:
        cancel event
        if event-slot = 18:
            console command "dm open anamenu %player%"
            play sound "entity.experience_orb.pickup" with volume 100 with pitch 1 to player
            send "{@prefix} &7Ana menü açıldı." to player
        set {_day} to 1
        set {_slot} to 10
        while {_slot} <= 16:
            if event-slot = {_slot}:
                if {gun%{_day}%.%player's uuid%} is set:
                    if {gun%{_day}%alindi.%player's uuid%} is not set:
                        set {gun%{_day}%alindi.%player's uuid%} to true
                        play sound "entity.allay.item_given" with volume 100 with pitch 0 to player
                        gunlukodul(player)
                    else:
                        play sound "entity.allay.item_taken" with volume 100 with pitch 0 to player
                        send "{@prefix} &7Bu ödülü zaten aldın!" to player
                else:
                    play sound "entity.allay.item_thrown" with volume 100 with pitch 0 to player
                    # Süre bilgisi göster
                    set {_lastReward} to {gunlukodul.son.%player's uuid%}
                    if {_lastReward} is set:
                        set {_gecenZaman} to difference between now and {_lastReward}
                        set {_kalanZaman} to 1 day - {_gecenZaman}
                        if {_kalanZaman} > 0:
                            set {_kalanSaniye} to {_kalanZaman} / 1 second
                            set {_saatler} to floor({_kalanSaniye} / 3600)
                            set {_dakikalar} to floor(({_kalanSaniye} mod 3600) / 60)
                            set {_saniyeler} to floor({_kalanSaniye} mod 60)
                           
                            if {_saatler} > 0:
                                set {_sureMetni} to "%{_saatler}% saat %{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else if {_dakikalar} > 0:
                                set {_sureMetni} to "%{_dakikalar}% dakika %{_saniyeler}% saniye"
                            else:
                                set {_sureMetni} to "%{_saniyeler}% saniye"
                           
                            send "{@prefix} &7Bir sonraki ödüle &c%{_sureMetni}% &7kaldı!" to player
                        else:
                            send "{@prefix} &7Bir sonraki ödül hazır!" to player
                    else:
                        send "{@prefix} &7Bir sonraki ödül hazır!" to player
            add 1 to {_day}
            add 1 to {_slot}

# Süre güncellemesi için her 30 saniyede bir çalışan sistem
every 30 seconds:
    loop all players:
        set {_uuid} to loop-player's uuid
        if metadata tag "gunlukodul" of loop-player is set:
            gunlukodul(loop-player)
yine hata verdi:

1752921615162.webp
 
Skriptle yapmaya çalışıyordum ancak olmadı tekniken sorunum çözülmedi ancak plugin kullanacağım. Herkese teşekkür ederim, konu kilit.
Teşekkürler Axrewards önerebilirim kaliteli ve performanslı bir eklentidir iyi forumlar dilerim.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst