Gamebuster icon

Extreme weather notifier beta v0.0.6.1

Gamebuster | PRO | 06/28/15 03:25:10 PM UTC | 0 ⭐ | 1071 👁️ | Never ⏰ | []
text |

2.28 KB

|

None

|

0 👍

/

0 👎

options:
	state : OR
	county : Baker Valley
	#state is the initials of your state
	#county is the name of your county or city. Use common sense when setting this option. If you put "New York" instead of "New York County", it would trigger for any extreme weather in the state
 on load:
	set {WarningTypes::*} to "Blizzard" and "Coastal Flood" and "Dust Storm" and "Flood" and "Winds" and "Hurricane" and "Thunderstorm" and "Severe Thunderstorm" and "Special Marine" and "Tropical Storm" and "Winter Storm" and "Avalanche" and "Civil Danger" and "Earthquake" and "Fire" and "Extreme Heat" and "Hazardous Materials" and "Nuclear Power Plant" and "Radiological Hazard" and "Shelter in Place" and "Volcano" and "Test" and "Red Flag"
	message "Registering the following warning types: %{WarningTypes::*}%" to the console
 command /print:
	trigger:
		$ thread
		set {_warning} to text from url "http://www.nws.noaa.gov/view/prodsByState.php?state={@state}&prodtype=warnings##SVRCAE"
		set {_comparison} to {_warning}
		set {_irreleventText.beginning} to first index of "<pre>" in {_warning}
		set {_first} to the first {_irreleventText.beginning} characters of {_warning}
		replace all {_first} in {_comparison} with ""
		set {_irreleventText.end} to first index of "</pre>" in {_comparison}
		set {_comparison} to the first {_irreleventText.end} characters of {_comparison}
		replace all {_last} in {_comparison} with ""
		if {_comparison} contains "Warning":
			if {_comparison} contains "{@county}":
				if {_comparison} does not contain "cancelled":
					loop {WarningTypes::*}:
						if {_comparison} contains "%loop-value%":
							set {_type::%loop-value%} to "%loop-value%"
					if {_type::*} is not set:
						add "Other" to {_type::Other}
					if {_type::Fire} is set:
						if {_type::Red Flag} is set:
							remove {_type::Fire} from {_type::*}
					if {_type::thunderstorm} is set:
						if {_type::severe thunderstorm} is set:
							remove {_type::thunderstorm} from {_type::*}
					broadcast "<light red>YES - %{_type::*}%"
				else:
					message "<light green>NO - Warning cancelled"
			else:
				message "<light green>NO"
		else if {_warning} is not set:
			message "<red>404 Error, check URL."
		else:
			message "<light green>NO"
		#message "%{_comparison}%" to the console

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