diff options
-rw-r--r-- | bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml | 7 | ||||
-rw-r--r-- | bin/assets/ScriptsAssetSet/osWeatherMap.lsl | 43 | ||||
-rw-r--r-- | bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml | 13 |
3 files changed, 63 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 @@ | |||
1 | default | ||
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 | } | ||
diff --git a/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml b/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml index b78c094..3f674eb 100644 --- a/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml +++ b/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml | |||
@@ -300,4 +300,17 @@ | |||
300 | <Key Name="everyonePermissions" Value="257487132" /> | 300 | <Key Name="everyonePermissions" Value="257487132" /> |
301 | <Key Name="basePermissions" Value="257487132" /> | 301 | <Key Name="basePermissions" Value="257487132" /> |
302 | </Section> | 302 | </Section> |
303 | <Section Name="osWeatherMap"> | ||
304 | <Key Name="inventoryID" Value="b102e3a7-c907-e63e-b9f5-b3fd63e6851b" /> | ||
305 | <Key Name="assetID" Value="b102e3a7-c907-e63e-b9f5-b3fd63e6851b" /> | ||
306 | <Key Name="folderID" Value="284858c8-9391-6bf1-ddf5-b936f73de853"/> | ||
307 | <Key Name="description" Value="A cycling US Weather Map - contributed by Neas Bade" /> | ||
308 | <Key Name="name" Value="osWeatherMap" /> | ||
309 | <Key Name="assetType" Value="10" /> | ||
310 | <Key Name="inventoryType" Value="10" /> | ||
311 | <Key Name="currentPermissions" Value="257487132" /> | ||
312 | <Key Name="nextPermissions" Value="257487132" /> | ||
313 | <Key Name="everyonePermissions" Value="257487132" /> | ||
314 | <Key Name="basePermissions" Value="257487132" /> | ||
315 | </Section> | ||
303 | </Nini> | 316 | </Nini> |