Yardım Skript Bugu

vForGeralt

Marangoz
Mesajlar
57
En iyi cevaplar
0
Beğeniler
6
Puanları
40
Ruh hali
Selamlar, kendime Skript ile rulet sistemi geliştirdim fakat kağıda sağ tıklayınca sadece istediğim parayı değil diğer rulet kağıtlarındaki parayı da veriyor bunu nasıl düzeltebilirim?


Kod:
options:
    menuisim: Rulet Menüaü
    p: &c&lRulet &7>>
    isim1: &75M Rulet Kağıdı &a(Sağ-Tıkla)
    isim2: &710M Rulet Kağıdı &a(Sağ-Tıkla)
    isim3: &715M Rulet Kağıdı &a(Sağ-Tıkla)
    isim4: &720M Rulet Kağıdı &a(Sağ-Tıkla)
    
on rightclick with paper:
    if display name of tool is "{@isim1}":
        remove paper named "{@isim1}" from player
    chance of 50%:
        execute console comman "/eco give %player% 5000000"
        message "{@p} &9Tebrikler! Ruletten 5M Kazandınız!" to player
        broadcast "&b%player% &aRuletten 5M Para Kazandı!"
        stop
    else:
        send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
        give 1 diamond named "&d&lTeselli Itemi" to player
        stop
    
on rightclick with paper:
    if display name of tool is "{@isim2}":
        remove paper named "{@isim2}" from player
    chance of 50%:
        execute console comman "/eco give %player% 10000000"
        message "{@p} &9Tebrikler! Ruletten 10M Kazandınız!" to player
        broadcast "{@p} &b%player% &aRuletten 10M Para Kazandı!"
        stop
    else:
        send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
        give 1 diamond named "&d&lTeselli Itemi" to player
        stop
        
on rightclick with paper:
    if display name of tool is "{@isim3}":
        remove paper named "{@isim3}" from player
    chance of 50%:
        execute console comman "/eco give %player% 15000000"
        message "{@p} &9Tebrikler! Ruletten 15M Kazandınız!" to player
        broadcast "{@p} &b%player% &aRuletten 15M Para Kazandı!"
        stop
    else:
        send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
        give 1 diamond named "&d&lTeselli Itemi" to player
        stop
        
on rightclick with paper:
    if display name of tool is "{@isim4}":
        remove paper named "{@isim4}" from player
    chance of 50%:
        execute console comman "/eco give %player% 20000000"
        message "{@p} &9Tebrikler! Ruletten 20M Kazandınız!"
        broadcast "{@p} &b%player% &aRuletten 20M Para Kazandı!"
        stop
    else:
        send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
        give 1 diamond named "&d&lTeselli Itemi" to player
        stop
    
command 5mrulet:
    trigger:
        if player's balance is greater than or equal to 2500000:
            give 1 paper named "{@isim1}" to player
            remove 2500000 from the player's balance
            send "{@p} &9Başarı ile 5M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player           

command 10mrulet:
    trigger:
        if player's balance is greater than or equal to 5000000:
            give 1 paper named "{@isim2}" to player
            remove 2500000 from the player's balance
            send "{@p} &9Başarı ile 10M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command 15mrulet:
    trigger:
        if player's balance is greater than or equal to 75000000:
            give 1 paper named "{@isim3}" to player
            remove 2500000 from the player's balance
            send "{@p} &9Başarı ile 15M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command 20mrulet:
    trigger:
        if player's balance is greater than or equal to 10000000:
            give 1 paper named "{@isim4}" to player
            remove 2500000 from the player's balance
            send "{@p} &9Başarı ile 10M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /rulet:
    trigger:
        open chest with 3 rows named "{@menuisim}" to player
        format slot 10 of player with paper named "&75M &b&lRulet &7[&cGiriş 2.5M&7]" to close then run [make player execute "5mrulet"]
        format slot 12 of player with paper named "&710M &b&lRulet &7[&cGiriş 5M&7]" to close then run [make player execute "10mrulet"]
        format slot 14 of player with paper named "&715M &b&lRulet &7[&cGiriş 7.5M&7]" to close then run [make player execute "15mrulet"]
        format slot 16 of player with paper named "&720M &b&lRulet &7[&cGiriş 10M&7]" to close then run [make player execute "20mrulet"]
 


