- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: EZ-Warps


By Seq
Created: 2015/12/06 16:30:12 UTC-08:00 (8 years and 148 days ago)
Edited: 2015/12/25 18:58:37 UTC-08:00 (8 years and 129 days ago)
Likes: 0

Staff pick as of: 2015/12/14 20:11:17 UTC-08:00 (8 years and 140 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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
12800

#*********************************************#
#((((((((((((((((((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 <&lt>name<&gt>
  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 <&lt>name<&gt>
  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