Locations and coordinates/teleport

  • 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.

Congraz

Member
Oct 26, 2018
45
0
0
22
Hallo!

I'm having trouble with scripts. Some Locations and Coordinates / Teleport Scripts that I've been using. Would like a parkour that I have made can be put on some specific coordinates. So the blocks are being set at the coordinates. So when you write / event parkour the blocks will be put. After 5 minutes they will be removed again.
It is a parkour with many blocks, so i hope that if i can right click with a string and then the coordinates will be add.
Hope you can help.
--
on right click holding a string:
set location of {pot.middle1} of player
if {pot.middle1} is set:
set location of {potmiddle2} of player

command /event parkour:
trigger:
set block at location at {pot.middle1} of stone
wait 1 seconds
set block at location at {pot.middle2} of stone
[doublepost=1540751439,1540741388][/doublepost]Please help
I Really need!
[doublepost=1540809770][/doublepost]Please can someone please answer! I really need this!
 
I am unsure that I understand you fully but I am posting this to help you.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player

on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            if {pot.spamprevent} is not set:
                set {pot.spamprevent} to true
            loop {pot.middle::*}:
                set block at loop-value to stone
                wait 1 second
            wait 5 minutes
            if {pot.spamprevent} is set:
                loop {pot.middle::*}:
                    set block at loop-value to air
                    wait 1 second
            delete {pot.spamprevent}
Please be aware that this code is not tested and you must do this on a test server to see if it works. Poke me if you need further assistance.
 
I am unsure that I understand you fully but I am posting this to help you.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player

on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            if {pot.spamprevent} is not set:
                set {pot.spamprevent} to true
            loop {pot.middle::*}:
                set block at loop-value to stone
                wait 1 second
            wait 5 minutes
            if {pot.spamprevent} is set:
                loop {pot.middle::*}:
                    set block at loop-value to air
                    wait 1 second
            delete {pot.spamprevent}
Please be aware that this code is not tested and you must do this on a test server to see if it works. Poke me if you need further assistance.
Hallo Andalmere, and thanks for support. Ehem the scripts is working, but not the way i want it exacly. Ehmm i want it to. When i right click with string i add a location to the block i right click at. And there is like 44 blocks i need to do it with, but i can only with 1 here. I need to do it with more block, if that is possible. And then if i write /event parkour then the block spawn at the locations, and when the 5 minuts is over the blocks will automatic remove themself, and restor the same places again after 10 minuts.

