Bulundu Oyuncu Belirli dünyaya girince ona koruma verme

  • Konuyu Başlatan Konuyu Başlatan Erenslslsl
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 1.184
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Aynen, bu komutu girdikten sonra:

1. Lobi dünyasına geri dön.
2. Sunucudan ayrıl & geri gir.
3. boxpvp dünyasına gir ve test et.
bunu denedim ama olmadı galiba /korumakapat dedim zaten kapalı dedi diğerini denicem
 
KRAL yeni verdiğin şeyi yaptım burda hata verdi " if world of player is {@worldName}: "
 
KRAL yeni verdiğin şeyi yaptım burda hata verdi " if world of player is {@worldName}: "
Python:
options:
    protectionDuration: 120 # dakika cinsinden
    worldName: "boxpvpdünyaismi" # dünya ismi

    protectionEndedMessage: "&cKoruman bitti! Artık diğer oyuncular sana saldırabilir."



on world change:
    if event-world is {@worldName}:
        if {boxpvp.playerProtectionLeft::%player%} isn't set:
            set {boxpvp.playerProtectionLeft::%player%} to 0

        if {boxpvp.firstJoinProtectionGiven::%player%} isn't set:
            set {boxpvp.firstJoinProtectionGiven::%player%} to true

            set {boxpvp.protection.protecting::%player%} to true
            set {boxpvp.playerProtectionLeft::%player%} to {@protectionDuration} * 60

            wait 0.5 second

            set {_t} to {@protectionDuration} / 60

            send "&a%{_t}% saat boyunca PvP'lere karşı korunacaksın!" to player


on damage:
    if victim is a player:
        if attacker is a player:
            if world of victim is {@worldName}:
                if {boxpvp.protection.protecting::%attacker%} is true:
                    cancel event
                    
                    send "&cPvP koruman olduğu için saldırı yapamazsın!" to attacker
                    play sound "minecraft:item.shield.break" to attacker


                else if {boxpvp.protection.protecting::%victim%} is true:
                    cancel event
                    
                    send "&cBu oyuncu saldırılara karşı korunuyor!" to attacker
                    play sound "minecraft:item.shield.break" to attacker


on join:
    protectionHandler(player)



command /korumakapat:
    trigger:
        if {boxpvp.protection.protecting::%player%} is true:
            set {boxpvp.protection.protecting::%player%} to false
            send "&cKoruman başarıyla devre dışı bırakıldı!" to player
            play sound "entity.player.levelup" to player
        else:
            send "&cKoruman zaten aktif değil!" to player
            play sound "block.note_block.bass" at pitch 0.5 to player


command /boxpvpprotectionresetfirstjoin:
    permission: op
    permission message: &cBu komuta iznin yok.
    trigger:
        delete {boxpvp.firstJoinProtectionGiven::%player%}




local function protectionHandler(p: player):
    while {_p} is online:
        while {boxpvp.protection.protecting::%{_p}%} is true:
            if {boxpvp.playerProtectionLeft::%{_p}%} > 0:
                remove 1 from {boxpvp.playerProtectionLeft::%{_p}%}

            else:
                set {boxpvp.protection.protecting::%{_p}%} to false
                send {@protectionEndedMessage} to {_p}

            wait a second

        wait 10 second # lag çıkmasın diye 10, bunu düşürebilirsin istersen.

Düzeltilmiş hali.
 
Python:
options:
    protectionDuration: 120 # dakika cinsinden
    worldName: "boxpvpdünyaismi" # dünya ismi

    protectionEndedMessage: "&cKoruman bitti! Artık diğer oyuncular sana saldırabilir."



