- 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
Date2016/10/27 14:28:52 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
4400
MakeYamlFolders:
  type: world
  debug: false
  events:
    on NLBlackEagleRealms command:
    - if <context.args.get[1]> == update {
      - flag <player> NLBlackEagleRealms:update duration:5s
      - foreach <server.list_files[../TerrainControl/Worlds]> {
        - yaml create id:<def[value]>
        - yaml 'savefile:../NLBlackEaglesRealm/Worlds/<def[value]>/config.yml' 'id:<def[value]>'
        }
      - run s@MakeYAMLfiles
      }
    on server prestart:
    - foreach <server.list_files[../TerrainControl/Worlds]> {
      - yaml create id:<def[value]>
      - yaml 'savefile:../NLBlackEaglesRealm/Worlds/<def[value]>/config.yml' 'id:<def[value]>'
      }
    - run s@MakeYAMLfiles

MakeYAMLfiles:
  type: task
  debug: true
  script:
  - foreach <server.list_files[../TerrainControl/Worlds]> {
    - define 1 <def[value]>
    - foreach <server.list_online_players> {
      - if <def[value].has_flag[NLBlackEagleRealms]> {
        - define 5 <def[value]>
        - flag <def[5]> NLBlackEagleRealms:!
        }
        - foreach <server.list_files[../TerrainControl/Worlds/<def[1]>/WorldBiomes]> {
          - if <server.has_file[../NLBlackEaglesRealm/Worlds/<def[1]>/<def[value]>.yml]> {
            - narrate "NLBlackEagleRealms already contains all current biomes." targets:<def[5]>
            }
            else if !<server.has_file[../NLBlackEaglesRealm/Worlds/<def[1]>/<def[value]>.yml]> {
            - yaml create id:<def[value]>
            - yaml 'savefile:../NLBlackEaglesRealm/Worlds/<def[1]>/<def[value].replace[.bc]>.yml' 'id:<def[value]>'
            - narrate "Biome<&co> <def[value].replace[.bc]> was added to world<&co> <def[1]>." targets:<def[5]>
            }
          }
        }
      }



RawRaw



Pastes made: 55651