[Yardım] Yumurta skripti

KinGoFiRe

Yeni Doğmuş
Mesajlar
1
En iyi cevaplar
0
Beğeniler
0
Puanları
80
yumurta açılırken kırık yumurta veriyor ama bazen item vermiyor yada fazladan item veriyor. Bunu nasıl düzeltebilirim

Kod:
on rightclick holding a egg:
    if tool's name is "&7Yumurta":
        cancel event
        remove 1 egg named "&7Yumurta" from player
        send "&8&l[&cTest] &7yumurta kırılıyor..." to player
        wait 3 seconds
        give 1 egg named "&eKırık yumurta" to player
        chance of 20%:
            give diamond helmet of protection 10, unbreaking 3 named "&6&lTest1 Kaskı" to player
            send "&8&l[&cTest] &bYumurta kaskı kazandın.!" to player
            stop
        chance of 20%:
            give diamond chestplate of protection 10, unbreaking 3 named "&6&lTest1 Zırhı" to player
            send "&8&l[&cTest] &bYumurta zırh kazandın.!" to player
            stop
        chance of 20%:
            give diamond leggings of protection 10, unbreaking 3 named "&6&lTest1 Pantolonu" to player
            send "&8&l[&cTest] &bYumurta pantolon kazandın.!" to player
            stop
        chance of 20%:
            give diamond boots of protection 10, unbreaking 3 named "&6&lTest1 Botları" to player
            send "&8&l[&cTest] &bYumurta bot kazandın.!" to player
            stop
        chance of 20%:
            give diamond sword of sharpness 10, smite 4, unbreaking 3 named "&6&lTest1 Kılıcı" to player
            send "&8&l[&cTest] &bYumurta kılıç kazandın.!" to player
            stop
 


Parqtx

YASAKLANDI
Mesajlar
28
En iyi cevaplar
0
Beğeniler
67
Puanları
70
else kullanmadığınız için bu durum yaşanıyor. Aşağıya örnek bırakayım kendinize göre ayarlayanız.

JavaScript:
on rightclick holding a egg:
    if tool's name is "&7Yumurta":
            cancel event
            remove 1 egg named "&7Yumurta" from player
            apply slowness 999 to player for 3 seconds
            send "&8&l[&cTest] &7yumurta kırılıyor..." to player
            wait 3 seconds
            chance of 20%:
                give 1 iron sword to player
                send "{@prefix} &71 Tane Demir Kilic Kazandin!" to player
            else:
                chance of 20%:
                    give 1 iron chestplate to player
                    send "{@prefix} &71 Tane Demir Göğüslük kazandin!" to player
                else:
                    chance of 20%:
                        give 1 iron leggings to player
                        send "{@prefix} &71 Tane Demir Pantolon Kazandin!" to player
                    else:
                        chance of 20%:
                            give 1 iron boots to player
                            send "{@prefix} &b1 Tane Demir Ayakkabı Kazandın!" to player
 

cezapro35

Zombi Katili
Mesajlar
216
En iyi cevaplar
0
Beğeniler
65
Puanları
270
Ruh hali
else kullanmadığınız için bu durum yaşanıyor. Aşağıya örnek bırakayım kendinize göre ayarlayanız.

JavaScript:
on rightclick holding a egg:
    if tool's name is "&7Yumurta":
            cancel event
            remove 1 egg named "&7Yumurta" from player
            apply slowness 999 to player for 3 seconds
            send "&8&l[&cTest] &7yumurta kırılıyor..." to player
            wait 3 seconds
            chance of 20%:
                give 1 iron sword to player
                send "{@prefix} &71 Tane Demir Kilic Kazandin!" to player
            else:
                chance of 20%:
                    give 1 iron chestplate to player
                    send "{@prefix} &71 Tane Demir Göğüslük kazandin!" to player
                else:
                    chance of 20%:
                        give 1 iron leggings to player
                        send "{@prefix} &71 Tane Demir Pantolon Kazandin!" to player
                    else:
                        chance of 20%:
                            give 1 iron boots to player
                            send "{@prefix} &b1 Tane Demir Ayakkabı Kazandın!" to player
Skripti denemedim fakat hatalı bence.
if olmuyan yere kaç kere else koymuşsun.
Sen dene ginede olmazsa ben yaparım.
[automerge]1526816288[/automerge]
Java:
on rightclick holding a egg:
    if tool's name is "&7Yumurta":
        cancel event
        remove 1 egg named "&7Yumurta" from player
        send "&8&l[&cTest] &7yumurta kırılıyor..." to player
        wait 3 seconds
        give 1 egg named "&eKırık yumurta" to player
        if chance of 20%:
            give diamond helmet of protection 10, unbreaking 3 named "&6&lTest1 Kaskı" to player
            send "&8&l[&cTest] &bYumurta kaskı kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond chestplate of protection 10, unbreaking 3 named "&6&lTest1 Zırhı" to player
            send "&8&l[&cTest] &bYumurta zırh kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond leggings of protection 10, unbreaking 3 named "&6&lTest1 Pantolonu" to player
            send "&8&l[&cTest] &bYumurta pantolon kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond boots of protection 10, unbreaking 3 named "&6&lTest1 Botları" to player
            send "&8&l[&cTest] &bYumurta bot kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond sword of sharpness 10, smite 4, unbreaking 3 named "&6&lTest1 Kılıcı" to player
            send "&8&l[&cTest] &bYumurta kılıç kazandın.!" to player
            stop
Doğrusu böyle olucak.

 

