Çözüldü Günlük yenilenen kullanım hakkı

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

LykiaCraft

Zombi Geldi, Beni Yedi
Katılım
27 Mart 2019
Mesajlar
264
Elmaslar
65
Puan
4.520
Minecraft
KaiteNN_

Discord:

KâiteN#0001

Kod:
on left-click on sponge:
    if name of player's tool is "&eSünger &aKırıcı":
        set event-block to air
        give a sponge to player
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        if {_y} > 0:
            set lore of player's tool to "&6Kullanım Hakkı: %{_y} - 1%"
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number 
        {_y} <= 0:
            remove player's tool from player's inventory 
      
command /sünger:
    permission: sk.admin
    trigger:
        give a shears named "&eSünger &aKırıcı" with lore "&6Kullanım Hakkı: 1800" to player

Bu skriptte ki kullanım hakkının günlük olarak yenilenmesini istiyorum. Günlük 1800 block kırabilicek ve kullanım hakkı bittiğinde 1 gün bekleyip yenileyecek. Yaparsanız çok sevinirim.
 
Son düzenleme:
Kod:
on left-click on sponge:
    if name of player's tool is "&eSünger &aKırıcı":
        set event-block to air
        give a sponge to player
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        if {_y} > 0:
            set lore of player's tool to "&6Kullanım Hakkı: %{_y} - 1%"
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        {_y} <= 0:
            remove player's tool from player's inventory
      
command /sünger:
    permission: sk.admin
    trigger:
        {almıışmı::%player%} isn't set:
            set {almıışmı::%player%} to now
        give a shears named "&eSünger &aKırıcı" with lore "&6Kullanım Hakkı: 1800" to player
on join:
    while player is online:
        wait 1 seconds
        {almıışmı::%player%} is set:
            difference between {almıışmı::%player%} and now >= 1 days:
                loop all items in player's inventory:
                    loop-item is shears
                    name of loop-item is "&eSünger &aKırıcı"
                    set lore of loop-item to "&6Kullanım Hakkı: 1800"
                    set {almıışmı::%player%} to now
item oyuncunun üstünde olması gerek
 
Kod:
on left-click on sponge:
    if name of player's tool is "&eSünger &aKırıcı":
        set event-block to air
        give a sponge to player
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        if {_y} > 0:
            set lore of player's tool to "&6Kullanım Hakkı: %{_y} - 1%"
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        {_y} <= 0:
            remove player's tool from player's inventory
     
command /sünger:
    permission: sk.admin
    trigger:
        {almıışmı::%player%} isn't set:
            set {almıışmı::%player%} to now
        give a shears named "&eSünger &aKırıcı" with lore "&6Kullanım Hakkı: 1800" to player
on join:
    while player is online:
        wait 1 seconds
        {almıışmı::%player%} is set:
            difference between {almıışmı::%player%} and now >= 1 days:
                loop all items in player's inventory:
                    loop-item is shears
                    name of loop-item is "&eSünger &aKırıcı"
                    set lore of loop-item to "&6Kullanım Hakkı: 1800"
                    set {almıışmı::%player%} to now
item oyuncunun üstünde olması gerek
1 Gün sonra girince otomatik mi veriyor? Kullanım hakkı bitince itemi envanterden siliyor çünkü
 
Kod:
on left-click on sponge:
    if name of player's tool is "&eSünger &aKırıcı":
        set event-block to air
        give a sponge to player
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        if {_y} > 0:
            set lore of player's tool to "&6Kullanım Hakkı: %{_y} - 1%"
        set {_y} to "%lore of player's tool%"
        set {_y} to "%uncoloured {_y}%"
        replace all "Kullanım Hakkı: " with "" in {_y}
        replace all "  " with "" in {_y}
        set {_y} to "%{_y}%" parsed as number
        {_y} <= 0:
            remove player's tool from player's inventory
  
command /sünger:
    permission: sk.admin
    trigger:
        {almıışmı::%player%} isn't set:
            set {almıışmı::%player%} to now
        give a shears named "&eSünger &aKırıcı" with lore "&6Kullanım Hakkı: 1800" to player
on join:
    while player is online:
        wait 1 seconds
        {almıışmı::%player%} is set:
            difference between {almıışmı::%player%} and now >= 1 days:
                give a shears named "&eSünger &aKırıcı" with lore "&6Kullanım Hakkı: 1800" to player
                set {almıışmı::%player%} to now
Gönderi otomatik olarak birleştirildi:

düzelttim skripti
 
Teşekkürler. Çalışıp çalışmadığı 1 gün sonra belli olacak.
 
Merhaba, Sorununuz çözüldü mü ?
 
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