options: every_time: 7 seconds worlds: world and "ex-world" every {@every_time}: loop {@worlds}: set {_world} to "%loop-value%" parsed as World chance of ({%script%::%{_world}%::chance})%: set {_block} to water set data value of {_block} to 7 loop all players in {_world}: set blocks at getPuddleRandomLocations(location of loop-player) to {_block} # weather chances function updateWeatherChances(0:Integer=0): # by Gamebuster19901 loop {@worlds}: set {_world} to "%loop-value%" parsed as World set {_chance} to 21 if is raining in {_world}: if time in {_world} is between 20:00 and 8:00: set {_chance} to {_chance} * 0.25 else if time in {_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 {_world}: if time in {_world} is between 20:00 and 8:00: set {_chance} to {_chance} * 0.05 if time in {_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 {_world}: if time in {_world} is between 20:00 and 8:00: set {_chance} to {_chance} * 0.9 else if time in {_world} is between 11:00 and 16:00: set {_chance} to {_chance} * 1.2 else: set {_chance} to {_chance} * 1 else: stop set {%script%::%{_world}%::chance} to {_chance} on load: updateWeatherChances() # achtung #on unload: # clear {%script%::*}