Paste #42455: Untitled Paste

Date: 2017/06/06 21:01:05 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20


lc_server_start_shutdown:
  type: world
  events:
    on server start:
    - flag server meta.start
    - if !<server.has_file[/loot/lc_saves.yml]> {
      - yaml create id:lt
      }
      else {
      - yaml "load:/loot/lc_saves.yml" id:lt
      }
    on shutdown:
    - yaml "savefile:/loot/lc_saves.yml" id:lt
    - foreach <server.flag[lt_savecycle].as_list||li@> {
      - yaml id:lt_<def[value]> set "inv.inv:!"
      - yaml id:lt_<def[value]> set "inv.inv:|:<def[value].inventory.list_contents>"
      - yaml id:lt_<def[value]> set "tp.loc:<def[value].location>"
      - yaml id:lt_<def[value]> "savefile:/loot/playerdata/<def[value]>.yml"
      }
    - flag server lt_savecycle:!