1vs 1 code help with reset arena

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Feb 24, 2017
191
7
0
foroendertheth.foroactivo.com
whend You see #help there are the lines i need help
code_language.skript:
options:
    logo: &9&l<&b&lEnder&a&lTheth&9&l>
    logo1: &7&l<&a&lP&9&lv&a&lP&7&l>&e
    clear: execute console command "/clear %player%"
on load:
    set {duelo.pvp1} to false
command /duelo [<player>]:
    aliases: /duel
    trigger:
        if player is in "pvp":
            if arg 1 is set:
                if arg 1 is "%player%":
                    send "{@logo1} No pude retar a ti mismo o aceptar"
                else:
                    if {duelo.no%player%} is true:
                        send "{@logo1}Espera 10 segundos"
                    else if {duelo%arg 1%} is set:
                        send "{@logo1}%arg 1% esta en un duelo"
                    else if {duelo%arg 1%%player%} is true:
                        execute console command "/cduelo %player% %arg 1% %{duelo.kit usando.%arg 1%}%"
                    else:
                        send "{@logo1}%player% Te reta a un duelo" to arg 1
                        send "{@logo1}Con kit %{duelo.kit usando.%player%}%" to arg 1
                        send "{@logo1}/duelo %player% para aceptar" to arg 1
                        send "{@logo1}Retastes a %arg 1% con kit %{duelo.kit usando.%player%}%"
                        set {duelo%player%%arg 1%} to true
                        wait 10 second
                        delete {duelo%player%%arg 1%}
            else if arg 1 is not set:
                send "{@logo1}/duelo <jugador>&7-&3Para Retar"                                     
        else:
            send "{@logo}No estas en pvp"
command /aduelo [<text>] [<text>] [<text>] [<text>]:
    trigger:
        if {op.%player%} is true:
            if arg 1 is "set":
                if arg 2 is "spawn":
                    set {duelo.spawn} to the player's location
                    send "{@logo1}spawn de pvp puesto"
            if arg 1 is "arena":
                if arg 2 is "set":
                    if arg 4 is set:
                        if arg 3 is "p1":
                            send "{@logo}p1 puesto"
                            set {duelo.1.%arg 4%} to the player's location
                        if arg 3 is "p2":
                            send "{@logo}P2 puesto"
                            set {duelo.2.%arg 4%} to the player's location
                        else:
                            send "{@logo1}/aduelo arena set p1/p2 nombre-arena"
                    else:
                        send "{@logo1}/aduelo arena set p1/p2 nombre-arena"       
            else:
                send "{@logo1}/aduelo arena set p1/p2 nombre-arena"
command /cduelo <player> <player> <text>:#may be can be better
    permission: op
    permission message: {@logo} Este es un comando para la consola. Te acomoda en la arena
    trigger:
        if {duelo.pvp1} is false:
            teleport the arg 1 to {duelo.2.pvp1}
            teleport the arg 2 to {duelo.1.pvp1}
            set {duelo%arg 1%} to true
            set {duelo%arg 2%} to true
            set {duelo.pvp1} to true
            set {duelo%arg 1%.pvp1} to true
            set {duelo%arg 2%.pvp1} to true
            add arg 1 to {pvp1::*}
            add arg 2 to {pvp1::*}
            execute console command "/clear %arg 1%"
            execute console command "/clear %arg 2%"
            if arg 3 is "gapple":
                loop {kit.gapple::*}:
                    add loop-value to the arg 1's inventory
                    add loop-value to the arg 2's inventory
            else if arg 3 is "pyro":
                loop {kit.pyro::*}:
                    add loop-value to the arg 1's inventory
                    add loop-value to the arg 2's inventory
        else:
            send "{@logo1}Todas las arenas estan llenas :("
command /spawn:
    trigger:
        stop
on command "/spawn":
    if player is in "pvp":
        if {duelo%player%} is true:
            send "{@logo1}Estas en un duelo"
        else:
            send "{@logo1}Teletransportado al spawn"
            teleport the player to {duelo.spawn}
on quit:#help
    if {duelo%player%.pvp1} is true:
        delete {duelo%player%.pvp1}
        set {duelo.pvp1} to false
        remove player from {pvp1::*}
        send "{@logo}%player% se desconecto tu ganastes" to {pvp1::*}
        teleport {pvp1::*} to {duelo.spawn}
        delete {duelo%player%}
        delete {pvp1::*}
on death of a player:#help
    if {duelo%victim%.pvp1} is true:
        delete {duelo%victim%.pvp1}
        set {duelo.pvp1} to false
        delete {pvp1::*}
        send "{@logo}Matastes a %victim% ganastes" to attacker
        teleport attacker to {duelo.spawn}
        delete {duelo%victim%}
        delete {duelo%attacker%}
        delete {duelo%attacker%.pvp1}
on place of lava:
    player is in "pvp":
        wait a tick
        remove 1 bucket from the player
        wait 3 second
        give 1 lava bucket to the player
        set event-block to air
on place:
    player is in "pvp":
        wait 5 second
        set event-block to air
on rightclick:
    player is in world "pvp":
        if player is holding a gold sword:
            send "{@logo1}/Duelo <jugador>"
        if player is holding a chest:
            open chest with 4 rows named "&cKits" to the player
            wait 0.4 second
            format slot 0 of the player with a golden apple named "&6Gapple" to run [set {duelo.kit usando.%player%} to "gapple"]
            format slot 1 of the player with a lava bucket named "&cPyro" to run [set {duelo.kit usando.%player%} to "pyro"]
command /addkit <text>:
    trigger:
        if {op.%player%} is true:
            loop all items in the player's inventory:
                add loop-item to {kit.%arg 1%::*}
 
Status
Not open for further replies.