aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet
diff options
context:
space:
mode:
Diffstat (limited to 'bin/assets/ScriptsAssetSet')
-rw-r--r--bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml7
-rw-r--r--bin/assets/ScriptsAssetSet/osWeatherMap.lsl43
2 files changed, 50 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
index 341454f..8f85027 100644
--- a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
+++ b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
@@ -139,4 +139,11 @@
139 <Key Name="inventoryType" Value="10" /> 139 <Key Name="inventoryType" Value="10" />
140 <Key Name="fileName" Value="osTextBoard.lsl" /> 140 <Key Name="fileName" Value="osTextBoard.lsl" />
141 </Section> 141 </Section>
142 <Section Name="osWeatherMap">
143 <Key Name="assetID" Value="b102e3a7-c907-e63e-b9f5-b3fd63e6851b" />
144 <Key Name="name" Value="osWeatherMap" />
145 <Key Name="assetType" Value="10" />
146 <Key Name="inventoryType" Value="10" />
147 <Key Name="fileName" Value="osWeatherMap.lsl" />
148 </Section>
142</Nini> 149</Nini>
diff --git a/bin/assets/ScriptsAssetSet/osWeatherMap.lsl b/bin/assets/ScriptsAssetSet/osWeatherMap.lsl
new file mode 100644
index 0000000..7dda87b
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/osWeatherMap.lsl
@@ -0,0 +1,43 @@
1default
2{
3 integer count = 0;
4 integer refreshRate = 300;
5 string URL1 = "http://icons.wunderground.com/data/640x480/2xus_rd.gif";
6 string URL2 = "http://icons.wunderground.com/data/640x480/2xus_sf.gif";
7 string URL3 = "http://icons.wunderground.com/data/640x480/2xus_st.gif";
8 string dynamicID="";
9 string contentType="image";
10
11 state_entry()
12 {
13 refresh_texture();
14 llSetTimerEvent(refreshRate); // create a "timer event" every 300 seconds.
15 }
16
17 timer()
18 {
19 refresh_texture();
20 }
21
22 touch_start(integer times)
23 {
24 refresh_texture();
25 }
26
27 void refresh_texture()
28 {
29 count++;
30 string url = "";
31 integer c = count % 3;
32
33 if (c == 0) {
34 url = URL1;
35 } else if (c == 1) {
36 url = URL2;
37 } else {
38 url = URL3;
39 }
40 // refresh rate is not yet respected here, which is why we need the timer
41 osSetDynamicTextureURL(dynamicID, contentType ,url , "", refreshRate );
42 }
43}