Solved How to edit skript clicked block to coordinates x,y,z

  • 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 comminuty!

    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.

VOIDDER

Member
Aug 23, 2018
27
0
1
33
I use skript Area Manager. But me needed set {zPOS1} and {zPOS2} need to specify the coordinates x,y,z
code_language.skript:
#EVENT

on left click:
    if player's tool is diamond hoe named "&f[&bArea Manager&f]":
        cancel event
        set {zPOS1} to location of clicked block
        send "&bPos1:&f %{zPOS1}%" to player
        stop
     
on right click:
    if player's tool is diamond hoe named "&f[&bArea Manager&f]":
        cancel event
        set {zPOS2} to location of clicked block
        send "&bPos2:&f %{zPOS2}%" to player
        stop
It is necessary for the action:

code_language.skript:
on death:
    if name of victim is "&6Skeleton King":
        broadcast "+"
        set {x.cord} to victim's x-coordinate
        set {y.cord} to victim's y-coordinate
        set {z.cord} to victim's z-coordinate
        broadcast "%{x.cord}%,%{y.cord}%,%{z.cord}%"
        set {zPOS1} to location ({x.cord},{y.cord},{z.cord})
        set {zPOS2} to location ({x.cord},{y.cord},{z.cord})
        broadcast "%{zPOS1}%,%{zPOS2}%"

but set not gived needed results...

Code:
[19:05:27 INFO]: +
[19:05:27 INFO]: 40.57,195,189.12
[19:05:27 INFO]: x: -0.5, y: 69.5, z: -1.5,x: 14.5, y: 67.5, z: -16.5 >

PLZ help!
 
Last edited:
Im quite confused by this.
What is the outcome you are looking to get?
1. named entity death
2. selected {zPOS1} in (x-coordinate)-5, (y-coordinate)-5, (z-coordinate)-5
3. select {zPOS2} in (x-coordinate)+5, (y-coordinate)+5, (z-coordinate)+5
4. define region(world guard)
5. region create(Area Manager)
then a battle in the region(world guard)
then regeneration of the region(Area Manager)
then delete regions(Area Manager and world guard)

But I do not understand how to change the location of the clicked block
[doublepost=1535258971,1535230603][/doublepost]Me needed help to:
How to replace clicked block to x,y,z coordinates...
 
You want to replace a block at specified coordinates?
Like this?
code_language.skript:
command /test:
    trigger:
        set {_location} to location(1, 1, 1, world "myworld")
        set block at {_location} to dirt
 
You want to replace a block at specified coordinates?
Like this?
code_language.skript:
command /test:
    trigger:
        set {_location} to location(1, 1, 1, world "myworld")
        set block at {_location} to dirt

Thank it's work! I wrond and write location (), but needed location() XD
 
Status
Not open for further replies.