Maden yenileme

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

Mehmetbener

Odunlara Vur Vur Vur!
Katılım
29 Haziran 2017
Mesajlar
35
Elmaslar
1
Puan
3.750
Yaş
36
Arkadaşlar blockregen pluginine benzer birşey istiyorum.

Oyuncunun bölgesi "magara" ise bu bölgede blok koyamayacak ancak kırabilecek, kırdığı her taş bloğu arkasından 7 saniye sonra yenilenecek ve yenilenen blok ya elmas cevheri, ya demir cevheri, ya altın cevheri ya da çok büyük ihtimalle normal taş bloğu olacak. fikir skript:
Kod:
on break stone:
    if region of player is "magara":
        wait 7 seconds
        chance of %25:
            set event-block to diamond ore
        chance of %25:
            set event-block to iron ore
        chance of %30:
            set event-block to gold ore
        chance of %80:
            set event-block to stone

ancak bu yazdığımda şöyle birşey var, küçük bir şans da olsa bloğun yenilenmeme şansı oluyor. Bu 4 ihtimalden birinin mutlaka gerçekleşmesini istiyorum, ancak o biri gerçekleşince de diğerlerinin gerçekleşmemesini. yani gerçek yüzdeli oran ihtimali istiyorum. %100 ihtimalle blok yenilenecek ancak %25 şansla yenilenen blok elmas olacak %25 şansla demir cevheri vs vs... Siz bunu yapın ben ayarlarım zaten. ACİL
 
Kod:
on break stone:
    if region of player is "magara":
        wait 7 seconds
        chance of %25:
            set event-block to diamond ore
            stop
        chance of %25:
            set event-block to iron ore
            stop
        chance of %30:
            set event-block to gold ore
            stop
        chance of %100:
            set event-block to stone
 
Kod:
on break stone:
    if region of player is "magara":
        wait 7 seconds
        chance of %25:
            set event-block to diamond ore
            stop
        chance of %25:
            set event-block to iron ore
            stop
        chance of %30:
            set event-block to gold ore
            stop
        else:
            set event-block to stone
 
Kod:
on break stone:
    if region of player is "magara":
        wait 7 seconds
        chance of %25:
            set event-block to diamond ore
            stop
        chance of %25:
            set event-block to iron ore
            stop
        chance of %30:
            set event-block to gold ore
            stop
        else:
            set event-block to stone
yüzdeler ile oolan problem çözüldü ancak

"Can't compare: 'region of player' with a text (magara.sk, line 2: if region of player is "magara": )

hatasını veriyor
 
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