Çözüldü Duels Plugini destek

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

swder

"Power lies in the unseen."
Premium
Katılım
15 Temmuz 2021
Mesajlar
849
Elmaslar
181
Puan
7.380

Discord:

sametmisadimglb

Duels pluginini kullanıyorum ve duels sisteminden farklı lig sistemim var bunlar birleştirdim duel kazandıkça random puan kazanıyor ama insanlar dueli sınırsız atabildigi için sıkıntı oluyor aynı kişiye mesela 5 saat bekledikten sonra atmasını sağlayabilirmiyiz.
 
5 saat cooldown mu?
 
Kod:
options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
  
    set {_args::*} to command arguments split at " "
    set {_target} to {_args::1} parsed as player
  
    if {_target} is not set:
        stop
      
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
  
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            cancel event
            stop
  
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on server start:
    delete {duel.cooldown::*}
Deneyebilirsin, çalışıp çalışmadığını yazarsan düzeltirim. Skript yüklü olan sunucu bulamadım bilgisayarda üşendim biraz
 
Kod:
options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
 
    set {_args::*} to command arguments split at " "
    set {_target} to {_args::1} parsed as player
 
    if {_target} is not set:
        stop
    
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
 
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            cancel event
            stop
 
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on server start:
    delete {duel.cooldown::*}
Deneyebilirsin, çalışıp çalışmadığını yazarsan düzeltirim. Skript yüklü olan sunucu bulamadım bilgisayarda üşendim biraz
Skript hatasız ama çalışmadı.

Düzenleme hata varmıs
1735658164368.webp
 
Skript hatasız ama çalışmadı.

Düzenleme hata varmıs
Ekli dosyayı görüntüle 256361
Kod:
function splitString(text: text, delimiter: text) :: strings:
    set {_chars::*} to {_text} split at ""
    set {_result::*} to ""
    set {_current} to ""
    
    loop {_chars::*}:
        if loop-value equals {_delimiter}:
            add {_current} to {_result::*}
            set {_current} to ""
        else:
            set {_current} to "%{_current}%%loop-value%"
    
    add {_current} to {_result::*}
    return {_result::*}

options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
    
    set {_args::*} to splitString(arguments, " ")
    set {_target} to {_args::1} parsed as player
    
    if {_target} is not set:
        stop
    
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
    
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            stop
    
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on server start:
    delete {duel.cooldown::*}
Dener misin
 
Kod:
function splitString(text: text, delimiter: text) :: strings:
    set {_chars::*} to {_text} split at ""
    set {_result::*} to ""
    set {_current} to ""
   
    loop {_chars::*}:
        if loop-value equals {_delimiter}:
            add {_current} to {_result::*}
            set {_current} to ""
        else:
            set {_current} to "%{_current}%%loop-value%"
   
    add {_current} to {_result::*}
    return {_result::*}

options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
   
    set {_args::*} to splitString(arguments, " ")
    set {_target} to {_args::1} parsed as player
   
    if {_target} is not set:
        stop
   
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
   
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            stop
   
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on server start:
    delete {duel.cooldown::*}
Dener misin
Mc kapattım ama acınca deneyecegim teşşekürler.
 
Kod:
function splitString(text: text) :: strings:
    set {_chars::*} to {_text} split at ""
    set {_result::*} to ""
    set {_current} to ""
    
    loop {_chars::*}:
        if "%loop-value%" = " ":
            add {_current} to {_result::*}
            set {_current} to ""
        else:
            set {_current} to "%{_current}%%loop-value%"
    
    add {_current} to {_result::*}
    return {_result::*}

options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
    
    set {_args::*} to splitString(argument)
    set {_target} to {_args::1} parsed as player
    
    if {_target} is not set:
        stop
    
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
    
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            stop
    
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on skript load:
    delete {duel.cooldown::*}
 
Kod:
function splitString(text: text) :: strings:
    set {_chars::*} to {_text} split at ""
    set {_result::*} to ""
    set {_current} to ""
   
    loop {_chars::*}:
        if "%loop-value%" = " ":
            add {_current} to {_result::*}
            set {_current} to ""
        else:
            set {_current} to "%{_current}%%loop-value%"
   
    add {_current} to {_result::*}
    return {_result::*}

options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
   
    set {_args::*} to splitString(argument)
    set {_target} to {_args::1} parsed as player
   
    if {_target} is not set:
        stop
   
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
   
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            stop
   
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on skript load:
    delete {duel.cooldown::*}
Skript hatasız ama görevini yerine getirmiyor.
 
Kod:
options:
    cooldown: 5 hours

on command "duel":
    if command sender is not player:
        stop
        
    set {_args::*} to arguments split at " "
    
    if {_args::1} is not set:
        stop
        
    set {_target} to {_args::1} parsed as player
    
    if {_target} is not set:
        stop
        
    if {_target} is player:
        send "&cKendine düello atamazsın!" to player
        stop
        
    set {_cooldownKey} to "%player's uuid%_%{_target}'s uuid%"
    
    if {duel.cooldown::%{_cooldownKey}%} is set:
        set {_timeLeft} to difference between {duel.cooldown::%{_cooldownKey}%} and now
        if {_timeLeft} is more than 0 seconds:
            send "&cBu oyuncuya bir daha düello teklifi gönderebilmek için %{_timeLeft}% beklemelisin!" to player
            stop
            
    set {duel.cooldown::%{_cooldownKey}%} to now
    add {@cooldown} to {duel.cooldown::%{_cooldownKey}%}

on skript load:
    delete {duel.cooldown::*}
 
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