Xelagot Real Weather Script
By Panther1403
What is the real weather script? Its a script file for Xelagot bot that
updates the weather in the world in which it is being used by dloading
weather reports every hour from the National Weather Service. To get
the RWScript dload the two links below. You need both of them. Save
them in your xelagot bots script directory.
The script and the Light and Sun Position data.
There are three weather commands in the script. Each one has the bot
read you the weather report it represents.
/weatherreport
This command reads the contents of the main weather report.
/weatherforcast
This command makes the bot down load the current weather forcast and
read it to you.
/nowcast
This command makes the bot download the current nowcast for your area
and read it to you. The now cast is actualy the short term forcast
which is not updated on a regular basis like the forcast and the
weather report. It is usualy updated by the NWS when there is bad
weather or special weather conditions.
Dont want to use the weather from Boise, ID? Well you can change the
url to the weather data in the script to the town or city of your
choice. There are three urls near the top of the script file. The first
url is for the main weather report and is required to make the script
function. The other two are for the weather forcast and Now cast (in
that order) and they are optional. The only time the bot uses these two
urls is when someone uses either the /weatherforcast command or the
/nowcast command. To find the urls to the weather data for your area
there are two things you need to know. First you need to know the call
letters of the weather station for the location you want to use. Second
you need to know the ID number (I'm not sure on the exact term. Its
just a number I found in the weather report that pointed to an actual
file.) If you don't already know the call letters of your weather
station like I did you can follow the steps below to find the call
letters and the urls you need for the script. (For Boise it was kind of
simple. The airport, a radio station, and a tv station here in Boise
all share the same call letters. KBOI. So its was kind of obvious that
the weather stations call letters would also be KBOI since the weather
station was located at the airport.)
Step 1. Goto the National Weather
Service web page by clicking here.
Step 2.

Step 3.

Step 4

Step 5.

Step 6

Step 7.

Step 8.
Click
this link. It will take you to the directory listing where you will
find the main txt file that the weather script checks every hour to
update the weather in your world. THIS LINK TAKES A LONG TIME TO LOAD.
YOU MAY THINK THAT ITS NOT WORKING BUT IT IS (if you get a message that
says the webpage timed out then its not working. change the timeout
setting on your browser.) The directory listing lists the txt
file weather reports from the weather stations that the NWS operates.
Once the list has loaded scroll down and find the txt file with the
call letters for your local weather station (KBOI.txt for example) and
click it to open it so that you can make sure it is the correct weather
report. If its for the city your looking for then you have found your
file. Find the line in the script that reads $wdurl =
http://weather.noaa.gov/pub/data/observations/metar/decoded/KBOI.TXT
and replace KBOI.TXT with the name of your weather stations txt file.
Step 9.
Click this
link. It will take you to another part of the web directory we used
in step 8. Scroll down and find the directory for your state. The txt
files are named by city so just scroll down and find the city you want.
In the script file find the line that reads $wforcasturl =
http://weather.noaa.gov/pub/data/forecasts/city/id/boise.txt and
replace /id/boise.txt with your citys url. Example: $wforcasturl =
http://weather.noaa.gov/pub/data/forecasts/city/yourstate/yourcity.txt
Step 10
This is the step where you need the id number. Click this
link. It takes you again to another part of the web directory we
used in the previous two steps. As you did in step 9, find the
directory for your state. In your states directory look for they txt
file whose name matches the id number you found earlier. Find the line
in the script that reads $nowcasturl =
http://weather.noaa.gov/pub/data/forecasts/nowcast/id/idz012.txt and
repace /id/idz012.txt with your areas url. Example: $nowcasturl =
http://weather.noaa.gov/pub/data/forecasts/nowcast/yourstate/youridnumber.txt
Step 11
Save the script and load it into your bot.