Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Version 1.3.0
- #In order to download or use this software, you must agree to it's license: http://pastebin.com/raw.php?i=JGSLhFdU
- #Edit options and aliases to customise the skript
- options:
- rangeXZ : 100 #The distance on both horizontal axes in which puddles can form
- rangeY : 20 #The distance on the Y axes in which puddles can form
- #COMMENT FOR BELOW OPTION #The list of biomes that puddles cannot form in, make sure you have OR and not AND at the end
- disallowed biome : Desert, Desert Mountains, Desert Hills, Savanna, Savanna Mountains, Savanna Plateau, Savanna Plateau Mountains, Mesa, Mesa Bryce, Mesa Plateau, Mesa Plateau Mountains, Mesa Plateau forest, Mesa Plateau forest mountains, Cold Taiga, Cold Taiga Mountains, Cold Taiga Hills, Ice Plains, Ice Plains Spikes, Ice Mountains, Cold Beach, Frozen River, or hell
- aliases:
- #USE NUMERICAL BLOCK IDS FOR THIS LIST
- #
- #
- #
- #LANDONABLE-Blocks that puddles can land on
- #FALLTHROUGHABLE-Blacks that puddles can form under
- #REPLACEABLE-Blocks that puddles can replace CURRENTLY UNUSED AND DOESN'T DO ANNYTHING
- landonable = 1, 2, 3, 4, 7, 12, 5, 17, 162, 13, 97, 98, 16, 15, 73, 14, 129, 56, 21
- fallthroughable = 0, 18, 161, 8, 9
- replaceable = 0
- every 1 tick:
- loop players:
- if is raining or thundering in loop-player's world:
- set {_valid.%loop-player%} to true
- set {_loc} to location of loop-player
- set {_horizontalX} to a random integer between (-{@rangeXZ} + loop-player's location's x-coordinate) and ({@rangeXZ} + loop-player's location's x-coordinate)
- set {_horizontalZ} to a random integer between (-{@rangeXZ} + loop-player's location's z-coordinate) and ({@rangeXZ} + loop-player's location's z-coordinate)
- set {_vertical} to a random integer between (-{@rangeY} + loop-player's location's y-coordinate) and ({@rangeY} + loop-player's location's y-coordinate)
- set {_world} to loop-player's world
- set {_puddleLoc} to loop-player's location
- set the x-coordinate of {_puddleLoc} to {_horizontalX} - 0.5
- set the y-coordinate of {_puddleLoc} to {_vertical} - 0.5
- set the z-coordinate of {_puddleLoc} to {_horizontalZ}
- if block at {_puddleLoc} is air:
- if block below {_puddleLoc} is landonable:
- if biome at {_puddleLoc} is {@disallowed biome}:
- set {_valid.%loop-player%} to false
- else if biome at {_puddleLoc} is Extreme Hills, Extreme Hills Mountains, Extreme Hills Plus, or Extreme Hills Plus Mountains:
- if {_vertical} >= 93:
- set {_valid.%loop-player%} to false
- loop blocks above block at {_puddleLoc}:
- if loop-block is not fallthroughable:
- set {_valid.%loop-player%} to false
- else:
- set {_valid.%loop-player%} to false
- else:
- set {_valid.%loop-player%} to false
- if {_valid.%loop-player%} is true:
- set block at {_puddleLoc} to water
- set data value of block at {_puddleLoc} to 7
- if {puddle.debug} is on:
- message "Puddle added at %{_puddleLoc}%" to loop-player
- add {_puddleLoc} to {puddleLocations.%loop-player's world%::*}
- every 1 second:
- loop worlds:
- set {_chance} to 20%
- if is raining in loop-world:
- if time in loop-world is between 20:00 and 8:00:
- set {_chance} to {_chance} * 0.25
- else if time in loop-world is between 11:00 and 16:00:
- set {_chance} to {_chance} * 0.75
- else:
- set {_chance} to {_chance} * 0.50
- else if is thundering in loop-world:
- if time in loop-world is between 20:00 and 8:00:
- set {_chance} to {_chance} * 0.05
- if time in loop-world is between 11:00 and 16:00:
- set {_chance} to {_chance} * 0.2
- else:
- set {_chance} to {_chance} * 0.1
- else if is sunny in loop-world:
- if time in loop-world is between 20:00 and 8:00:
- set {_chance} to {_chance} * 0.9
- else if time in loop-world is between 11:00 and 16:00:
- set {_chance} to {_chance} * 1.2
- else:
- set {_chance} to {_chance} * 1
- else:
- set {_chance} to 20%
- chance of {_chance}:
- set {_loc} to a random location out of {puddleLocations.%loop-world%::*}
- if {_loc} is set:
- if block at {_loc} is water:
- if data value of block at {_loc} is 7:
- set block at {_loc} to air
- if {puddle.debug} is on:
- broadcast "Puddle removed at %{_loc}%"
- else if {puddle.debug} is on:
- broadcast "Puddle no longer exists at %{_loc}%"
- else if {puddle.debug} is on:
- broadcast "Puddle no longer exists at %{_loc}%"
- wait 1 tick
- remove all {_loc} from {puddleLocations.%loop-world%::*}
- if {weather.%loop-world%.timer} is set:
- if {weather.%loop-world%.timer} > 0:
- subtract 1 from {weather.%loop-world%.timer}
- else:
- execute the console command "/toggledownfall %loop-world%"
- clear {weather.%loop-world%.timer}
- command /puddles [<text>] [<text="%command sender's world%">]:
- aliases: /puddle
- trigger:
- if player is an op:
- if argument 1 is "clear":
- if argument 2 is "all":
- loop worlds:
- loop {puddleLocations.%loop-world%::*}:
- set block at loop-value to air
- remove all loop-value from {puddleLocations.%loop-world%::*}
- message "<light red>Cleared all puddles in all worlds..."
- else if argument 2 is not "all":
- loop {puddleLocations.%argument 2%::*}:
- set block at loop-value to air
- remove all loop-value from {puddleLocations.%argument 2%::*}
- message "<light red>Cleared all puddles in world ""%argument 2%"""
- else if argument 1 is "list":
- if argument 2 is "all":
- set {_amt} to 0
- loop worlds:
- loop {puddleLocations.%loop-world%::*}:
- add 1 to {_amt}
- message "(%{_amt}%). %loop-value% in world ""%loop-world%"""
- else:
- set {_amt} to 0
- loop {puddleLocations.%argument 2%::*}:
- add 1 to {_amt}
- message "(%{_amt}%). %loop-value%" to command sender
- message "<light green>Listed all puddles in world ""%argument 2%"""
- else if argument 1 is "create":
- set block at player's location to water
- set data value of block at player's location to 7
- message "%command sender% Created a puddle at %location of block at player's location%"
- add location of block at player's location to {puddleLocations.%event-world%::*}
- else:
- message "<light red>/puddles <clear|list|create>"
- else:
- message "<red>You do not have permission to do this"
- on physics:
- if event-block is water:
- if data value of event-block is 7:
- set {_persist} to false
- set {_loc} to event-block's location
- subtract 0.5 from the z-coordinate of {_loc}
- loop {puddleLocations.%event-world%::*}:
- if "%loop-value%" = "%{_loc}%":
- if block below event-block is landonable:
- cancel the event
- set {_persist} to true
- if {_persist} is true:
- if {puddle.debug} is true:
- broadcast "Puddle persisting at %{_loc}%"
- command /weather [<text>] [<text>] [<text="%event-world%">]:
- trigger:
- if command sender is an op:
- if argument 1 is "rain", "thunder", "lightning", "clear", "sunny", or "sun":
- if argument 2 parsed as number is an integer:
- if argument 3 parsed as world is a world:
- clear {weather.%world%.timer}
- if argument 1 is "rain":
- set the weather of argument 3 parsed as world to rain
- if argument 1 is "thunder" or "lightning":
- set the weather of argument 3 parsed as world to thunder
- if argument 1 is "clear", "sunny", or "sun":
- set the weather of argument 3 parsed as world to clear
- set {weather.%world%.timer} to argument 2 parsed as integer
- else:
- message "<light red>""argument 3"" is not an existing world"
- else:
- message "<light red>/weather %argument 1% <integer (seconds)>"
- else:
- message "<light red>/weather <weather type>"
- on weather change:
- if {weather.%world%.timer} > 0:
- cancel the event
- command /pdebug <boolean>:
- trigger:
- if command sender is an op:
- set {puddle.debug} to argument 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement