prepareplot: type: task debug: false script: - if !contains GUILDSAVES { - yaml id:GUILDSAVES create } - yaml id:GUILDSAVES set guilds..A_chunk: - yaml id:GUILDSAVES set chunk_counter: - flag plot_is_preparing:true - if .A_chunk]> { - define start .A_chunk]> } else { - announce to_ops "<&c>Could not find secure location to paste plot for !" - narrate "<&c>Something went wrong! Please contact an administrator." - flag "error:->:ran prepareplot with no A_chunk" - queue clear } - if != force { - define begincheck l@.A_chunk].mul[16]>,0,0,guildworld - if == 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 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@,0,,guildworld delayed - schematic unload name:%x%_%z% - wait 2t } - while { - wait 2s } - if == 24 { - if narrate "<&a>Your guild plot is at 25%." - announce to_ops "<&a>'s guild plot is at 25%." } else if == 51 { - if narrate "<&a>Your guild plot is at 50%." - announce to_ops "<&a>'s guild plot is at 50%." } else if == 75 { - if narrate "<&a>Your guild plot is at 75%." - announce to_ops "<&a>'s guild plot is at 75%." } } - narrate "<&c>Your guild plot is now ready for use!" - flag plot_is_preparing:!