Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This skript was written by Fleft with inspiration from other bigcrack skripts.
- options:
- P: &7[&bBigcrack&7]&r
- Start1: &e%command sender%&r in &e%arg-3%:&r Radius: &b%arg-1%&r | Width: &b%arg-2%
- Start2: Get away from the Bigcrack! Your game may crash!
- Cancel: Crack generation cancelled by &e%{Bigcrack::Cancel}%!
- Cancelling: Cancelling Bigcrack generation!
- Message.Delay: 2 seconds
- command /bigcrack <text> [<integer>] [<world>]:
- usage: /bigcrack <map radius> <crack radius> <world> | /bigcrack cancel
- permission: skript.bigcrack
- trigger:
- if arg-1 is "cancel":
- if {Bigcrack::Running} is true:
- set {Bigcrack::Cancel} to true
- stop trigger
- else:
- message "{@P} No generation is in progress!"
- stop trigger
- if arg-1 is set:
- if arg-2 is not set:
- message "{@P} /bigcrack <map radius> <crack radius> <world>"
- stop trigger
- broadcast "{@P} {@Start1}"
- broadcast "{@P} {@Start2}"
- set {Bigcrack::Running} to true
- set {Bigcrack::MapRadius} to arg-1 parsed as integer
- set {Bigcrack::CrackRadius} to arg-2
- set {Bigcrack::World} to arg-3
- set {Bigcrack::TotalSlice} to 0
- set {Bigcrack::Slice} to 0
- if {Bigcrack::MapRadius} is less than 250:
- set {Bigcrack::Buffer} to 8
- else if {Bigcrack::MapRadius} is less than 500:
- set {Bigcrack::Buffer} to 4
- else if {Bigcrack::MapRadius} is less than 1000:
- set {Bigcrack::Buffer} to 2
- else:
- set {Bigcrack::Buffer} to 1
- wait 5 ticks
- set {Bigcrack::Tick} to now
- set {Bigcrack::Notify} to now
- loop 256 times:
- if {Bigcrack::Cancel} is set:
- set {Bigcrack::Cancel} to (name of command sender)
- message "{@P} {@Cancelling}"
- broadcast "{@P} {@Cancel}"
- delete {Bigcrack::*}
- stop trigger
- loop blocks from (block at (the location at ({Bigcrack::MapRadius}-0.5), (256-(loop-number)), ({Bigcrack::CrackRadius}-0.5) of the world {Bigcrack::World})) to (block at (the location at ({Bigcrack::MapRadius}-0.5), (256-(loop-number)), (0-{Bigcrack::CrackRadius}+0.5) of the world {Bigcrack::World})):
- loop blocks from loop-block-1 to (block (({Bigcrack::MapRadius}*2)-1) west of loop-block-1):
- set loop-block-2 to air
- add 1 to {Bigcrack::Slice}
- if {Bigcrack::Slice} is equal to {Bigcrack::Buffer}:
- add {Bigcrack::Slice} to {Bigcrack::TotalSlice}
- set {Bigcrack::Slice} to 0
- if {Bigcrack::Notify} was more than {@Message.Delay} ago:
- set {Bigcrack::Notify} to now
- broadcast "{@P} Progress: &eSlice %(loop-number)%/256"
- wait 1 tick
- broadcast "{@P} Crack generation finished!"
- delete {Bigcrack::*}
- on physics:
- {Bigcrack::Running} is true:
- cancel the event
Add Comment
Please, Sign In to add comment