aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/osWeatherMap.lsl
diff options
context:
space:
mode:
authorUbitUmarov2015-09-01 11:43:07 +0100
committerUbitUmarov2015-09-01 11:43:07 +0100
commitfb78b182520fc9bb0f971afd0322029c70278ea6 (patch)
treeb4e30d383938fdeef8c92d1d1c2f44bb61d329bd /bin/assets/ScriptsAssetSet/osWeatherMap.lsl
parentlixo (diff)
parentMantis #7713: fixed bug introduced by 1st MOSES patch. (diff)
downloadopensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.zip
opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.gz
opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.bz2
opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.xz
Merge remote-tracking branch 'os/master'
Diffstat (limited to '')
-rw-r--r--bin/assets/ScriptsAssetSet/osWeatherMap.lsl43
1 files changed, 43 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/osWeatherMap.lsl b/bin/assets/ScriptsAssetSet/osWeatherMap.lsl
new file mode 100644
index 0000000..6a2232b
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/osWeatherMap.lsl
@@ -0,0 +1,43 @@
1integer count = 0;
2integer refreshRate = 300;
3string URL1 = "http://icons.wunderground.com/data/640x480/2xus_rd.gif";
4string URL2 = "http://icons.wunderground.com/data/640x480/2xus_sf.gif";
5string URL3 = "http://icons.wunderground.com/data/640x480/2xus_st.gif";
6string dynamicID="";
7string contentType="image";
8
9refresh_texture()
10{
11 count++;
12 string url = "";
13 integer c = count % 3;
14
15 if (c == 0) {
16 url = URL1;
17 } else if (c == 1) {
18 url = URL2;
19 } else {
20 url = URL3;
21 }
22 // refresh rate is not yet respected here, which is why we need the timer
23 osSetDynamicTextureURL(dynamicID, contentType ,url , "", refreshRate );
24}
25
26default
27{
28 state_entry()
29 {
30 refresh_texture();
31 llSetTimerEvent(refreshRate); // create a "timer event" every 300 seconds.
32 }
33
34 timer()
35 {
36 refresh_texture();
37 }
38
39 touch_start(integer times)
40 {
41 refresh_texture();
42 }
43}