Staff Pick: EZ-Warps
By
SeqCreated: 2015/12/06 16:30:12 UTC-08:00 (9 years and 18 days ago)
Edited: 2015/12/25 18:58:37 UTC-08:00 (8 years and 364 days ago)
Likes: 0
Staff pick as of: 2015/12/14 20:11:17 UTC-08:00 (9 years and 10 days ago)
Denizen Version: 0.9.7 (1604)
Script Version: 1.1
Description:
****************************
Set, delete and use warps. *
****************************
Installation:
- Place in scripts folder.
- Reload scripts.
==========================================
Permissions:
- warps.setwarp (Create new warps.)
- warps.delwarp (Delete existing warps.)
- warps.warp (Teleport to warps.)
Download script |
View raw script#*********************************************#
#((((((((((((((((((EZ-WARPS)))))))))))))))))))#
#*********************************************#
# Simple script to set, delete and use warps. #
###############################################
# Installation: #
# - Place in scripts folder. #
# - Reload scripts. #
#=============================================#
# Permissions: #
# - warps.setwarp (Create new warps.) #
# - warps.delwarp (Delete existing warps.) #
# - warps.warp (Teleport to warps.) #
#*********************************************#
#==============#
#---SETWARP----#
#==============#
setwarp_command:
type: command
debug: false
name: setwarp
aliases:
- createwarp
usage: /setwarp <<>name<>>
description: Set new warp or set new location if it exists already.
permission: warps.setwarp
allowed help:
- determine <player.has_permission[warps.setwarp]||<player.is_op>>
script:
- if <context.server> {
- announce to_console "<&c>This command is for players only."
- queue clear
}
- if <player.has_permission[warps.setwarp].not||true> {
- narrate "<&c>Sorry, you don't have permission to use this command."
- queue clear
}
- define Args <context.args>
- if <def[Args].size> == 0 {
- narrate "<&c>Please specify warp name!"
- queue clear
}
- flag server "warps.<context.raw_args>:<player.location.simple>"
- narrate "<&2>Warp added!"
#==============#
#---DELWARP----#
#==============#
delwarp_command:
type: command
debug: false
name: delwarp
aliases:
- remwarp
- rmwarp
usage: /delwarp <<>name<>>
description: Set new warp or set new location if it exists already.
permission: warps.delwarp
allowed help:
- determine <player.has_permission[warps.delwarp]||<player.is_op>>
script:
- if <context.server> {
- announce to_console "<&c>This command is for players only."
- queue clear
}
- if <player.has_permission[warps.delwarp].not||true> {
- narrate "<&c>Sorry, you don't have permission to use this command."
- queue clear
}
- define Args <context.args>
- if <def[Args].size> == 0 {
- narrate "<&c>Please specify warp name!"
- queue clear
}
- if <server.has_flag[warps.<context.raw_args>].not> {
- narrate "<&c>Sorry, <&e><&l><context.raw_args><&c> was not found!"
- queue clear
}
- flag server "warps.<context.raw_args>:!"
- narrate "<&2>Warp removed!"
#==============#
#-----WARP-----#
#==============#
warp_command:
type: command
debug: false
name: warp
aliases:
- warps
usage: /warp (warp name)
description: Teleport to specific warp if it exists or list warps.
permission: warps.warp
allowed help:
- determine <player.has_permission[warps.warp]||<player.is_op>>
script:
- if <context.server> {
- announce to_console "<&c>This command is for players only."
- queue clear
}
- if <player.has_permission[warps.warp].not||<player.is_op.not>> {
- narrate "<&c>Sorry, you don't have permission to use this command."
- queue clear
}
- define Args <context.args>
- if <def[Args].size> == 0 {
- narrate "<&6><&n>Warps"
- if <server.list_flags[warps].is_empty> {
- narrate "<&c>Warps have not been set!"
- queue clear
}
else {
- define WarpsList <server.list_flags[warps]>
- foreach <def[WarpsList].parse[after[warps.]]> {
- narrate "%value%"
}
}
}
else {
- if <server.has_flag[warps.<context.raw_args>].not> {
- narrate "<&c>Sorry, <&e><&l><context.raw_args><&c> was not found!"
- queue clear
}
- teleport <player> <server.flag[warps.<context.raw_args>]>
}
View History