#.

1 messages · Page 1 of 1 (latest)

kind silo
#

So

#

I dont understand how {Arena::%arg-1%,%player%::*} works in some places, but not the on death: thing.

#

Why doesnt it work there?

odd imp
#

arg-1 refers to the arguments given to a command. In a death event, there are no command arguments

command /duel [<player>] [<text>]:
               ^arg-1^    ^arg-2^```
kind silo
#

oh

#

but how would I make it work with the on death thing?

lofty nymph
#

%victim's uuid% %attacker's uuid%

kind silo
#

alright

#

thanks

#

let me try it out rq

#
on death:
    if {Duel::*} contains player:
        clear {Arena::%victim%,%attacker%::*}'s inventory
        spawn(victim)
        wait 2 seconds
        spawn(attacker)
        wait 1 seconds
        set blocks in radius 70 of location(200,0,{Arena::%victim%,%attacker%::*},"duels") where [input is not air] to air
dense sundial
#

You'd probably have to loop all where input isn't air and then set it to air

#

loop x:

#

set loop-value to air

kind silo
#

but it works...

odd imp
#

what are you setting those blocks to? you seem to be missing a "to dirt" or something

dense sundial
#

to air

#

is there

#

Try all blocks?

kind silo
#

wdym all blocks?

dense sundial
#

all blocks in radius ...

kind silo
#

ah

odd imp
#

Am i blind, or am I not seeing the "to air" line wrapping, nvm

kind silo
dense sundial
#

I can't send screenshots

#

uhhh

#

there

#

it's at the end of the line

kind silo
dense sundial
#

then try my looping stuff

#

that should work

kind silo
#

same error

on death:
    if {Duel::*} contains player:
        clear {Arena::%victim%,%attacker%::*}'s inventory
        spawn(victim)
        wait 2 seconds
        spawn(attacker)
        wait 1 seconds
        loop all blocks in radius 70 of location(200,0,{Arena::%victim%,%attacker%::*},"duels"):
            set loop-value to air
dense sundial
#

set a local var to the location

#

then loop all blocks in radius 70 around {_var} where []

kind silo
#
on death:
    if {Duel::*} contains player:
        clear {Arena::%victim%,%attacker%::*}'s inventory
        spawn(victim)
        wait 2 seconds
        spawn(attacker)
        wait 1 seconds
        set {_arena} to location(200,0,{Arena::%victim%,%attacker%::*},"duels")
        loop all blocks in radius 70 around {_arena}:
            set loop-value to air

Uhm

#

{Arena::%victim%,%attacker%::*} is currently set to 200.

dense sundial
#

You gave it a list

#

and it wanted 1 item

kind silo
#

ohhh

#

that should be a variable-

dense sundial
#

::* means the entire list

kind silo
#

jesus christ i am so dumb

dense sundial
#

lmao

kind silo
#
on death:
    if {Duel::*} contains player:
        clear {Arena::%victim%,%attacker%}'s inventory
        spawn(victim)
        wait 2 seconds
        spawn(attacker)
        wait 1 seconds
        set {_arena} to location(200,0,{Arena::%victim%,%attacker%},"duels")
        loop all blocks in radius 70 around {_arena}:
            set loop-value to air

So removing the ::* fixed the errors.

#

Let me test it our real quick.

kind silo
dense sundial
#

No need to ping

kind silo
#
command /duelaccept [<player>]:
    trigger:
        if arg-1 is not set:
            play sound "block.note_block.bass" at volume 0.75 and pitch 0.75 to player
            send "&7Please specify a player who has sent you a duel request." to player
        else:
            if {Request.%arg-1%.%player%} is set:
                broadcast "&c%player%"
                broadcast "&c%arg-1%"
                delete {Request.%arg-1%.%player%}

                add arg-1 to {Duel::%arg-1%,%player%::*}
                add player to {Duel::%arg-1%,%player%::*}

                paste schematic "plugins/FastAsyncWorldEdit/schematics/arena_japan.schem" at location(200,0,{testarena-z} + 200,"duels")
                add 200 to {testarena-z}

                delete {Arena::%arg-1%,%player%}
                set {testarena-z} to {Arena::%arg-1%,%player%}

                broadcast "&8%{Arena::%arg-1%,%player%}%"
                broadcast "&6%{Duel::%arg-1%,%player%::*}%"

                teleport {Duel::%arg-1%,%player%::*} to location(200,0,{Arena::%arg-1%,%player%},"duels")

                send "&7You accepted &b%arg-1%&7's duel request!%nl%Generating an arena for you." to player
                send "&b%player% &7accepted your duel request!%nl%Generating an arena for you." to arg-1
                broadcast "&a&l%{Duel::%arg-1%,%player%::*}%"

When I broadcast {Arena::%arg-1%,%player%} it just returns <none>...

dense sundial
#

You never set that'

#

If you're referring to the list, it's ::*

kind silo
#

wait.

dense sundial
#

If you're referring to a certain index, it's ::index

#

(replace index with whatever)

kind silo
#

its cause i set {testarena-z} to {Arena::%arg-1%,%player%}
my bad :|

dense sundial
#

Ok?