- 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
Date2015/11/01 19:03:43 UTC-08:00
ByBlackCoyote
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
5600
prepareplot:
  type: task
  debug: false
  script:
    - if <yaml.list> !contains GUILDSAVES {
      - yaml id:GUILDSAVES create
      }
    - yaml id:GUILDSAVES set guilds.<player>.A_chunk:<yaml[GUILDSAVES].read[chunk_counter]||0>
    - yaml id:GUILDSAVES set chunk_counter:<yaml[GUILDSAVES].read[chunk_counter].add[32]||32>
    - flag <player> plot_is_preparing:true
    - if <yaml[GUILDSAVES].contains[guilds.<player>.A_chunk]> {
      - define start <yaml[GUILDSAVES].read[guilds.<player>.A_chunk]>
      } else {
      - announce to_ops "<&c>Could not find secure location to paste plot for <player.name>!"
      - narrate "<&c>Something went wrong! Please contact an administrator."
      - flag "error:->:ran prepareplot with no A_chunk"
      - queue clear
      }
    - if <def[2]||none> != force {
      - define begincheck l@<yaml[GUILDSAVES].read[guilds.<player>.A_chunk].mul[16]>,0,0,guildworld
      - if <def[begincheck].highest.y> == 209 {
        - announce to_ops "SUSPICIOUS BLOCK HEIGHT DETECTED! maybe we tried pasting a new plot on an existing one?"
        - flag "error:->:A_chunk highest block coordinate matched that of a plot"
        - narrate "<&c>Something went wrong! Please contact an administrator."
        - queue clear
        }
      }
    - announce to_ops "preparing plot for <player.name> at %start%"
    - narrate "<&c>Your guild plot is being prepared."
    - flag is_preparing
    - repeat 32 {
      - define x %value%
      - repeat 32 {
        - define z %value%
        - schematic load name:%x%_%z%
        - schematic paste name:%x%_%z% l@<def[start].add[%x%].sub[1].mul[16]||0>,0,<def[z].sub[1].mul[16]||0>,guildworld delayed
        - schematic unload name:%x%_%z%
        - wait 2t
        }
      - while <server.recent_tps.get[1].is[LESS].than[18]> {
        - wait 2s
        }
      - if <def[x].mul[3]> == 24 {
        - if <player.is_online> narrate "<&a>Your guild plot is at 25%."
        - announce to_ops "<&a><player.name>'s guild plot is at 25%."
        } else if <def[x].mul[3]> == 51 {
        - if <player.is_online> narrate "<&a>Your guild plot is at 50%."
        - announce to_ops "<&a><player.name>'s guild plot is at 50%."
        } else if <def[x].mul[3]> == 75 {
        - if <player.is_online> narrate "<&a>Your guild plot is at 75%."
        - announce to_ops "<&a><player.name>'s guild plot is at 75%."
        }
      }
    - narrate "<&c>Your guild plot is now ready for use!"
    - flag <player> plot_is_preparing:!



RawRaw



Pastes made: 67065