Çözüldü Kese komutu yardım (Yardımcı olursanız sevinirim)

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

alibo

Birisi mi Spawnlandı?
Katılım
9 Ocak 2023
Mesajlar
2
Elmaslar
1
Puan
850
Yaş
25
Konum
Antalya
Minecraft
paramyok

Discord:

paramyok#7815

Kese skripti bulmuştum ve kullandığımda teker teker alınca sıkıntı yok ama topluca alınca örnek envanterinizde 128 slotluk boş yer var ama sizin 500 paranız var hepsini alayım dediğinizde 128 altın envanterinize geliyor ama geriye kalan 372 para gelmiyor yerede düşmüyor şimdi istediğim şey bütün altınlarını almak istediğinde envanterinde boş ne kadar yer varsa o kadar altın gelsin geriye kalanı hesapta kalsın.
Kod:
Kod:
command /kese [<string>]:
    trigger:
        set {prefix} to "&a&lCatLand"
        if arg-1 is "koy":
            if player has gold ingot:
                remove 1 gold ingot from player
                add 1 to the player's account
                send "%{prefix}%&7 »  &f&a1 Altını &a1 Catyum karşılığında sattınız." to player
            else:
                send "&cYeterli altınınız yok!" to player
        else if arg-1 is "koyhepsi":
            if player has gold ingot:
                set {golds} to number of gold ingot in player's inventory
                remove {golds} of gold ingot from player
                add {golds} * 1 to the player's account
                send "%{prefix}%&7 »  &aBütün altınlarınızla Catyum aldınız!" to player
            else:
                send "&cYeterli altınınız yok!" to player
        else if arg-1 is "al":
            if player's balance is greater than 1:
                give 1 gold ingot to player
                remove 1 from balance of player
                send "%{prefix}%&7 »  &f&a1 Altın Külçesini &a1 Catyum karşılığında aldınız." to player
            else:
                send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
        else if arg-1 is "alhepsi":
            if player's balance is greater than 1:
                set {golds} to rounded down balance of player * 1
                give {golds} of gold ingot to player
                remove {golds} * 1 from balance of player
                send "%{prefix}%&7 »  &aBütün Catyumlarınızla Altın Külçesi aldınız!" to player
            else:
                send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
        else:
            make player execute command "/altin"
 
Son düzenleme:
Merhaba dostum, bu kodu dener misin?"
Kod:
command /kese [<string>]:
    trigger:
        set {prefix} to "&a&lCatLand"
        if arg-1 is "koy":
            if player has gold ingot:
                remove 1 gold ingot from player
                add 1 to the player's account
                send "%{prefix}%&7 »  &f&a1 Altını &a1 Catyum karşılığında sattınız." to player
            else:
                send "&cYeterli altınınız yok!" to player
        else if arg-1 is "koyhepsi":
            if player has gold ingot:
                set {golds} to number of gold ingot in player's inventory
                remove {golds} of gold ingot from player
                add {golds} * 1 to the player's account
                send "%{prefix}%&7 »  &aBütün altınlarınızla Catyum aldınız!" to player
            else:
                send "&cYeterli altınınız yok!" to player
        else if arg-1 is "al":
            if player's balance is greater than 1:
                give 1 gold ingot to player
                remove 1 from balance of player
                send "%{prefix}%&7 »  &f&a1 Altın Külçesini &a1 Catyum karşılığında aldınız." to player
            else:
                send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
        else if arg-1 is "alhepsi":
            if player's balance is greater than 1:
                set {golds} to rounded down balance of player * 1
                give {golds} of gold ingot to player
                remove {golds} * 1 from balance of player
                send "%{prefix}%&7 »  &aBütün Catyumlarınızla Altın Külçesi aldınız!" to player
            else:
                send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
        else:
            make player execute command "/altin"

        else if arg-1 is "alhepsienvanter":
            set {empty_slots} to 0
            loop player's inventory:
                if loop-value is air:
                    add 1 to {empty_slots}
            if {empty_slots} > 0:
                if player's balance is greater than 1:
                    set {golds} to min({empty_slots}, floor(balance of player))
                    give {golds} of gold ingot to player
                    remove {golds} from balance of player
                    send "%{prefix}%&7 »  &aEnvanterinizdeki boş alan kadar Altın Külçesi aldınız!" to player
                else:
                    send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
            else:
                send "&cEnvanterinizde boş yer bulunmamaktadır!" to player
 
