- 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


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2020/03/20 15:44:03 UTC-07:00
ByGuest
Other
Paste
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
8500
Holographic Titles:
  type: command
  debug: true
  name: holotitles
  description: Used to create holographic titles in the world.
  usage: /holotitles <&lb>create/remove/move/list<&rb> <&lb>title<&rb> <&lb>text<&rb>
  aliases:
  - holo
  - ht
  permission: holotitles
  permission message<&e>Type /help for a list of commands.
  allowed help:
  - determine <player.in_group[admin]||<context.server>>
  tab complete:
  - if !<player.in_group[admin]||<context.server>>:
    - stop
  - determine <server.list_online_players.parse[name].include[create|remove|move|list].filter[starts_with[<context.args.last||>]]>
  script:
  - if !<player.in_group[admin]||<context.server>>:
    - narrate "<&e>Type /help for a list of commands."
    - stop
  - choose "<context.args.get[1]>":
    - case "create":
      - define title <context.args.get[2]||null>
      - define text <context.args.get[3]||null>
      - if <[title]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo create [title] [text]"
        - stop
      - else if <[text]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for text. <&nl><&b>Proper format<&co> <&7>/holo create [title] [text]"
        - stop
      - else:
        - define textString <context.raw_args.after[<context.args.get[2]>].trim.parse_color>
        - spawn "armor_stand[custom_name_visible=true;custom_name=<[textString]>;gravity=false;visible=false]" <player.location.center.sub[0,1,0]> save:standTitle
        - yaml id:holotitles_list set <player.world.name>.<[title]>.location:<entry[standTitle].spawned_entities.get[1].location>
        - yaml id:holotitles_list set <player.world.name>.<[title]>.entityName:<entry[standTitle].spawned_entities.get[1]>
        - yaml id:holotitles_list set <player.world.name>.<[title]>.text:<[textString]>
        - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list
        - narrate "<&9>Holotitles<&co> <&e>Holo title <[title]> created at <player.location.center.sub[0,1,0].xyz.replace[,].with[, ]>."
    - case "remove":
      - define title <context.args.get[2]||null>
      - if <[title]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo remove [title]"
        - stop
      - else:
        - remove <yaml[holotitles_list].read[<player.world.name>.<[title]>.entityName]>
        - wait 1t
        - yaml id:holotitles_list set <player.world.name>.<[title]>:!
        - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list
    - case "move":
      - define title <context.args.get[2]||null>
      - define moveX <context.args.get[3]||null>
      - define moveY <context.args.get[4]||null>
      - define moveZ <context.args.get[5]||null>
      - if <[title]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]"
        - stop
      - else if <[moveX]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]"
        - stop
      - else if <[moveY]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]"
        - stop
      - else if <[moveZ]> == null:
        - narrate "<&9>Holotitles<&co> <&c>No value entered for title. <&nl><&b>Proper format<&co> <&7>/holo move [title] [X] [Y] [Z]"
        - stop
      - else:
        - define entityID <yaml[holotitles_list].read[<player.world.name>.<[title]>.entityName]>
        - teleport <[entityID]> <[entityID].location.add[<[moveX]>,<[moveY]>,<[moveZ]>]>
        - yaml id:holotitles_list set <player.world.name>.<[title]>.location:<[entityID].location>
        - yaml "savefile:/yml_saves/holotitles_list.yml" id:holotitles_list
    - case "list":
      - narrate List
    - case "help":
      - narrate Help
    - default:
      - narrate "<&c>Invalid sub-command! Type /holo help for a list of commands."

holotitles_load:
  type: world
  debug: false
  events:
    on server start:
    - yaml "load:/yml_saves/holotitles_list.yml" id:holotitles_list



RawRaw



Pastes made: 70269