[SK] Combo 1vs1

xEndlessV2

Elmas Madencisi
En iyi cevaplar
0

Ufak bir uğraş sonucu kodladığım minik 1vs1 skripti,komutları ve envanteri değiştirerek istediğiniz 1vs1 türünü yaratabilirsiniz.
Oyuna girmeden önce oyuncunun envanterini kaydeder,oyun bittiğinde oyuncunun envanterini geri verir.
Çoklu arena desteği yoktur.

/setcombopawn1 = Oyun başladığında {_3}'ün spawnlanacağı yeri belirler.
/setcombospawn2 = Oyun başladığında {_4}'ün spawnlanacağı yeri belirler.
/combokatıl = Oyuncuyu beklemeye alır.
/comboçık = Sıradan çıkarır.
/debugcombo = Arena bugda kaldığında arenayı disable yaparak yeniden açar.

pro.admin = Spawnları belirlemek için gerekli perm.
0 = Arenayı disable yapmak (/debugcombo komutu) için gerekli perm.

Linki görebilmek için üye olmanız gerekiyor. Giriş yap veya üye ol.


Kod:
options:
    tag: &8[&bCombo&8]

variables:
    {combobekleme.%player%} = 0
command /setcombopawn1:
    permission: "pro.admin"
    trigger:
        set {combo1} to location of player
        message "{@tag} &6You have successfully set 1v1 spawn 1 !"
command /setcombospawn2:
    permission: "pro.admin"
    trigger:
        set {combo2} to location of player
        message "{@tag} &6You have successfully set 1v1 spawn 2 !"


        
on command:
    if {combooyunda.%player%} is true:
        if player doesn't have permission "op":
            cancel event
            send "{@tag} &6Savaştayken komut kullanamazsın!" to player
        
            
command /comboçık:
    trigger:
        if {combobekleme.%player%} is 1:
            send "{@tag} &6Sıradan çıktın!"
            set {combobekleme.%player%} to 0
            stop
        if {combobekleme.%player%} is 0:
            send "{@tag} &6Zaten sırada değilsin!"
            
command /combokatıl:
    trigger:
        if {1vs1builduhc::*} is set:
            send "&9BuildUHC sırasındayken Combo'ya giremezsin!" to player
            stop
            cancel event
        if {requesting.%player%} is 1:
            send "&91vs1 sırasındayken Combo'ya giremezsin!"
            stop
            cancel event
        if {combobekleme.%player%} is 1:
            cancel event
            send "{@tag} &6Zaten sıradasın!"
        else:
            send "{@tag} &6Sıraya girdin!" to player
            set {combobekleme.%player%} to 1
            loop all players:
                if {combobekleme.%loop-player%} is 1:
                    if loop-player is not player:
                        if {arenacombo} is false:
                            set {arenacombo} to true
                            set {_3} to loop-player
                            set {_4} to player
                            clear {combobekleme.%{_3}%}
                            clear {combobekleme.%{_4}%}
                            set {combooyunda.%{_3}%} to true
                            set {combooyunda.%{_4}%} to true
                            run executor command "/gamemode 0 %{_3}%" as op
                            run executor command "/gamemode 0 %{_4}%" as op
                            run {_3} command "/heal" as op
                            run {_4} command "/heal" as op
                            set {_count} to 0
                            loop 36 times:
                                set {inv.%{_3}%.%{_count}%.main} to slot {_count} of {_3}'s inventory
                                add 1 to {_count}
                            set {inv.%{_3}%.helmet.main} to {_3}'s helmet
                            set {inv.%{_3}%.chest.main} to {_3}'s chestplate
                            set {inv.%{_3}%.legs.main} to {_3}'s leggings
                            set {inv.%{_3}%.feet.main} to {_3}'s boots
                        
                            set {_count} to 0
                            loop 36 times:
                                set {inv.%{_4}%.%{_count}%.main} to slot {_count} of {_4}'s inventory
                                add 1 to {_count}
                            set {inv.%{_4}%.helmet.main} to {_4}'s helmet
                            set {inv.%{_4}%.chest.main} to {_4}'s chestplate
                            set {inv.%{_4}%.legs.main} to {_4}'s leggings
                            set {inv.%{_4}%.feet.main} to {_4}'s boots
                        
                            message "&7--------------------------------" to {_3}
                            message "{@tag} &6%{_4}% İle Kapışıyorsun!" to {_3}
                            message "&7--------------------------------" to {_3}
                            message "&7--------------------------------" to {_4}
                            message "{@tag} &6%{_3}% İle Kapışıyorsun!" to {_4}
                            message "&7--------------------------------" to {_4}
                            run executor command "/clear %{_3}%" as op
                            run executor command "/clear %{_4}%" as op
                            teleport {_3} to {combo1}

                            teleport {_4} to {combo2}

                            remove speed from {_3}
    
                            remove speed from {_4}

                            equip {_3} with all diamond armor of protection 4 and unbreaking 10
                            give 1 diamond sword of sharpness 2 and fire aspect 2 and unbreaking 10 to {_3}
                            give 64 enchanted golden apple to {_3}
                            give 1 potion of:8265 to {_3}
                            give 1 potion of:8290 to {_3}
                            give 1 potion of:8265 to {_3}

                            equip {_4} with all diamond armor of protection 4 and unbreaking 10
                            give 1 diamond sword of sharpness 2 and fire aspect 2 and unbreaking 10 to {_4}
                            give 64 enchanted golden apple to {_4}
                            give 1 potion of:8265 to {_4}
                            give 1 potion of:8290 to {_4}
                            give 1 potion of:8265 to {_4}

                            broadcast "{@tag} &b%{_3}% &7vs &b%{_4}%"
                            stop
                        else:
                            cancel event
                            send "{@tag} &6Arena Kullanılıyor, Daha Sonra Tekrar Dene!" to player
                            stop
                            
command /debugcombo:
    permission: 0
    trigger:
        set {arenacombo} to false

on join:
    if {combooyunda.%player%} is true:
        set {combooyunda.%player%} to false

on quit:
    clear {combobekleme.%player%}

on death:
    if {combooyunda.%victim%} is true:
        set {combooyunda.%victim%} to false
        set {combooyunda.%attacker%} to false
        teleport attacker to {spawn}
run attacker command "debugcombo" as op
        run attacker command "clear %attacker%" as op
        heal attacker
        remove speed from attacker
        remove speed from victim
        loop blocks within {tocopyfrom.pos1} to {tocopyfrom.pos2}:
            loop blocks within {tocopyto.pos1} to {tocopyto.pos2}:
                if {_copied.%location of loop-block-2%} isn't set:
                    set loop-block-2 to loop-block-1
                    set {_copied.%location of loop-block-2%} to true
                    exit loop
        
        set {_count} to 0
        loop 36 times:
            set slot {_count} of attacker's inventory to {inv.%attacker%.%{_count}%.main}
            add 1 to {_count}
        set the helmet of attacker to {inv.%attacker%.helmet.main}
        set the chestplate of attacker to {inv.%attacker%.chest.main}
        set the leggings of attacker to {inv.%attacker%.legs.main}
        set the boots of attacker to {inv.%attacker%.feet.main}
        
        set {_count} to 0
        loop 36 times:
            set slot {_count} of victim's inventory to {inv.%victim%.%{_count}%.main}
            add 1 to {_count}
        set the helmet of victim to {inv.%victim%.helmet.main}
        set the chestplate of victim to {inv.%victim%.chest.main}
        set the leggings of victim to {inv.%victim%.legs.main}
        set the boots of victim to {inv.%victim%.feet.main}
        broadcast "{@tag} &3%attacker% &4, &7%victim%'i &6acımasızca katletti!"
        give 2 diamond to attacker
        stop
        
on quit:
    if {combooyunda.%player%} is true:
        loop all players:
            if {combooyunda.%loop-player%} is true:
                teleport loop-player to {spawn}
                set {combooyunda.%loop-player%} to false
                run player command "/builduhctahtasil" as op
                clear loop-player's inventory
                run player command "/effect %player% clear" as op
                loop blocks within {tocopyfrom.pos1} to {tocopyfrom.pos2}:
                    loop blocks within {tocopyto.pos1} to {tocopyto.pos2}:
                        if {_copied.%location of loop-block-2%} isn't set:
                            set loop-block-2 to loop-block-1
                            set {_copied.%location of loop-block-2%} to true
                            exit loop
 
Son düzenleme:
Üst