Solved Per world warps

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

lkstefqn

Member
Apr 16, 2025
4
0
1
Hi, i am trying to make per world warps skript but i think i need someone more experienced. This is what i've tried so far:


#
# /setwarp (name) - ADMIN
# /delwarp (name) - ADMIN
# /warp (name)
# /warplist
#

command: /warpset <text>:
permission: warp.setwarp
trigger:
set {warp::arg-1%} to player's location
send "New warp arg-1% created at player's location %player's location%!"

command: /warpdel <text>:
permission: warp.delwarp
trigger:
delete {warp::arg-1%}
send "warp %ark-1% deleted!"

command: /warp <text>:
trigger:
if {warp::arg-1%} is set in event-world "world":
teleport player to {warp::arg-1%} to location event-world "world"
send: "Warping to %arg-1%"
else:
send: "This warp does not exist."
 
Hey, ive fixed your code:
Code:
command /warpset <text>:
    permission: warp.setwarp
    trigger:
        set {warp::%arg-1%} to player's location
        send "New warp %arg-1% created at player's location %player's location%!" to player

command /warpdel <text>:
    permission: warp.delwarp
    trigger:
        delete {warp::%arg-1%}
        send "warp %arg-1% deleted!" to player

command /warp <text>:
    trigger:
        if {warp::%arg-1%} is set:
            teleport player to {warp::%arg-1%}
            send "Warping to %arg-1%" to player
        else:
            send "This warp does not exist." to player
 
Hey, ive fixed your code:
Code:
command /warpset <text>:
    permission: warp.setwarp
    trigger:
        set {warp::%arg-1%} to player's location
        send "New warp %arg-1% created at player's location %player's location%!" to player

command /warpdel <text>:
    permission: warp.delwarp
    trigger:
        delete {warp::%arg-1%}
        send "warp %arg-1% deleted!" to player

command /warp <text>:
    trigger:
        if {warp::%arg-1%} is set:
            teleport player to {warp::%arg-1%}
            send "Warping to %arg-1%" to player
        else:
            send "This warp does not exist." to player
awesome, however it's not per world but thank you for fixing the skript
 
What do you mean, the variable stores world in itself, it shouldnt be any problem
 
The solution:
Code:
command /warpset <text>:
    permission: warp.setwarp
    trigger:
        set {warp::%arg-1%::%world of player%} to player's location
        send "New warp %arg-1% created at player's location %player's location%!" to player

command /warpdel <text>:
    permission: warp.delwarp
    trigger:
        delete {warp::%arg-1%::%world of player%}
        send "warp %arg-1% deleted!" to player

command /warp <text>:
    trigger:
        if {warp::%arg-1%::%world of player%} is set:
            teleport player to {warp::%arg-1%::%world of player%}
            send "Warping to %arg-1%" to player
        else:
            send "This warp does not exist." to player