removed useless _ folders
This commit is contained in:
3
Traffic/Traffic.sol
Normal file
3
Traffic/Traffic.sol
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution name="Traffic">
|
||||
<Project name="Traffic" path="Traffic\Traffic.prj" active="true"/>
|
||||
</Solution>
|
||||
96
Traffic/Traffic/Object/Traffic_1.lsl
Normal file
96
Traffic/Traffic/Object/Traffic_1.lsl
Normal file
@@ -0,0 +1,96 @@
|
||||
// :CATEGORY:Traffic
|
||||
// :NAME:Traffic
|
||||
// :AUTHOR:Encog Dod
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:39:08
|
||||
// :ID:910
|
||||
// :NUM:1307
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Traffic
|
||||
// :CODE:
|
||||
// From the book:
|
||||
//
|
||||
// Scripting Recipes for Second Life
|
||||
// by Jeff Heaton (Encog Dod in SL)
|
||||
// ISBN: 160439000X
|
||||
// Copyright 2007 by Heaton Research, Inc.
|
||||
//
|
||||
// This script may be freely copied and modified so long as this header
|
||||
// remains unmodified.
|
||||
//
|
||||
// For more information about this book visit the following web site:
|
||||
//
|
||||
// http://www.heatonresearch.com/articles/series/22/
|
||||
|
||||
list known;
|
||||
string parcelName;
|
||||
|
||||
integer DAYSEC = 86400;
|
||||
integer visitorsYesterday;
|
||||
|
||||
setTimer()
|
||||
{
|
||||
float now = llGetWallclock();
|
||||
integer secondsLeft = (DAYSEC - (integer)now);
|
||||
llSetTimerEvent(secondsLeft);
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
on_rez(integer i)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
|
||||
state_entry()
|
||||
{
|
||||
llSensorRepeat("", "", AGENT, 20.0, PI, 1.0);
|
||||
list lstParcelDetails = [PARCEL_DETAILS_NAME];
|
||||
|
||||
list lstParcelName=llGetParcelDetails(llGetPos(),lstParcelDetails);
|
||||
|
||||
parcelName =(string)lstParcelName;
|
||||
setTimer();
|
||||
}
|
||||
|
||||
sensor(integer detected) //A sensor returns the first 16 items detected.
|
||||
{
|
||||
integer i;
|
||||
|
||||
// Say the names of everyone the sensor detects
|
||||
for(i=0;i<detected;i++)
|
||||
{
|
||||
string name = llDetectedName(i);
|
||||
|
||||
if( llListFindList(known,[name]) == -1 )
|
||||
{
|
||||
llSay(0,"Hello " + name + " welcome to " + parcelName + "." );
|
||||
known += [name];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
key owner = llGetOwner();
|
||||
key who = llDetectedKey(0);
|
||||
if( who==owner )
|
||||
{
|
||||
llSay(0, "Number of unique visitors today: " + (string)llGetListLength(known) );
|
||||
llSay(0, "Number of unique visitors yesterday: " + (string)visitorsYesterday );
|
||||
string l = llList2CSV(known);
|
||||
llSay(0,"Visitors today:" + l );
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
llSleep(60);
|
||||
visitorsYesterday = llGetListLength(known);
|
||||
setTimer();
|
||||
known = [];
|
||||
llInstantMessage(llGetOwner(),"You had " + (string)visitorsYesterday + " today at " + parcelName );
|
||||
}
|
||||
}
|
||||
6
Traffic/Traffic/Traffic.prj
Normal file
6
Traffic/Traffic/Traffic.prj
Normal file
@@ -0,0 +1,6 @@
|
||||
<Project name="Traffic" guid="D6A747FD-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D6A748D6-6C00-1014-B904-200204C60A89">
|
||||
<Script name="Traffic_1.lsl" guid="D6A770A6-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user