TReaperTR

Altın Madencisi
Mesajlar
387
En iyi cevaplar
0
Beğeniler
285
Puanları
910
Ruh hali
Skripti denemedim fakat hatalı bence.
if olmuyan yere kaç kere else koymuşsun.
Sen dene ginede olmazsa ben yaparım.
[automerge]1526816288[/automerge]
Java:
on rightclick holding a egg:
    if tool's name is "&7Yumurta":
        cancel event
        remove 1 egg named "&7Yumurta" from player
        send "&8&l[&cTest] &7yumurta kırılıyor..." to player
        wait 3 seconds
        give 1 egg named "&eKırık yumurta" to player
        if chance of 20%:
            give diamond helmet of protection 10, unbreaking 3 named "&6&lTest1 Kaskı" to player
            send "&8&l[&cTest] &bYumurta kaskı kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond chestplate of protection 10, unbreaking 3 named "&6&lTest1 Zırhı" to player
            send "&8&l[&cTest] &bYumurta zırh kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond leggings of protection 10, unbreaking 3 named "&6&lTest1 Pantolonu" to player
            send "&8&l[&cTest] &bYumurta pantolon kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond boots of protection 10, unbreaking 3 named "&6&lTest1 Botları" to player
            send "&8&l[&cTest] &bYumurta bot kazandın.!" to player
            stop
        else if chance of 20%:
            give diamond sword of sharpness 10, smite 4, unbreaking 3 named "&6&lTest1 Kılıcı" to player
            send "&8&l[&cTest] &bYumurta kılıç kazandın.!" to player
            stop
Doğrusu böyle olucak.


Chance yapmak için if kullanmaya gerek yok. İf olmadan da else yapılabilir.
 

cezapro35

Zombi Katili
Mesajlar
216
En iyi cevaplar
0
Beğeniler
65
Puanları
270
Ruh hali
Chance yapmak için if kullanmaya gerek yok. İf olmadan da else yapılabilir.
tab basmış if olmuyan yere...
Lütfen iyice bakıp yorumlarınızı yaparsanız sevinirim.
[automerge]1526817247[/automerge]
Ginede deneyin fakat uzatmış kodu zaten else if yapsın direk adam.
O kadar uzatmaya'da gerek yok kodu.
---------------------
Bu arada 5 tane chance of koymuş altına else koymuş.
Onu görmedim.
Ama dediğim gibi kod uzar.
Herkesin kendi mantığı vardır.
Kod çalışabilir.
Ben chance of lar yokken else koydu sandım.
 

Parqtx

YASAKLANDI
Mesajlar
28
En iyi cevaplar
0
Beğeniler
67
Puanları
70
tab basmış if olmuyan yere...
Lütfen iyice bakıp yorumlarınızı yaparsanız sevinirim.
[automerge]1526817247[/automerge]
Ginede deneyin fakat uzatmış kodu zaten else if yapsın direk adam.
O kadar uzatmaya'da gerek yok kodu.
---------------------
Bu arada 5 tane chance of koymuş altına else koymuş.
Onu görmedim.
Ama dediğim gibi kod uzar.
Herkesin kendi mantığı vardır.
Kod çalışabilir.
Ben chance of lar yokken else koydu sandım.

Çakma skripterler sizi herşeyde laf arıyosunuz. Laf yapmadan önce bir bakın.
 

TReaperTR

Altın Madencisi
Mesajlar
387
En iyi cevaplar
0
Beğeniler
285
Puanları
910
Ruh hali
tab basmış if olmuyan yere...
Lütfen iyice bakıp yorumlarınızı yaparsanız sevinirim.
[automerge]1526817247[/automerge]
Ginede deneyin fakat uzatmış kodu zaten else if yapsın direk adam.
O kadar uzatmaya'da gerek yok kodu.
---------------------
Bu arada 5 tane chance of koymuş altına else koymuş.
Onu görmedim.
Ama dediğim gibi kod uzar.
Herkesin kendi mantığı vardır.
Kod çalışabilir.
Ben chance of lar yokken else koydu sandım.
Dostum daha test etmeden gelip laf yapıyorsun. Kendim de denedim test ettim sıkıntı yok çalışıyor. @Parqtx yaptığı gayet doğru bir skript.
 

cezapro35

Zombi Katili
Mesajlar
216
En iyi cevaplar
0
Beğeniler
65
Puanları
270
Ruh hali
Çakma skripterler sizi herşeyde laf arıyosunuz. Laf yapmadan önce bir bakın.
Çakma skripter anladım :D
Skript'den anlamadığın buradan belli.
1 line olmuyan kodu 10 line daha çoğaltmışsın.
Google'de iyi aramalar dilerim sana.
[automerge]1526820637[/automerge]
Dostum daha test etmeden gelip laf yapıyorsun. Kendim de denedim test ettim sıkıntı yok çalışıyor. @Parqtx yaptığı gayet doğru bir skript.
Ginede deneyin fakat uzatmış kodu zaten else if yapsın direk adam.
O kadar uzatmaya'da gerek yok kodu.
---------------------
Bu arada 5 tane chance of koymuş altına else koymuş.
Onu görmedim.
Ama dediğim gibi kod uzar.
Herkesin kendi mantığı vardır.
Kod çalışabilir.
Ben chance of lar yokken else koydu sandım.
Bunu okudun mu ?
Yazdığımı okumalısın.
[automerge]1526820650[/automerge]
Sorun çözüldüğüne göre "kilit" ?
 

Üst