on world change:
    if event-world is {@worldName}:
        if {boxpvp.playerProtectionLeft::%player%} isn't set:
            set {boxpvp.playerProtectionLeft::%player%} to 0

        if {boxpvp.firstJoinProtectionGiven::%player%} isn't set:
            set {boxpvp.firstJoinProtectionGiven::%player%} to true

            set {boxpvp.protection.protecting::%player%} to true
            set {boxpvp.playerProtectionLeft::%player%} to {@protectionDuration} * 60

            wait 0.5 second

            set {_t} to {@protectionDuration} / 60

            send "&a%{_t}% saat boyunca PvP'lere karşı korunacaksın!" to player


on damage:
    if victim is a player:
        if attacker is a player:
            if world of victim is {@worldName}:
                if {boxpvp.protection.protecting::%attacker%} is true:
                    cancel event
                   
                    send "&cPvP koruman olduğu için saldırı yapamazsın!" to attacker
                    play sound "minecraft:item.shield.break" to attacker


                else if {boxpvp.protection.protecting::%victim%} is true:
                    cancel event
                   
                    send "&cBu oyuncu saldırılara karşı korunuyor!" to attacker
                    play sound "minecraft:item.shield.break" to attacker


on join:
    protectionHandler(player)



command /korumakapat:
    trigger:
        if {boxpvp.protection.protecting::%player%} is true:
            set {boxpvp.protection.protecting::%player%} to false
            send "&cKoruman başarıyla devre dışı bırakıldı!" to player
            play sound "entity.player.levelup" to player
        else:
            send "&cKoruman zaten aktif değil!" to player
            play sound "block.note_block.bass" at pitch 0.5 to player


command /boxpvpprotectionresetfirstjoin:
    permission: op
    permission message: &cBu komuta iznin yok.
    trigger:
        delete {boxpvp.firstJoinProtectionGiven::%player%}




local function protectionHandler(p: player):
    while {_p} is online:
        while {boxpvp.protection.protecting::%{_p}%} is true:
            if {boxpvp.playerProtectionLeft::%{_p}%} > 0:
                remove 1 from {boxpvp.playerProtectionLeft::%{_p}%}

            else:
                set {boxpvp.protection.protecting::%{_p}%} to false
                send {@protectionEndedMessage} to {_p}

            wait a second

        wait 10 second # lag çıkmasın diye 10, bunu düşürebilirsin istersen.

Düzeltilmiş hali.
bunu deniyorum hemen
 
sorun çıkmadı ama ben gene korumakapat yazdım koruman zaten kapalı dedi başa almadı
 
sorun çıkmadı ama ben gene korumakapat yazdım koruman zaten kapalı dedi başa almadı
Koruman yok çünkü. Koruma gelmesi için dünyaya ilk defa girmen gerekiyor. Bunun içinde "/boxpvpprotectionresetfirstjoin" komutuyla kendini için ilk defa giriş yapmış gibi gösterebilirsin.
 
kral /korumaaç diye bişi getirsen ama oplara özel olcak onu yazınca tüm herkezin koruması olcak yapabilirmisin
 
kral /korumaaç diye bişi getirsen ama oplara özel olcak onu yazınca tüm herkezin koruması olcak yapabilirmisin
Analamadım /korumaaç yazınca yazan kişiye mi koruma versin yoksa tüm oyunculara 1 saatlik bir koruma falan mı versin?
 
kral /boxpvpprotectionresetfirstjoin bunu yazıyorum ama hiçbişi olmuyor bunu yazınca bişi demesi gerekiyormu bende hiçbişi demiyor
 
Analamadım /korumaaç yazınca yazan kişiye mi koruma versin yoksa tüm oyunculara 1 saatlik bir koruma falan mı versin?
yani /korumaaç yazınca boxpvp dünyasındaki herkeze 2 saatlik koruma versin ama sadece op lar yapabilsin bunu /boxpvpprotectionresetfirstjoin bu komut bende çalışmıyor galiba
 
yani /korumaaç yazınca boxpvp dünyasındaki herkeze 2 saatlik koruma versin ama sadece op lar yapabilsin bunu /boxpvpprotectionresetfirstjoin bu komut bende çalışmıyor galiba
Bence şöyle yapalım, kullanıcı /korumakapat yazınca koruması durdurulsun. /korumaaç yazınca koruması devam ettirilsin. OP'ler için herkese koruma verme komutu istiyorsan onu da /korumaver <tam sayı> olarak yapabilirim.
 
ya istediği zaman koruması olması saçma olabilir adam eşyaları düşen biyerde korumasını açar kimse kesemez saçma olabilir ondan dolayı oplara özel /korumaver <tam sayı> derker "<tam sayı>" olayını anlamadım
 
Python:
options:
    protectionDuration: 120 # dakika cinsinden
    worldName: "boxpvpdünyaismi" # dünya ismi

    protectionEndedMessage: "&cKoruman bitti! Artık diğer oyuncular sana saldırabilir."



on world change:
    if event-world is {@worldName}:
        if {boxpvp.playerProtectionLeft::%player%} isn't set:
            set {boxpvp.playerProtectionLeft::%player%} to 0

        if {boxpvp.firstJoinProtectionGiven::%player%} isn't set:
            set {boxpvp.firstJoinProtectionGiven::%player%} to true

            set {boxpvp.protection.protecting::%player%} to true
            set {boxpvp.playerProtectionLeft::%player%} to {@protectionDuration} * 60

            wait 0.5 second

            set {_t} to {@protectionDuration} / 60

            send "&a%{_t}% saat boyunca PvP'lere karşı korunacaksın!" to player


on damage:
    if victim is a player:
        if attacker is a player:
            if world of victim is {@worldName}:
                if {boxpvp.protection.protecting::%attacker%} is true:
                    cancel event
                    
                    send "&cPvP koruman olduğu için saldırı yapamazsın!" to attacker
                    play sound "minecraft:item.shield.break" to attacker


                else if {boxpvp.protection.protecting::%victim%} is true:
                    cancel event
                    
                    send "&cBu oyuncu saldırılara karşı korunuyor!" to attacker
                    play sound "minecraft:item.shield.break" to attacker


on join:
    protectionHandler(player)



command /korumakapat:
    trigger:
        if {boxpvp.protection.protecting::%player%} is true:
            set {boxpvp.protection.protecting::%player%} to false
            send "&cKoruman başarıyla devre dışı bırakıldı!" to player
            play sound "entity.player.levelup" to player
        else:
            send "&cKoruman zaten aktif değil!" to player
            play sound "block.note_block.bass" at pitch 0.5 to player


command /korumaver <int>:
    permission: boxpvp.protection.giveProtection
    trigger:
        loop all players:
            add arg 1 to {boxpvp.playerProtectionLeft::%loop-player%}
            set {boxpvp.playerProtecting::%player%} to true


command /boxpvpprotectionresetfirstjoin:
    permission: op
    permission message: &cBu komuta iznin yok.
    trigger:
        delete {boxpvp.firstJoinProtectionGiven::%player%}




local function protectionHandler(p: player):
    while {_p} is online:
        while {boxpvp.protection.protecting::%{_p}%} is true:
            if {boxpvp.playerProtectionLeft::%{_p}%} > 0:
                remove 1 from {boxpvp.playerProtectionLeft::%{_p}%}

            else:
                set {boxpvp.protection.protecting::%{_p}%} to false
                send {@protectionEndedMessage} to {_p}

            wait a second

        wait 10 second # lag çıkmasın diye 10, bunu düşürebilirsin istersen.

Şunu dener misin? /korumaver <koruma süresi> komutuyla aktif olan tüm oyunculara istediğin dakika kadar koruma verebilirsin. dakika cinsinden yaz. Örn: /korumaver 5 ~ tüm oyunculara 5 dakikalık koruma verir.
 
kral yapabilirsen oplara özel yani /korumaver <isim> <nekadar koruma verceğin> bole olabilir
 
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