Çözüldü Aynı Görevin Bir Daha Alınabilmesi

  • Konuyu Başlatan Konuyu Başlatan TheAkio
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 395
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

TheAkio

Bir Kömür Göründü Kaptanım!
Katılım
8 Mayıs 2020
Mesajlar
110
Elmaslar
36
Puan
0
Konum
Sakarya

Discord:

TheAkio#6422

Merhaba, bir görev skripti var kendime göre editledim fakat bir türlü bunu engelleyemedim. Görevi alınca bir daha bitirene kadar almamayı ve mevcut görevi iptal etmeyi nasıl yapabilirim? Örnek: /göreviptal yazınca mevcut görevi lapis ise iptal olsun ve başka meslek alabilsin. Şimdiden teşekkürler.
Kod:
command /görevler:
    trigger:
        open chest with 4 rows named "Görevler" to player
        format slot 0 of player with lapis lazuli ore named "%{lapis.%player%}%" to close then run [execute player command "lapisgorev"]

command /lapisgorev:
    trigger:
        send "&c&lGHOST&f&lNW &aLapis görevine başladın."
        set {gyl.%player%} to 1
        set {lapis.%player%} to 0

on mine of lapis lazuli ore::
    if {gyl.%player%} is 1:
        add 1 to {lapis.%player%}
        set action bar of player to "&fLapis görev durumu: &a%{lapis.%player%}%&7/2000"
        if {lapis.%player%} is greater than or equal to 2:
            execute console command "broadcast &c&lGHOST&f&lNW &a%player%, Lapis görevini bitirdi!"
            give 1 emerald to player
            delete {gyl.%player%}
          
command /lapisdurum:
    trigger:
        send "&c&lGHOST&f&lNW &fLapis görev durumu: &a%{lapis.%player%}%&7/&a2000"
 
JavaScript:
command /goreviptal:
    trigger:
        send "&c&lGHOST&f&lNW &aLapis görevine iptal ettin."
        set {gyl.%player%} to 0
        set {lapis.%player%} to 0
iptal etmek için gereken kod
Gönderi otomatik olarak birleştirildi:

Kod:
/lapisgorev:
    trigger:
        if {gyl.%player%} is 1:
            send "&c&lGHOST&f&lNW &aGörev zaten alınmış."
        else:
            send "&c&lGHOST&f&lNW &aLapis görevine başladın."
            set {gyl.%player%} to 1
            set {lapis.%player%} to 0

buda eğer görev aldıysa tekrar alamamasına yarar.
 
Kod:
command /görevler:
    trigger:
        open chest with 4 rows named "Görevler" to player
        format slot 0 of player with lapis lazuli ore named "%{lapis.%player%}%" to close then run [execute player command "lapisgorev"]

command /lapisgorev:
    trigger:
        if {gorevaldi::%player%} is not set:
            set {gorevaldi::%player%} to true
            send "&c&lGHOST&f&lNW &aLapis görevine başladın."
            set {gyl.%player%} to 1
            set {lapis.%player%} to 0
        else:
            send "&c&lGHOST&f&lNW &cAynı anda 2 görev yapamazsın." to player

command /goreviptal:
    trigger:
        if {gyl.%player%} is set:
            delete {gorevaldi::%player%}
            delete {gyl.%player%}
            set {lapis.%player%} to 0
            send "&c&lGHOST&f&lNW &7Lapis görevi iptal edildi." to player
        else:
            send "&c&lGHOST&f&lNW &7Mevcut görev bulunamadı." to player

on mine of lapis lazuli ore::
    if {gyl.%player%} is 1:
        add 1 to {lapis.%player%}
        set action bar of player to "&fLapis görev durumu: &a%{lapis.%player%}%&7/2000"
        if {lapis.%player%} is greater than or equal to 2:
            execute console command "broadcast &c&lGHOST&f&lNW &a%player%, Lapis görevini bitirdi!"
            give 1 emerald to player
            delete {gyl.%player%}
          
command /lapisdurum:
    trigger:
        send "&c&lGHOST&f&lNW &fLapis görev durumu: &a%{lapis.%player%}%&7/&a2000"
Buyur.
 

Sorunun tam anlamıyla net olarak çözülmesine sevindim ki sorunda çözüldüğüne göre konuyu kilitleyip taşınması gereken kategoriye taşıyorum.
 
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