I really appreciate your support and help!
Please if you can help me with this, that could be cool (;!
Sorry for my english.
 
Hallo Andalmere, and thanks for support. Ehem the scripts is working, but not the way i want it exacly. Ehmm i want it to. When i right click with string i add a location to the block i right click at. And there is like 44 blocks i need to do it with, but i can only with 1 here. I need to do it with more block, if that is possible. And then if i write /event parkour then the block spawn at the locations, and when the 5 minuts is over the blocks will automatic remove themself, and restor the same places again after 10 minuts.

I really appreciate your support and help!
Please if you can help me with this, that could be cool (;!
Sorry for my english.
You can right click as many blocks as you can with my code. Anyways I changed the code according to your likings and this is what it looks like right now.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
       
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour(terawevawevweav)
       
on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour(terawevawevweav)
Again, the code is not tested and feel free to modify it. Also, it may require addons so make sure to download those.
 
You can right click as many blocks as you can with my code. Anyways I changed the code according to your likings and this is what it looks like right now.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
      
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour(terawevawevweav)
      
on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour(terawevawevweav)
Again, the code is not tested and feel free to modify it. Also, it may require addons so make sure to download those.
Hallo again! and thanks for support once more! Ehmm but there was 2 fail ):
upload_2018-10-30_16-56-1.png
 
Thanks for support everyone and help!

But there is still a issue/fail with this skript. When you add a location you can still only add 1 location where the block is going to spawn, i need it too add more then 1 block. And when i right click with the string then it add the players location, I need it to add the location of the block i right click at.
Once more, thanks for fast support, really nice!
 
Thanks for support everyone and help!

But there is still a issue/fail with this skript. When you add a location you can still only add 1 location where the block is going to spawn, i need it too add more then 1 block. And when i right click with the string then it add the players location, I need it to add the location of the block i right click at.
Once more, thanks for fast support, really nice!
I fixed that error from your screenshot and I added "stop" at line 8. Make sure to use "/event reset" without the quotes before trying this code again.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
      
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
      
on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"
 
I fixed that error from your screenshot and I added "stop" at line 8. Make sure to use "/event reset" without the quotes before trying this code again.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
    
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
    
on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"
I fixed that error from your screenshot and I added "stop" at line 8. Make sure to use "/event reset" without the quotes before trying this code again.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
    
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
    
on command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"

Hallo and thanks for help again!

Bit it is still not working, when i set a location with the string, its only add 1 location, always the last location i set.
[doublepost=1540992114,1540991982][/doublepost]
Hallo and thanks for help again!

Bit it is still not working, when i set a location with the string, its only add 1 location, always the last location i set.
And 1 more thing, when i /sk reload events, then it is saying that it cant read "on command line 28" So i remove "on" so it was only command /event [<text>] [<text>]" i dont know if that is the reason o:
 
Hallo and thanks for help again!

Bit it is still not working, when i set a location with the string, its only add 1 location, always the last location i set.
[doublepost=1540992114,1540991982][/doublepost]
And 1 more thing, when i /sk reload events, then it is saying that it cant read "on command line 28" So i remove "on" so it was only command /event [<text>] [<text>]" i dont know if that is the reason o:
Lmao silly me sorry. I think this will now work.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
        add 1 to {pot.tempvar}
    
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
    
command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"
Just repeat the method above :emoji_slight_smile:
 
Lmao silly me sorry. I think this will now work.
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if loop-value is set:
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
        add 1 to {pot.tempvar}
   
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
   
command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"
Just repeat the method above :emoji_slight_smile:
It dont know what i shald repeat above, and not o: So i can have more blocks

And thanks for help again
 
Do /event reset, then try to add more blocks now using a string.
Hallo again!

Ehm when i do it, the first is okay but if i right click at the next block, then it says "Deleted coordinate" and if i click again it says add, and if i /event parkour then it still only set 1 block at the last location i set.

Again thanks for support and help!
 
Hallo again!

Ehm when i do it, the first is okay but if i right click at the next block, then it says "Deleted coordinate" and if i click again it says add, and if i /event parkour then it still only set 1 block at the last location i set.

Again thanks for support and help!
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if "%loop-value%" is "%location at event-block%":
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
        add 1 to {pot.tempvar}
  
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
  
command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"
Do the /event reset and add blocks again.
 
code_language.skript:
on right click holding a string:
    if {pot.tempvar} is not set:
        set {pot.tempvar} to 1
    loop {pot.middle::*}:
        if "%loop-value%" is "%location at event-block%":
            delete {pot.middle::%loop-index%}
            send "&cSuccessfully removed the block from the parkour."
            stop
    if {pot.middle::%{pot.tempvar}%} is not set:
        set {pot.middle::%{pot.tempvar}%} to location of player
        send "&aSuccessfully added the block from the parkour."
        add 1 to {pot.tempvar}
 
function parkour(t: text):
    if {pot.spamprevent} is not set:
        set {pot.spamprevent} to true
    loop {pot.middle::*}:
        set block at loop-value to stone
        wait 1 second
    wait 5 minutes
    if {pot.spamprevent} is set:
        loop {pot.middle::*}:
            set block at loop-value to air
            wait 1 second
    wait 10 minutes
    if {pot.spamprevent} is set:
        parkour("terawevawevweav")
 
command /event [<text>] [<text>]:
    trigger:
        if arg-1 is "parkour":
            if arg-2 is "stop":
                delete {pot.spamprevent}
                send "The parkour event has ended."
                stop
            if {pot.spamprevent} is set:
                send "Please don't spam /event parkour"
                stop
            parkour("terawevawevweav")
        if arg-1 is "reset":
            delete {pot.tempvar}
            delete {pot.middle::*}
            delete {pot.spamprevent}
            send "Try to do it again and see if it works Congraz :)"
Do the /event reset and add blocks again.
Thanks for help again, and its working exacly what i want it to do, but there is a litte problem. Ehmm in the parkour we have more diffrence blocks, like ladder, and slap. Is it possible to add difrence blocks to the event
 
Status
Not open for further replies.