Merhaba dostum, bu kodu dener misin?"
Kod:
command /kese [<string>]:
    trigger:
        set {prefix} to "&a&lCatLand"
        if arg-1 is "koy":
            if player has gold ingot:
                remove 1 gold ingot from player
                add 1 to the player's account
                send "%{prefix}%&7 »  &f&a1 Altını &a1 Catyum karşılığında sattınız." to player
            else:
                send "&cYeterli altınınız yok!" to player
        else if arg-1 is "koyhepsi":
            if player has gold ingot:
                set {golds} to number of gold ingot in player's inventory
                remove {golds} of gold ingot from player
                add {golds} * 1 to the player's account
                send "%{prefix}%&7 »  &aBütün altınlarınızla Catyum aldınız!" to player
            else:
                send "&cYeterli altınınız yok!" to player
        else if arg-1 is "al":
            if player's balance is greater than 1:
                give 1 gold ingot to player
                remove 1 from balance of player
                send "%{prefix}%&7 »  &f&a1 Altın Külçesini &a1 Catyum karşılığında aldınız." to player
            else:
                send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
        else if arg-1 is "alhepsi":
            if player's balance is greater than 1:
                set {golds} to rounded down balance of player * 1
                give {golds} of gold ingot to player
                remove {golds} * 1 from balance of player
                send "%{prefix}%&7 »  &aBütün Catyumlarınızla Altın Külçesi aldınız!" to player
            else:
                send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
        else:
            make player execute command "/altin"

        else if arg-1 is "alhepsienvanter":
            set {empty_slots} to 0
            loop player's inventory:
                if loop-value is air:
                    add 1 to {empty_slots}
            if {empty_slots} > 0:
                if player's balance is greater than 1:
                    set {golds} to min({empty_slots}, floor(balance of player))
                    give {golds} of gold ingot to player
                    remove {golds} from balance of player
                    send "%{prefix}%&7 »  &aEnvanterinizdeki boş alan kadar Altın Külçesi aldınız!" to player
                else:
                    send "%{prefix}% &cYeterli paranız bulunmamakta!" to player
            else:
                send "&cEnvanterinizde boş yer bulunmamaktadır!" to player
Ekledikten sonra /kese alhepsienvanter yazdığımda envanterde boş yer olsa bile "Envanterinizde boş yer bulunmamaktadır!" hatasını alıyorum
 
command /kesehepsi:
[TAB]trigger:
[TAB][TAB]set {prefix} to "&a&lCatLand"
[TAB][TAB]set {emptySlots} to 0
[TAB][TAB]loop 0 to 35: # Oyuncunun envanterinin 0'dan 35'e kadar olan slotlarını kontrol et
[TAB][TAB][TAB]if slot %loop-number% is air:
[TAB][TAB][TAB][TAB]add 1 to {emptySlots}
[TAB][TAB]if player has gold ingot:
[TAB][TAB][TAB]set {golds} to number of gold ingot in player's inventory
[TAB][TAB][TAB]if {golds} > {emptySlots}:
[TAB][TAB][TAB][TAB]set {golds} to {emptySlots} # Altınlar, boş slot sayısından fazla olamaz
[TAB][TAB][TAB]remove {golds} of gold ingot from player
[TAB][TAB][TAB]add {golds} to the player's account
[TAB][TAB][TAB]send "%{prefix}%&7 » &a{golds} Altını &a{golds} Catyum karşılığında sattınız." to player
[TAB][TAB]else:
[TAB][TAB][TAB]send "&cYeterli altınınız yok!" to player
Buyrun
 
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