diff --git a/All In One NPC Recorder and Player/All In One NPC Recorder and Player/All In One NPC Recorder and Player.prj b/All In One NPC Recorder and Player/All In One NPC Recorder and Player/All In One NPC Recorder and Player.prj index a1cc8cc2..7dfbe280 100644 --- a/All In One NPC Recorder and Player/All In One NPC Recorder and Player/All In One NPC Recorder and Player.prj +++ b/All In One NPC Recorder and Player/All In One NPC Recorder and Player/All In One NPC Recorder and Player.prj @@ -20,6 +20,8 @@ + - - + + diff --git a/Endless Loop Mover/Endless Loop Mover/Object/walker.lsl b/Endless Loop Mover/Endless Loop Mover/Object/walker.lsl index 1463cb87..3862ea45 100644 --- a/Endless Loop Mover/Endless Loop Mover/Object/walker.lsl +++ b/Endless Loop Mover/Endless Loop Mover/Object/walker.lsl @@ -4,10 +4,9 @@ // :AUTHOR:Ferd Frederix // :KEYWORDS: // :CREATED:2015-08-05 09:54:56 -// :EDITED:2015-08-05 10:12:51 // :ID:1084 // :NUM:1816 -// :REV:1 +// :REV:2 // :WORLD:OpenSim // :DESCRIPTION: // Sit on this prim, it will move you to a destination and unseat you, optionally repeat forever. @@ -17,9 +16,11 @@ integer _debug = FALSE; // print in chats what i s happening. +float RANGE = 96; // range it looks for people - if detected, will allow it to move +float TINTERVAL = 10; // how often it looks - keep this large and the RANGE small integer Endless = TRUE; -vector OFFSET = <0,0,0>; // if you want the tour to ride hiogher or lower or to one side... - +vector OFFSET = <0,0,0>; // if you want the tour to ride higher or lower or to one side... +integer running = FALSE; float SPEED = 1.0; // speed of vehicle in meters per second // Sit for the NPC @@ -198,6 +199,19 @@ state moving Goto(SPEED); llSetTimerEvent(INTERVAL); + llSensorRepeat("","",AGENT,RANGE,PI,TINTERVAL); + } + + sensor(integer n) + { + if (! running++) + llSetTimerEvent(INTERVAL); + } + + no_sensor() + { + llSetTimerEvent(0); + running = FALSE; } changed(integer change) diff --git a/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_1.lsl b/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_1.lsl index 198954b2..7380f5a9 100644 --- a/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_1.lsl +++ b/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_1.lsl @@ -10,20 +10,18 @@ // :DESCRIPTION: // Method to get the day of the week from a unix timestamp - llGetUnixTime. The timestamp returns the number of seconds elapsed beginning Thursday, January 1, 1970 UTC. This script first converts the seconds to hours, then adds the GMT offset (if desired), then converts the hours to days, and finally grabs the day of the week from a list. // :CODE: -// Gives day of the week -// DoteDote Edison - -list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]; -integer offset = -4; // offset from UTC - -default { - state_entry() { - // - } - touch_start(integer total_number) { - integer hours = llGetUnixTime()/3600; - integer days = (hours + offset)/24; - integer day_of_week = days%7; - llSay(0, "Today is " + llList2String(weekdays, day_of_week)); - } +// Gives day of the week +// Copyright © 2016 Linden Research, Inc. Licensed under Creative Commons Attribution-Share Alike 3.0 +// DoteDote Edison + +list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]; +integer offset = -4; // offset from UTC + +default { + touch_start(integer total_number) { + integer hours = llGetUnixTime()/3600; + integer days = (hours + offset)/24; + integer day_of_week = days%7; + llSay(0, "Today is " + llList2String(weekdays, day_of_week)); + } } diff --git a/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_2.lsl b/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_2.lsl index 15e55d8b..9dd9ce3e 100644 --- a/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_2.lsl +++ b/Get_Day_of_Week/Get_Day_of_Week/Object/Get_Day_of_Week_2.lsl @@ -1,26 +1,29 @@ -// :CATEGORY:Clock -// :NAME:Get_Day_of_Week -// :AUTHOR:DoteDote Edison -// :CREATED:2010-01-10 05:20:56.000 -// :EDITED:2013-09-18 15:38:54 -// :ID:346 -// :NUM:469 -// :REV:1.0 -// :WORLD:Second Life -// :DESCRIPTION: -// And a function version: -// :CODE: -string getDay(integer offset) { - list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]; - integer hours = llGetUnixTime()/3600; - integer days = (hours + offset)/24; - integer day_of_week = days%7; - return llList2String(weekdays, day_of_week); -} - -default { - touch_start(integer total_number) { - integer offset = -4; // offset from UTC - llSay(0, "Today is " + getDay(offset) + "."); - } -} +// :CATEGORY:Clock +// :NAME:Get_Day_of_Week +// :AUTHOR:DoteDote Edison +// :CREATED:2010-01-10 05:20:56.000 +// :EDITED:2013-09-18 15:38:54 +// :ID:346 +// :NUM:469 +// :REV:1.0 +// :WORLD:Second Life +// :DESCRIPTION: +// And a function version: +// :CODE: + +// Copyright © 2016 Linden Research, Inc. Licensed under Creative Commons Attribution-Share Alike 3.0 + +string getDay(integer offset) { + list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]; + integer hours = llGetUnixTime()/3600; + integer days = (hours + offset)/24; + integer day_of_week = days%7; + return llList2String(weekdays, day_of_week); +} + +default { + touch_start(integer total_number) { + integer offset = -4; // offset from UTC + llSay(0, "Today is " + getDay(offset) + "."); + } +}