DerpBoy

Kömür Madencisi
Mesajlar
130
En iyi cevaplar
0
Beğeniler
34
Puanları
215
Ruh hali
Bir başka spagetti kod, neyse, chance of satışlarının başına "if" ekleyin. "if chance of"
 

vForGeralt

Marangoz
Mesajlar
57
En iyi cevaplar
0
Beğeniler
6
Puanları
40
Ruh hali
Düzelmedi :( + Bir de 5M ruletten 15m 10m çıkmaya başladı
 

vForGeralt

Marangoz
Mesajlar
57
En iyi cevaplar
0
Beğeniler
6
Puanları
40
Ruh hali
SKRİPTİ TEMİZE ÇEKEBİLECEK VARSA VE ÇEKERSE ÇOK MUTLU OLURUM
 

LifeMCServer

Nether Yerlisi
Mesajlar
2,410
En iyi cevaplar
98
Beğeniler
2,461
Puanları
10,250
Ruh hali
Merhabalar, attığınız kodu düzenledim, bunu deneyebilirsiniz:


JavaScript:
options:
    menuisim: Rulet Menüaü
    p: &c&lRulet &7>>
    isim1: &75M Rulet Kağıdı &a(Sağ-Tıkla)
    isim2: &710M Rulet Kağıdı &a(Sağ-Tıkla)
    isim3: &715M Rulet Kağıdı &a(Sağ-Tıkla)
    isim4: &720M Rulet Kağıdı &a(Sağ-Tıkla)
    
on rightclick with paper:
    if display name of tool is "{@isim1}":
        remove paper named "{@isim1}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 5000000"
            message "{@p} &9Tebrikler! Ruletten 5M Kazandınız!" to player
            broadcast "&b%player% &aRuletten 5M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
    
on rightclick with paper:
    if display name of tool is "{@isim2}":
        remove paper named "{@isim2}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 10000000"
            message "{@p} &9Tebrikler! Ruletten 10M Kazandınız!" to player
            broadcast "{@p} &b%player% &aRuletten 10M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
        
on rightclick with paper:
    if display name of tool is "{@isim3}":
        remove paper named "{@isim3}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 15000000"
            message "{@p} &9Tebrikler! Ruletten 15M Kazandınız!" to player
            broadcast "{@p} &b%player% &aRuletten 15M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
        
on rightclick with paper:
    if display name of tool is "{@isim4}":
        remove paper named "{@isim4}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 20000000"
            message "{@p} &9Tebrikler! Ruletten 20M Kazandınız!"
            broadcast "{@p} &b%player% &aRuletten 20M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
    
command /5mrulet:
    trigger:
        if balance of player is greater than or equal to 2500000:
            give 1 paper named "{@isim1}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 5M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player           

command /10mrulet:
    trigger:
        if balance of player is greater than or equal to 5000000:
            give 1 paper named "{@isim2}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 10M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /15mrulet:
    trigger:
        if balance of player is greater than or equal to 75000000:
            give 1 paper named "{@isim3}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 15M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /20mrulet:
    trigger:
        if balance of player is greater than or equal to 10000000:
            give 1 paper named "{@isim4}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 10M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /rulet:
    trigger:
        open chest with 3 rows named "{@menuisim}" to player
        format slot 10 of player with paper named "&75M &b&lRulet &7[&cGiriş 2.5M&7]" to close then run [make player execute command "5mrulet"]
        format slot 12 of player with paper named "&710M &b&lRulet &7[&cGiriş 5M&7]" to close then run [make player execute command "10mrulet"]
        format slot 14 of player with paper named "&715M &b&lRulet &7[&cGiriş 7.5M&7]" to close then run [make player execute command "15mrulet"]
        format slot 16 of player with paper named "&720M &b&lRulet &7[&cGiriş 10M&7]" to close then run [make player execute command "20mrulet"]
 

vForGeralt

Marangoz
Mesajlar
57
En iyi cevaplar
0
Beğeniler
6
Puanları
40
Ruh hali
Merhabalar, attığınız kodu düzenledim, bunu deneyebilirsiniz:


JavaScript:
options:
    menuisim: Rulet Menüaü
    p: &c&lRulet &7>>
    isim1: &75M Rulet Kağıdı &a(Sağ-Tıkla)
    isim2: &710M Rulet Kağıdı &a(Sağ-Tıkla)
    isim3: &715M Rulet Kağıdı &a(Sağ-Tıkla)
    isim4: &720M Rulet Kağıdı &a(Sağ-Tıkla)
   
on rightclick with paper:
    if display name of tool is "{@isim1}":
        remove paper named "{@isim1}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 5000000"
            message "{@p} &9Tebrikler! Ruletten 5M Kazandınız!" to player
            broadcast "&b%player% &aRuletten 5M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
   
on rightclick with paper:
    if display name of tool is "{@isim2}":
        remove paper named "{@isim2}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 10000000"
            message "{@p} &9Tebrikler! Ruletten 10M Kazandınız!" to player
            broadcast "{@p} &b%player% &aRuletten 10M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
       
on rightclick with paper:
    if display name of tool is "{@isim3}":
        remove paper named "{@isim3}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 15000000"
            message "{@p} &9Tebrikler! Ruletten 15M Kazandınız!" to player
            broadcast "{@p} &b%player% &aRuletten 15M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
       
on rightclick with paper:
    if display name of tool is "{@isim4}":
        remove paper named "{@isim4}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 20000000"
            message "{@p} &9Tebrikler! Ruletten 20M Kazandınız!"
            broadcast "{@p} &b%player% &aRuletten 20M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop
   
command /5mrulet:
    trigger:
        if balance of player is greater than or equal to 2500000:
            give 1 paper named "{@isim1}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 5M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player          

command /10mrulet:
    trigger:
        if balance of player is greater than or equal to 5000000:
            give 1 paper named "{@isim2}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 10M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /15mrulet:
    trigger:
        if balance of player is greater than or equal to 75000000:
            give 1 paper named "{@isim3}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 15M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /20mrulet:
    trigger:
        if balance of player is greater than or equal to 10000000:
            give 1 paper named "{@isim4}" to player
            remove 2500000 from the balance of player
            send "{@p} &9Başarı ile 10M Rulet Çeki Aldınız!" to player
        else:
            send "{@p} &9Yeterli Paran Bulunmamakta!" to player

command /rulet:
    trigger:
        open chest with 3 rows named "{@menuisim}" to player
        format slot 10 of player with paper named "&75M &b&lRulet &7[&cGiriş 2.5M&7]" to close then run [make player execute command "5mrulet"]
        format slot 12 of player with paper named "&710M &b&lRulet &7[&cGiriş 5M&7]" to close then run [make player execute command "10mrulet"]
        format slot 14 of player with paper named "&715M &b&lRulet &7[&cGiriş 7.5M&7]" to close then run [make player execute command "15mrulet"]
        format slot 16 of player with paper named "&720M &b&lRulet &7[&cGiriş 10M&7]" to close then run [make player execute command "20mrulet"]
Teşekkürler sorun çözülmüştür konu kilit
 

LifeMCServer

Nether Yerlisi
Mesajlar
2,410
En iyi cevaplar
98
Beğeniler
2,461
Puanları
10,250
Ruh hali
Bir şey daha sorucam tam olarak nerelerde hata yapmışım?

Şu kısımlarda


JavaScript:
    if display name of tool is "{@isim1}":
        remove paper named "{@isim1}" from player
        if chance of 50%:
            execute console comman "/eco give %player% 5000000"
            message "{@p} &9Tebrikler! Ruletten 5M Kazandınız!" to player
            broadcast "&b%player% &aRuletten 5M Para Kazandı!"
            stop
        else:
            send "{@p} &9Üzgünüm! Ruletten Para Kazanamadınız!" to player
            give 1 diamond named "&d&lTeselli Itemi" to player
            stop

İf chance of kısımlarına ekstradan bir tab atman gerekirken if display name kısmı ile aynı hizaya koymuşsun. Bu nedenle itemin ismi ne olursa olsun farketmeyip her türlü kağıdı kabul ediyordu.
 

Üst