Web Link
Touch it and the visitor is offered a web page. It also tells you off, once, if your address is missing its http.
What it does
On a touch it offers the visitor a page, with a question of your writing above the Go and Cancel buttons. It checks your address when it starts and says so out loud if it does not begin with http:// or https://, because a viewer refuses such an address quietly and from the outside that looks exactly like a broken script. It serves one person per touch rather than everyone who happened to be clicking, since the region throttles these offers and the fifth person would simply get nothing.
What you can build with it
A sign outside a shop pointing at its catalogue, a poster with the event details, a notice board linking to the rules, a plaque at a build linking to who made it, a donation page, a map. Anywhere the answer is longer than hover text can hold.
How to use it
Settings you can change
5Edit these at the top of the script. Everything works on the defaults · change them only when you need to.
// =====================================================================
// Web Link
// skimi3d script library · https://grid.skimi3d.com/scripts/web-link
//
// Touch it and the visitor is offered a web page. The sign outside a
// shop pointing at its catalogue, the poster with the event details,
// the notice board linking to the rules.
//
// It is an OFFER, always. Nothing here can open anything on anybody's
// screen without them agreeing to it first, and that is by design of
// the platform rather than of this script.
//
// Plain LSL.
// =====================================================================
// ---------------------------------------------------------------------
// Settings
// ---------------------------------------------------------------------
// Where it points. It has to start with http:// or https://.
string URL = "https://grid.skimi3d.com/";
// The line the visitor is asked. They see this next to Go and Cancel,
// so it should say where they are being taken and why.
string QUESTION = "Open the skimi3d grid site?";
// Floating words above it. Empty for none.
string LABEL = "Touch to open our site";
vector LABEL_COLOUR = <1.0, 1.0, 1.0>;
// Who may touch it. 0 = everyone, 1 = only the owner, 2 = same group.
integer WHO_MAY_TOUCH = 0;
// ---------------------------------------------------------------------
// Everything below here is the machinery
// ---------------------------------------------------------------------
integer mayTouch(key who)
{
if (WHO_MAY_TOUCH == 1) return who == llGetOwner();
if (WHO_MAY_TOUCH == 2) return llSameGroup(who);
return TRUE;
}
default
{
state_entry()
{
llSetText(LABEL, LABEL_COLOUR, 1.0);
// Checked once, out loud, at the start. An address without its
// http:// is quietly refused by the viewer, and from the
// outside that looks exactly like a broken script.
if (llSubStringIndex(URL, "http://") != 0 && llSubStringIndex(URL, "https://") != 0)
{
llOwnerSay("My URL does not begin with http:// or https://, so nothing will happen when anyone touches me.");
}
}
touch_start(integer total)
{
key who = llDetectedKey(0);
if (!mayTouch(who))
{
llRegionSayTo(who, 0, "This one is not yours to open.");
return;
}
// One at a time. Offering a page to five people at once is five
// dialogs and a throttle, and the fifth person gets nothing.
llLoadURL(who, QUESTION, URL);
}
on_rez(integer start)
{
llResetScript();
}
}
Copy it, make a new script inworld, paste over what is there and save. Nothing here phones home.