Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- # General
- P: [Moved-00]
- C: &f
- H: &9
- # Setwalls
- WallBlocks: bedrock
- # Scatter
- SP: [&7M00Scatter&f]
- ScatterWaitTicks: 1
- ChunkWaitTicks: 10
- MaxTries: 1001
- command /m00 <text> [<integer>] [<world>]:
- permission: skript.M00
- trigger:
- if arg-1 is "set":
- if arg-2 is set:
- if arg-3 is set:
- delete {M00::*}
- set {_X} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
- set {_Z} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
- while difference between {_X} and 0 is less than (arg-2):
- set {_X} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
- while difference between {_Z} and 0 is less than (arg-2):
- set {_Z} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
- set {_Coords} to location at ({_X}, 255, {_Z}) of the world (arg-3)
- while block at {_Coords} is air:
- set {_Coords} to location 1 below {_Coords}
- set {M00::Radius} to arg-2
- set {M00::World} to arg-3
- set {M00::Coords} to {_Coords}
- set {M00::X} to {_X}
- set {M00::Z} to {_Z}
- broadcast "{@P}{@C} Moved 0,0 coords generated!"
- broadcast "{@P}{@C} &aAuto-setting worldborder! (with console)"
- execute console command "/wb %arg-3% set %arg-2% %arg-2% %{_X}% %{_Z}%"
- broadcast "{@P}{@C} Now use /wb <world> fill <speed: optional>!"
- else:
- message "/m00 set <radius> <world>"
- else:
- message "/m00 set <radius> <world>"
- else if arg-1 is "clear" or "reset":
- delete {M00::*}
- broadcast "{@P}{@C} Moved 0,0 coords deleted!"
- else if arg-1 is "view":
- if {M00::Coords} is set:
- message "{@P}{@C} %{M00::Coords}% &9&l|&f Radius %{M00::Radius}% &9&l|&f World %{M00::World}%"
- else:
- message "{@P}{@C} No M00 coords not set! /m00 set <radius> <world>"
- else if arg-1 is "bc" or "broadcast" or "announce":
- if {M00::Coords} is set:
- broadcast "&4&lMeetup coords are: &f&l%{M00::Coords}%"
- else:
- message "{@P}{@C} No M00 coords not set! /m00 set <radius> <world>"
- command /m00walls:
- permission: skript.m00walls
- trigger:
- if {M00::*} is not set:
- broadcast "&4&lERROR:&c Moved 0,0 coords not set!"
- broadcast "&a/m00 set <radius> <world>"
- command "/playsound random.break %command sender%"
- stop trigger
- if command sender is player:
- set {_Timer} to now
- set {_BC} to now
- set {_X} to {M00::X}
- set {_Z} to {M00::Z}
- set {_World} to {M00::World}
- set {_Radius} to {M00::Radius}
- set {_Center} to {M00::Coords}
- broadcast "{@P}{@H} %command sender%:{@C} Setting walls with radius"
- broadcast "{@P}{@H} %{M00::Radius}%{@C} in world {@H}""%{_World}%""!"
- message "&4&lDO NOT MOVE!"
- wait 10 ticks
- teleport command sender to spawn point of {_World}
- teleport command sender to location at {_Center}
- wait 10 ticks
- loop 2 times:
- command sender command "//pos%loop-number%"
- wait 1 tick
- command sender command "//expand vert"
- command sender command "//expand %{_Radius}% N"
- command sender command "//expand %{_Radius}% S"
- command sender command "//expand %{_Radius}% E"
- command sender command "//expand %{_Radius}% W"
- broadcast "{@P}{@C} Setting walls! Expect lag!"
- command sender command "//walls bedrock"
- else:
- broadcast "{@P}{@C} Console cannot use this command."
- stop trigger
- command /m00scatterall <integer>:
- description: Scatter command
- usage: /m00scatterall <mindist>
- permission: skript.m00scatter
- trigger:
- if {M00::*} is not set:
- broadcast "&4&lERROR:&c Moved 0,0 coords not set!"
- broadcast "&a/m00 set <radius> <world>"
- command "/playsound random.break %command sender%"
- stop trigger
- set {_X} to {M00::X}
- set {_Z} to {M00::Z}
- set {_Radius} to {M00::Radius}
- set {_World} to {M00::World}
- if (size of (all players)) is equal to 0:
- message "{@SP} Nobody online. Insert Sadface!"
- stop
- broadcast "{@SP} Attempt with radius &6%{M00::Radius}% &rand mindist. &6%arg-1%&r..."
- command "/aps note.harp"
- set {_Players::*} to all players
- set {_Size} to (size of {_Players::*})
- loop {_Size} times:
- loop {@MaxTries} times:
- if loop-number-2 is equal to {@MaxTries}:
- message "{@SP} Could not get position &7[&f%loop-number-1%&9/&f%{_Size}%&7]"
- command "/aps random.break"
- stop trigger
- set {_ThisLocation.Okay} to true
- set {_ThisLocation.Sky} to (the location at ((random integer between (({_X})-{_Radius}) and (({_X}-1))+0.5)+{_Radius}), 255, ((random integer between (({_Z})-{_Radius}) and (({_Z}-1))+0.5)+{_Radius}) of the world {_World})
- loop ((loop-number-1)-1) times:
- {_ThisLocation.Okay} is true
- distance between {_ThisLocation.Sky} and {_FinalLocation.Sky::%loop-number-3%} is less than (arg-1)
- delete {_ThisLocation.Okay}
- if {_ThisLocation.Okay} is true:
- set {_ThisLocation.Ground} to {_ThisLocation.Sky}
- while (block at {_ThisLocation.Ground}) is air:
- if y-coordinate of {_ThisLocation.Ground} is less than 4:
- delete {_ThisLocation.Okay}
- stop loop
- set {_ThisLocation.Ground} to location 1 below {_ThisLocation.Ground}
- if {_ThisLocation.Okay} is true:
- if (block at {_ThisLocation.Ground}) is lava, water or cactus:
- delete {_ThisLocation.Okay}
- if {_ThisLocation.Okay} is true:
- set {_FinalLocation.Sky::%loop-number-1%} to {_ThisLocation.Sky}
- set {_FinalLocation.Ground::%loop-number-1%} to (location 1 above {_ThisLocation.Ground})
- stop loop
- set {Scatter.DisableChunkUnloading} to true
- set {_ApproxTime} to {_Size}*{@ChunkWaitTicks}/20
- broadcast "{@SP} Operation will take approx. &4%{_ApproxTime}% seconds&r!"
- command "/aps fireworks.launch"
- loop {_Size} times:
- if command sender is not online:
- broadcast "{@SP} Operation failed, chunkloading player logged out."
- command "/aps random.break"
- stop trigger
- teleport (command sender) to {_FinalLocation.Ground::%loop-number%}
- message "{@SP} Loading Chunkset &7[&f%loop-number%&9/&f%{_Size}%&7]" to command sender
- wait {@ChunkWaitTicks} ticks
- broadcast "{@SP} &4All locations loaded."
- command "/aps random.explode"
- wait 40 ticks
- set {_Count} to 0
- loop {_Players::*}:
- increase {_Count} by 1
- if (loop-value) is not online:
- broadcast "{@SP} &cNot online: &7[&f%{_Count}%&9/&f%{_Size}%&7]&4 : &6%loop-value% &r- scheduling."
- set {ScatterScheduler::%loop-value%} to {_FinalLocation.Ground::%{_Count}%}
- else:
- teleport (loop-value) to {_FinalLocation.Ground::%{_Count}%}
- broadcast "{@SP} &7[&f%{_Count}%&9/&f%{_Size}%&7]&4 : &6%loop-value%"
- command "/aps note.bass"
- wait {@ScatterWaitTicks} tick
- broadcast "{@SP} &aAll players scattered."
- command "/aps mob.cow.say"
- delete {Scatter.DisableChunkUnloading}
- command /m00scatterteams <integer>:
- usage: /scatterteams <mindist>
- permission: skript.m00scatterteams
- trigger:
- if {M00::*} is not set:
- broadcast "&4&lERROR:&c Moved 0,0 coords not set!"
- broadcast "&a/m00 set <radius> <world>"
- command "/playsound random.break %command sender%"
- stop trigger
- set {_X} to {M00::X}
- set {_Z} to {M00::Z}
- set {_World} to {M00::World}
- set {_Count} to 0
- loop {Teams::*}:
- {Team.%loop-value%::*} is set
- increase {_Count} by 1
- add {_Count} to {_Scatter.Teams::*}
- set {_Scatter.Team.%{_Count}%::*} to {Team.%loop-value%::*}
- loop all players:
- {Teams.InTeam::%loop-player%} is not set
- add (name of loop-player) to {_Solos::*}
- broadcast "{@SP} Attempt with radius &6%{Moo::Radius}% &rand mindist. &6%arg-1%&r..."
- command "/aps note.harp"
- set {_Size} to ((size of {_Scatter.Teams::*})+(size of {_Solos::*}))
- # this is copied from the above scatter
- loop {_Size} times:
- loop {@MaxTries} times:
- if loop-number-2 is equal to {@MaxTries}:
- message "{@SP} Could not get position &7[&f%loop-number-1%&9/&f%{_Size}%&7]"
- command "/aps random.break"
- stop trigger
- set {_ThisLocation.Okay} to true
- set {_ThisLocation.Sky} to (the location at ((random integer between (0-{_X}) and ({_X}-1))+0.5), 255, ((random integer between (0-{_Z}) and ({_Z}-1))+0.5) of the world {_World})
- loop ((loop-number-1)-1) times:
- {_ThisLocation.Okay} is true
- distance between {_ThisLocation.Sky} and {_FinalLocation.Sky::%loop-number-3%} is less than (arg-1)
- delete {_ThisLocation.Okay}
- if {_ThisLocation.Okay} is true:
- set {_ThisLocation.Ground} to {_ThisLocation.Sky}
- while (block at {_ThisLocation.Ground}) is air:
- if y-coordinate of {_ThisLocation.Ground} is less than 4:
- delete {_ThisLocation.Okay}
- stop loop
- set {_ThisLocation.Ground} to location 1 below {_ThisLocation.Ground}
- if {_ThisLocation.Okay} is true:
- if (block at {_ThisLocation.Ground}) is lava, water or cactus:
- delete {_ThisLocation.Okay}
- if {_ThisLocation.Okay} is true:
- set {_FinalLocation.Sky::%loop-number-1%} to {_ThisLocation.Sky}
- set {_FinalLocation.Ground::%loop-number-1%} to (location 1 above {_ThisLocation.Ground})
- stop loop
- set {Scatter.DisableChunkUnloading} to true
- set {_ApproxTime} to {_Size}*{@ChunkWaitTicks}/20
- broadcast "{@SP} Positions found, pre-loading chunksets&r!"
- broadcast "{@SP} Operation will take approx. &4%{_ApproxTime}% seconds&r!"
- command "/aps fireworks.launch"
- loop {_Size} times:
- if command sender is not online:
- broadcast "{@SP} Operation failed, chunkloading player logged out."
- command "/aps random.break"
- stop trigger
- teleport (command sender) to {_FinalLocation.Ground::%loop-number%}
- message "{@SP} Loading Chunkset &7[&f%loop-number%&9/&f%{_Size}%&7]" to command sender
- wait {@ChunkWaitTicks} ticks
- broadcast "{@SP} &4All locations loaded."
- command "/aps random.explode"
- wait 40 ticks
- set {_TeamSize} to (size of {_Scatter.Teams::*})
- set {_SoloSize} to (size of {_Solos::*})
- set {_PositionCount} to 0
- set {_TeamCount} to 0
- set {_SoloCount} to 0
- loop {_Scatter.Teams::*}:
- increase {_PositionCount} by 1
- increase {_TeamCount} by 1
- broadcast "{@SP} &rScattering &4Team %{_TeamCount}%&r:"
- loop {_Scatter.Team.%loop-value%::*}:
- set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
- if {_Player} is not online:
- broadcast "{@SP} &b- &6&l%{_Player}%&r: §4Not online &b- §rscheduling."
- set {ScatterScheduler::%{_Player}%} to {_FinalLocation.Ground::%{_PositionCount}%}
- else:
- teleport {_Player} to {_FinalLocation.Ground::%{_PositionCount}%}
- broadcast "{@SP} &b- &6&l%{_Player}%&r: §aScattered!"
- command "/aps note.bass"
- wait {@ScatterWaitTicks} ticks
- broadcast "{@SP} &rScattering &5Solos&r!"
- loop {_Solos::*}:
- increase {_PositionCount} by 1
- increase {_SoloCount} by 1
- set {_Player} to ("%loop-value%" parsed as offlineplayer)
- if {_Player} is not online:
- broadcast "{@SP} &b- &6&l%{_Player}%&r: §4Not online &b- §rscheduling."
- set {ScatterScheduler::%{_Player}%} to {_FinalLocation.Ground::%{_PositionCount}%}
- else:
- teleport {_Player} to {_FinalLocation.Ground::%{_PositionCount}%}
- broadcast "{@SP} &b- &6&l%{_Player}%&r: §aScattered!"
- command "/aps note.bass"
- wait {@ScatterWaitTicks} ticks
- broadcast "{@SP} &aAll players scattered."
- command "/aps mob.cow.say"
- delete {Scatter.DisableChunkUnloading}
- on chunk unload:
- {Scatter.DisableChunkUnloading} is true
- cancel the event
- on skript start:
- delete {Scatter.DisableChunkUnloading}
- on join:
- {ScatterScheduler::%player%} is set
- teleport player to {ScatterScheduler::%player%}
- delete {ScatterScheduler::%player%}
- broadcast "{@SP} &aScheduled late-scatter of %player%."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement