Çözüldü Kazanılan coini gösterme komudu çalışmıyor

Mahmut36

Birisi mi Spawnlandı?
Katılım
21 Mayıs 2020
Mesajlar
7
Elmaslar
0
Puan
0
Yaş
25
Minecraft
Mahmut36

Discord:

Mahmut36

Rich (BB code):
on load:
    load yaml "plugins/SkyBlockCoin/data.yml" as "data"       
    
    
function itemAl(p: player, item: item, fiyat: integer):   
    set {_x} to yaml value "CRCoin.%{_p}%" from "data"
    set {_coin} to "%{_x}%" parsed as integer
    
    if {_coin} >= {_fiyat}:
        set yaml value "CRCoin.%{_p}%" from "data" to "%{_coin} - {_fiyat}%"
        send "&3Coin &8» &eBaşarıyla satın aldınız &a%{_coin} - {_fiyat}% ⛃ &eCL kaldı." to {_p}
        
        if {_p} has space for {_item}:
            give {_item} to {_p}
        else:
            drop {_item} at {_p}'s location
            send "&cDikkat! &7Envanterinizde, yeterli yer olmadığı için eşyanız &l&cyere düştü!" to {_p}   
    else:       
        send "&3Coin &8» &eBu eşyayı almak için &a%{_fiyat} - {_coin}% ⛃ &eCL dağa lazım." to {_p}


command /kazmaal1:
    trigger:
        set {_fiyat} to 5000
        set {_item} to diamond pickaxe of efficiency 10 and fortune 4 and unbreaking 4 named "&3Edit Kazma &8(&c1&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 10|| &7● &eKırılmazlık 4|| &7● &eServet 4||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})
command /kazmaal2:
    trigger:
        set {_fiyat} to 10000
        set {_item} to diamond pickaxe of efficiency 12 and fortune 4 and unbreaking 4 named "&3Edit Kazma &8(&c2&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 12|| &7● &eKırılmazlık 4|| &7● &eServet 4||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})
command /kazmaal3:
    trigger:
        set {_fiyat} to 15000
        set {_item} to diamond pickaxe of efficiency 14 and fortune 5 and unbreaking 5 named "&3Edit Kazma &8(&c3&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 14|| &7● &eKırılmazlık 5|| &7● &eServet 5||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})
command /kazmaal4:
    trigger:
        set {_fiyat} to 20000
        set {_item} to diamond pickaxe of efficiency 16 and fortune 5 and unbreaking 5 named "&3Edit Kazma &8(&c4&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 16|| &7● &eKırılmazlık 5|| &7● &eServet 5||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})
command /kazmaal5:
    trigger:
        set {_fiyat} to 25000
        set {_item} to diamond pickaxe of efficiency 18 and fortune 6 and unbreaking 6 named "&3Edit Kazma &8(&c5&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 18|| &7● &eKırılmazlık 6|| &7● &eServet 6||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})
command /kazmaal6:
    trigger:
        set {_fiyat} to 40000
        set {_item} to diamond pickaxe of efficiency 20 and fortune 7 and unbreaking 7 named "&3Edit Kazma &8(&c6&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 20|| &7● &eKırılmazlık 7|| &7● &eServet 7||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})   
command /kazmaal7:
    trigger:
        set {_fiyat} to 60000
        set {_item} to diamond pickaxe of efficiency 22 and fortune 7 and unbreaking 7 named "&3Edit Kazma &8(&c7&8)" with lore "|| &6Özellikleri:|| &7● &eVerimlilik 22|| &7● &eKırılmazlık 7|| &7● &eServet 7||||&a&nCLMARKET'Den Alabilirsiniz."
        itemAl(player, {_item}, {_fiyat})   
command /spal1:
    trigger:
        set {_fiyat} to 15000
        set {_item} to 52 named "&fDemir &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})
command /spal2:
    trigger:
        set {_fiyat} to 75000
        set {_item} to 52 named "&fDemir Blok &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})   
command /spal3:
    trigger:
        set {_fiyat} to 25000
        set {_item} to 52 named "&eAltın &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})
command /spal4:
    trigger:
        set {_fiyat} to 125000
        set {_item} to 52 named "&eAltın Blok &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})
command /spal5:
    trigger:
        set {_fiyat} to 45000
        set {_item} to 52 named "&bElmas &eSpawner"
        itemAl(player, {_item}, {_fiyat})   
command /spal6:
    trigger:
        set {_fiyat} to 250000
        set {_item} to 52 named "&bElmas Blok &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})   
command /spal7:
    trigger:
        set {_fiyat} to 70000
        set {_item} to 52 named "&2Zumrut &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})
command /spal8:
    trigger:
        set {_fiyat} to 400000
        set {_item} to 52 named "&2Zumrut Blok &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})
command /spal9:
    trigger:
        set {_fiyat} to 3000000
        set {_item} to 52 named "&eSunger &8- &aSpawner"
        itemAl(player, {_item}, {_fiyat})
command /anahtaral1:
    trigger:
        set {_fiyat} to 3000
        set {_item} to 131 named "&aVIP Kasa Anahtarı" with lore "&eKutuya sağ tıkla ve aç."
        itemAl(player, {_item}, {_fiyat})   
