Visit Web Address Dialog ( V2 )

// V2 //
 
string URL_Loader_Message = "\nCopy FREE scripts from an SL wiki page"; // Message to show on dialog.
 
string URL_To_Visit = "https://wiki.secondlife.com/wiki/User:Fred_Gandt"; // URL to visit.
 
vector Omega_Axis = <0.0,0.0,1.0>; // If you don't want spinning set this to <0.0,0.0,0.0>;
 
float Omega_Speed = 0.5; // Speed of spin.
 
float Omega_Gain = 1.0; // Strength of spin.
 
string Floating_Text = "FREE SCRIPTS!!\n \nTouch to visit web site.\n \n(Official SL wiki)\n \n "; // Floating text.
 
vector Float_Text_Color = <1 .0,1.0,1.0>; // Color of floating text.
 
float Float_Text_Alpha = 1.0; // Transparency of floating text (1.0 is solid).
 
// FROM THIS POINT IT IS SCARY!! ARRGGGHHHH...!!! //
 
default
{
    state_entry()
    {
        llTargetOmega(Omega_Axis, Omega_Speed, Omega_Gain);
        llSetText(Floating_Text, Float_Text_Color, Float_Text_Alpha);
    }
    touch_start(integer nd)
    {
        while(nd)
        llLoadURL(llDetectedKey(--nd), URL_Loader_Message, URL_To_Visit);
    }
}

 

Add a comment

Load URL

Touch for dialog menu to open a web page.

 

string text = "Visit the official Alicia Stella Design Website!";
string url = "http://www.aliciastella.com"; //must include 'http://'

default
{
    touch_start(integer num_detected)
    {
        llLoadURL(llDetectedKey(0), text, url);
    }
}

 

Add a comment

HTTP Request

key http_request_id;
 
default
{
    state_entry()
    {
        http_request_id = llHTTPRequest("http://www.foxsan.com", [], "");
    }
 
    http_response(key request_id, integer status, list metadata, string body)
    {
        if (request_id == http_request_id)
        {
            llSetText(body, <0,0,1>, 1);
        }
    }
}

 

Add a comment

Open Website

// Bromley College
// Linden Script Exhibition
 
// Code for poster 37
 
default
{
    touch_start(integer num_detected)
    {
            llInstantMessage(llDetectedKey(0), llDetectedName(0) + ", thank you for visiting our website.");
 
            llLoadURL(llDetectedKey(0), "FoxSan Home", "http://www.foxsan.com/");
    }
}
 
// End of code;

 

Add a comment

RSS Reader

//
//    SHOP ZERO Tips38 RssReader  script   v1.0
//
//                   Created by Zero2000 Kid     2009/02/02
//
 
// Title
string title="++ ?????? ++";
// YahooPipe URL
string pipeURL="http://pipes.yahoo.com/pipes/pipe.run?_id=c890298689189b27880118f7b57b28c7&_render=rss&textinput=item.";
// Article Count
integer articleCount=5;
// Refresha rate
float refreshRate=300.0;
 
integer input_ch = -38;
integer handle;
key http_req;
string respons_data;
list article_list;
integer counter;
 
showInfo () {
    integer i;
    string msg=title+"\n";
    integer ct = llGetListLength(article_list)/4;
    for (i = 0; i ,1);
}
 
fetchdata(string data) {
    string tmpstr;
    counter++;
    list l1 = llParseString2List(data, [""], []);
    list l2 = llParseString2List(llList2String(l1,1), ["\n"], []);
    string title = getvalue(llList2String(l2,0),"");
    string link = getvalue(llList2String(l2,1),"");
    string description = getvalue(llList2String(l2,2),"");
    article_list+=[(string)counter,title,link,description];
    if (counter,1);
    http_req=llHTTPRequest(pipeURL+(string)counter,[HTTP_METHOD,"GET"],"");
}
 
default
{
 
    state_entry() {
        refresh_article();
        llSetTimerEvent(refreshRate);
    }
 
    on_rez(integer param){
        llResetScript();
    }
 
    touch_start(integer t)    {
        handle = llListen(input_ch,"",llDetectedKey(0),"");
        list menulist=llList2ListStrided(article_list, 0, -1, 4);
        menulist+=["Refresh"];
        llDialog(llDetectedKey(0), "Please select articel.", menulist, input_ch);
    }
 
    listen(integer ch, string name, key id, string message) {
        if (message=="Refresh") refresh_article();
        else {
            integer index=llListFindList(article_list,[message]);
            string title=llList2String(article_list,index+1);
            string link=llList2String(article_list,index+2);
            string description=llList2String(article_list,index+3);
            llLoadURL(llGetOwner(), "++++++++++++\n"+title+"\n++++++++++++\n"+description, link);
        }
        llListenRemove(handle);
    }
 
    timer(){
        refresh_article();
    }
 
    http_response(key request_id, integer status, list metadata, string body) {
        if (request_id == http_req) {
            fetchdata(body);
        }
    }
 
}

 

Add a comment