add web link to not6ecard giver
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<Solution name="NotecardGiver">
|
||||
<Project name="NotecardGiver" path="NotecardGiver\NotecardGiver.prj" active="true"/>
|
||||
<Project name="NotecardGiver" path="NotecardGiver\NotecardGiver.prj" active="true"/>
|
||||
</Solution>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project name="NotecardGiver" guid="D66611D8-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D66612B6-6C00-1014-B904-200204C60A89">
|
||||
<Script name="NotecardGiver_1.lsl" guid="D66B1FB3-6C00-1014-B904-200204C60A89">
|
||||
<Project name="NotecardGiver" guid="d66611d8-6c00-1014-b904-200204c60a89">
|
||||
<Object name="Object" guid="d66612b6-6c00-1014-b904-200204c60a89">
|
||||
<Script name="NotecardGiver_1.lsl" guid="d66b1fb3-6c00-1014-b904-200204c60a89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
// :CATEGORY:Inventory Giver
|
||||
// :NAME:NotecardGiver
|
||||
// :NAME:NotecardGiver with web link
|
||||
// :AUTHOR:Encog Dod
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:58
|
||||
// :ID:565
|
||||
// :NUM:769
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :REV:2.0
|
||||
// :WORLD:Second Life, Opensim
|
||||
// :DESCRIPTION:
|
||||
// NotecardGiver
|
||||
// :CODE:
|
||||
@@ -23,40 +22,53 @@
|
||||
// For more information about this book visit the following web site:
|
||||
//
|
||||
// http://www.heatonresearch.com/articles/series/22/
|
||||
// Mod to give out a web link added by Ferd
|
||||
|
||||
// Tuneable things you need to set
|
||||
integer giveNotecard = TRUE;
|
||||
integer giveWebSite = TRUE;
|
||||
string Message = "Visit the Outworldz Website";
|
||||
string WebLink = "http://www.outworldz.com";
|
||||
float Distance = 20;
|
||||
string notecard = "Welcome Notecard";
|
||||
integer freq = 1;
|
||||
integer maxList = 100;
|
||||
list given;
|
||||
|
||||
|
||||
integer freq = 5; // how often it scans, Keep this slow.
|
||||
integer maxList = 100; // saves the last 100 people to avoid spamming
|
||||
list given; // the list of people
|
||||
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llSensorRepeat("", "",AGENT, 20, PI, freq);
|
||||
llSetText("", <1.0, 1.0, 1.0>, 1.0);
|
||||
}
|
||||
|
||||
sensor(integer num_detected)
|
||||
{
|
||||
integer i;
|
||||
key detected;
|
||||
|
||||
for(i=0;i<num_detected;i++)
|
||||
{
|
||||
detected = llDetectedKey(i);
|
||||
|
||||
if( llListFindList(given, [detected]) < 0 )
|
||||
{
|
||||
given += llDetectedKey(i);
|
||||
|
||||
llGiveInventory(detected, notecard);
|
||||
if (llGetListLength(given) >= maxList)
|
||||
{
|
||||
given = llDeleteSubList(given,0,10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
state_entry()
|
||||
{
|
||||
llSensorRepeat("", "",AGENT, Distance, PI, freq);
|
||||
}
|
||||
|
||||
sensor(integer num_detected)
|
||||
{
|
||||
integer i;
|
||||
key detected;
|
||||
|
||||
for(i=0;i<num_detected;i++)
|
||||
{
|
||||
detected = llDetectedKey(i);
|
||||
|
||||
if( llListFindList(given, [detected]) < 0 )
|
||||
{
|
||||
given += llDetectedKey(i);
|
||||
if (giveNotecard) {
|
||||
llGiveInventory(detected, notecard);
|
||||
}
|
||||
if (giveWebSite) {
|
||||
llLoadURL(detected,Message, WebLink);
|
||||
}
|
||||
|
||||
if (llGetListLength(given) >= maxList)
|
||||
{
|
||||
given = llDeleteSubList(given,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user