command /anahtaral2:
    trigger:
        set {_fiyat} to 4000
        set {_item} to 131 named "&aMega Kasa Anahtarı" with lore "&eKutuya sağ tıkla ve aç."
        itemAl(player, {_item}, {_fiyat})
command /anahtaral3:
    trigger:
        set {_fiyat} to 5000
        set {_item} to 131 named "&aUltra Kasa Anahtarı" with lore "&eKutuya sağ tıkla ve aç."
        itemAl(player, {_item}, {_fiyat})
command /anahtaral4:
    trigger:
        set {_fiyat} to 6000
        set {_item} to 131 named "&aUltimate Kasa Anahtarı" with lore "&eKutuya sağ tıkla ve aç."
        itemAl(player, {_item}, {_fiyat})
command /anahtaral5:
    trigger:
        set {_fiyat} to 7000
        set {_item} to 131 named "&aLegendery Kasa Anahtarı" with lore "&eKutuya sağ tıkla ve aç."
        itemAl(player, {_item}, {_fiyat})       
        
        
        

        
on unload:
    save yaml "data"
on join:
    if yaml path "CRCoin.%player%" in "data" has value:
        
    else:   
        set yaml value "CRCoin.%player%" from "data" to "0"     
    if yaml path "CRState.%player%" in "data" has value:
        
    else:
        set yaml value "CRState.%player%" from "data" to "1"

    if {cr::%player%} is set:
        if {cr::%player%} is less than now:
            set yaml value "CRState.%player%" from "data" to "1"
            send "&7Dikkat! hızlandırmanızın süresi dolmuştur"

on break:
    set {_x} to yaml value "CRCoin.%player%" from "data"
    set {_coin} to "%{_x}%" parsed as integer
        
    set {_x} to yaml value "CRState.%player%" from "data"
    set {_state} to "%{_x}%" parsed as integer
    
    if event-block is mossy cobblestone:       
        set yaml value "CRCoin.%player%" from "data" to "%{_coin} + (3 * {_state})%"
        
        
    else if block is obsidian:
        set yaml value "CRCoin.%player%" from "data" to "%{_coin} + (9 * {_state})%"
        
command /cl [<text>]:
    trigger:
        if arg-1 is "süre":
            set {_x} to yaml value "CRState.%player%" from "data"
            set {_state} to "%{_x}%" parsed as integer       
            if {_state} is 1:
                send "&7Aktif bir hızlandırmaya sahip değilsin!"
            else:
                send "&3Coin &8» &eŞuanda &a%{_state}%X &ehızlandırmaya sahipsin bitiş tariği &a%{cr::%player%}%&e."

        else:
            set {_coin} to yaml value "CRCoin.%player%" from "data"
            send "&3Coin &8» &eHesabınızdaki SkyBlock Coin: &6%{_coin}% &a⛃"
            
                
                
command /cladmin <text> <text> <player> <integer>:
    permission: cladmin
    usage: cladmin <set> <coin|state> <isim> <değer>
    trigger:
        if arg-1 is "set":
            if arg-2 is "coin":
                set yaml value "CRCoin.%arg-3%" from "data" to "%arg-4%"
            else if arg-2 is "state":
                set yaml value "CRState.%arg-3%" from "data" to "%arg-4%"
                set {cr::%arg-3%} to 30 days later
        else if arg-1 is "add":
            if arg-2 is "coin":
                set {_x} to yaml value "CRCoin.%arg-3%" from "data"
                set {_coin} to "%{_x}%" parsed as integer           
                set yaml value "CRCoin.%arg-3%" from "data" to "%{_coin} + arg-4%"

Bu scriptte ne gibi problem olabilir? /cl komudunu uyguladığımda kazanılan coin miktarını göstermiyor.
 
/cl yazdığında nasıl bir mesaj ile karşılaşıyorsun veya hata alıyor musun?
Normal şekilde Coin'i yazıyor oradaki 0 miktarı değişmiyor yosunlu taş ve obsidyen kırınca.
 
Skript'te değişkenler kısmını pek anlayamamışsın. {_x} değişkenleri geçici değişkenlerdir. Local variable'dır yani. Kod bittiğinde bu değişkenler silinir.
 
on break kısmını şu şekilde değişir misin?
Kod:
on break:
    set {_x} to yaml value "CRCoin.%player%" from "data"
    set {_coin} to "%{_x}%" parsed as integer
        
    set {_x} to yaml value "CRState.%player%" from "data"
    set {_state} to "%{_x}%" parsed as integer
    
    if event-block is mossy cobblestone:       
        set {_x} to yaml value "CRCoin.%player%" from "data"
        add 3 * {_state} to {_x}
        set yaml value "CRCoin.%player%" from "data" to {_x}
        save yaml "data"
    else if block is obsidian:
        set {_x} to yaml value "CRCoin.%player%" from "data"
        add 9 * {_state} to {_x}
        set yaml value "CRCoin.%player%" from "data" to {_x}
        save yaml "data"
 

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