3D Radar

Expired

Rezzes a ball for each avatar in range. Each ball tracks it's on AV and displays distance.

 

Scanner/Rezzer Script

 

Place this script in a prim along with the scan ball. When touched it will scan the surrounding area and rezz a ball for each avatar.

 

Suggestion: Create a sphere with a diameter of 2 meters. Set transparency about 60. Create another sphere about 0.05 diameter, color a dark color and put it in the center of the large prim. Select small prim 1st and then large prim and link them. This will give you a center point to reference. The scan ball script is set to scan for it's avatar to a range of 96 meters.

 

This formula: vector avDivPos = (avPos - rPos) * 0.010417; Takes the (avatars position - position of scanner) & multiplies by (radius of the distance you want the balls to go(2 meter sphere = 1 meter radius)/scan range(96meters)):

 

1/96 = approximately 0.010417

 

//////////////////////////////////////////////////////////////////////////////////////////////////////
//				3D Radar 2.5
// 				"Oct 15 2008", "18:43:28"
// 				Creator: Jesse Barnett
//				Released into the Public Domain
//////////////////////////////////////////////////////////////////////////////////////////////////////
 
integer Scan = TRUE;
string avKey;
integer list_pos;
list key_list;
integer key_chan;	//Key channel is generated randomly and passed to the scan ball
integer die_chan = -9423753;	//Hey pick your own channels and be sure to paste them into
						//the scan balls too!
integer key_rem_chan = -49222879;
default {
	state_entry() {
		llSetObjectName("3D Radar");
	}
	touch_start(integer total_number) {
		if (Scan) {
			llSensorRepeat("", "", AGENT, 96, PI, 1);
			key_list =[];
			llListen(key_rem_chan, "", "", "");
			llOwnerSay("on");
			Scan = FALSE;
		}
		else {
			llSensorRemove();
			llRegionSay(die_chan, "die");
			llOwnerSay("off");
			Scan = TRUE;
		}
	}
	sensor(integer iNum) {
		integer p = 0;
		for (p = 0; p 

 

 

Scan Ball Script

 

Place this script in a prim and then place the prim into the inventory of the Scanner/Rezzer. It will automatically name itself.

 

Suggestion; Create a sphere prim of 0.05 diameter with glow set about .80.

 

//////////////////////////////////////////////////////////////////////////////////////////////////////
//				3D Radar 2.5
// 				"Oct 15 2008", "18:44:36"
// 				Creator: Jesse Barnett
//				Released into the Public Domain
//////////////////////////////////////////////////////////////////////////////////////////////////////
 
string avName;
integer avDistance;
key avKey;
integer avListen;
integer key_chan;
integer die_chan = -9423753;
integer key_rem_chan = -49222879;
vector avPos;
vector rPos;
default {
	state_entry() {
		llSetObjectName("scan ball");
	}
	on_rez(integer start_param) {
		rPos = llGetPos();
		key_chan = start_param;
		llListen(die_chan, "", "", "");
		avListen = llListen(key_chan, "", "", "");
	}
	listen(integer c, string n, key id, string msg) {
		if (c == die_chan)
			llDie();
		else {
			avKey = (key) msg;
			avName = llKey2Name(avKey);
			llSensorRepeat("", avKey, AGENT, 96, PI, 1.0);
			llListenRemove(avListen);
		}
	}
	sensor(integer n) {
		avPos = llDetectedPos(0);
		vector avDivPos = (avPos - rPos) / (96 / 1);	//Scan range/Radius of large sphere
		avDistance = (integer) llVecDist(rPos, llDetectedPos(0));
		llSetPos(rPos + avDivPos);
		llSetText(avName + "[" + (string) avDistance + "]", <1 , 1, 1 >, 1);
	}
	no_sensor() {
		llRegionSay(key_rem_chan, avKey);
		llDie();
	}
}

 

 

Basic Target Scanner HUD

Expired

This single prim HUD is just a button that scrolls through nearby players names, photos and user key. Drop it in a prim and touch the prim and you are set to go. Modify it to suit your particular use in another Hud, weapon, or whatever you want.

// Basic Target Scanner HUD // by Ackley Bing // // Drop this in a prim and touch key HUDtarget; integer HUDattachpoint=ATTACH_HUD_CENTER_1; integer senseindex; key photoReq; TargetInfo(key id) { llSetText(llToLower(llGetDisplayName(id))+"\n"+(string)id, <0.0, 1.0, 0.0>, 1.0); if ( id!=NULL_KEY ) { photoReq=llHTTPRequest("http://world.secondlife.com/resident/" + (string)id, [], ""); llOwnerSay("Current Target: secondlife:///app/agent/" + (string)id + "/inspect " + (string)id ); } else { llSetTexture("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903", 0); llOwnerSay("No Target"); } } default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS | PERMISSION_ATTACH); } attach(key id) { if (id) { llSetScale(<0.1, 0.15, 0.1>); llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <2 .0, 0.5, 1.0>, <0.0, 0.0, 0.0>, PRIM_ROT_LOCAL, <0.000000, -0.707107, 0.000000, 0.707107>, PRIM_COLOR, 0, <1 .0,1.0,1.0>, 1.0, PRIM_COLOR, 1, <0.0,1.0,0.0>, 1.0, PRIM_COLOR, 3, <0.0,1.0,0.0>, 1.0, PRIM_COLOR, 2, <1 .0,1.0,1.0>, 0.0, PRIM_COLOR, 4, <1 .0,1.0,1.0>, 0.0]); llRotateTexture(270.0*DEG_TO_RAD,0); HUDattachpoint=llGetAttached(); senseindex=0; llSensor("", "", AGENT, 128, TWO_PI); } } on_rez(integer param) { if ( !llGetAttached() ) llRequestPermissions(llGetOwner(),PERMISSION_ATTACH|PERMISSION_TAKE_CONTROLS); } touch_start(integer tsn) { if ( !llGetAttached() ) llRequestPermissions(llGetOwner(),PERMISSION_ATTACH|PERMISSION_TAKE_CONTROLS); senseindex=senseindex+(llDetectedTouchFace(0)==1)-(llDetectedTouchFace(0)==3); llSensor("", "", AGENT, 128, TWO_PI); } sensor(integer num) { senseindex=((senseindex<0)*(num-1))+((senseindex>=0)*(senseindex*(senseindex!=num))); HUDtarget=llDetectedKey(senseindex); TargetInfo(HUDtarget); } no_sensor() { senseindex=0; HUDtarget=NULL_KEY; TargetInfo(HUDtarget); } http_response(key request_id, integer status, list metadata, string body) { if( request_id == photoReq ) { string photoID; integer StartIndex=llSubStringIndex(body,""); integer EndIndex=llSubStringIndex(body,""); if( StartIndex!=-1) { integer tempIndex=llSubStringIndex(body,"imageid")+18; if(tempIndex>17)photoID=llGetSubString(body,tempIndex,tempIndex+35); } if ( photoID==NULL_KEY || photoID=="" ) photoID="8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"; llSetTexture(photoID, 0); } } run_time_permissions(integer perms) { if ( perms & PERMISSION_ATTACH ) llAttachToAvatar(HUDattachpoint); if ( perms & PERMISSION_TAKE_CONTROLS ) llTakeControls(CONTROL_BACK, FALSE, TRUE); // required to allow script to continue to operate in 'no-script' areas and has to be activated before entering the 'no-script' area. } }

 

Location Finder

Expired

default
{
    on_rez( integer param )
    {
        llResetScript();
    }
    
    state_entry()
    {
        llSay(0, (string)llGetPos());
    }

    touch_start(integer total_number)
    {
        llSay(0, (string)llGetPos());
    }
}

 

Avatar Detector

Expired

//
//    SHOP ZERO Tips25 AvatorDetector v1.0
//
//                   Created by Zero2000 Kid     2008/04/06
// 
 
integer input_ch = 34;
integer range=96;
integer handle;
string target;
string simname;
 
output_info (vector v , string name) {
    string pos=(string)v.x + "/" + (string)v.y + "/" + (string)v.z;
    llInstantMessage(llGetOwner(),name+"--> secondlife://"+simname+"/"+pos);
}
 
default {
    state_entry(){
        handle = llListen(input_ch,"",llGetOwner(),"");
    }
 
    on_rez(integer param){
        llResetScript();
    }
 
    listen(integer ch, string name, key id, string message) {
        target=message;
        simname=llGetRegionName();
        llInstantMessage(llGetOwner(),"Searching " + target + " ....");
        llSensor("", NULL_KEY, AGENT, range, PI);
    }
 
    sensor(integer total_number) {
        integer i;
        for (i = 0; i 

 

Basic Radar

Expired

//  Basic Radar
//  Created by Water Rogers for IBM/Opensource
 
//  Purpose
//  --------------------------------------------------------------
//  This is a basic example of how you can create a simple radar
//  to detect Avatars within a given distance around the object
//  that this script resides in.  Names will be viewed above the
//  object along with distance (in meters).
 
//  Requirements
//  --------------------------------------------------------------
//  A single prim is all that is necessary for this example.
 
//  GLOBAL VARIABLES
//  --------------------------------------------------------------
 
float   g_Range     = 96.0;     //  The range of the sensor in meters
float   g_Arc       = PI;       //  The arc of the sensor
float   g_Rate      = 1.0;      //  The repeat rate of the sensor in seconds
vector  g_TextColor = <1 ,1,1>;  //  Text color <1 ,1,1> = White  
 
//  EVENTS
//  --------------------------------------------------------------
 
default
{
    state_entry()
    {
        //  ------------------------------------------------------
        //  This is the entry-point of the script.  After a script
        //  has been saved or reset, this event will fire off first
        //  ------------------------------------------------------
 
        //  We call llSetText() first to "clear" the text above the object
        //  passing an empty string into the text parameter.
        llSetText("", g_TextColor, TRUE);
 
        //  We then call the llSensorRepeat() function to start detecting
        //  avatars.  This function will raise the sensor() event handle
        //  at a rate of g_Rate seconds.
        llSensorRepeat("", NULL_KEY, AGENT, g_Range, g_Arc, g_Rate);
 
        //  Since we passed an empty string and key value to the sensor,
        //  this tells the sensor that we want to look for any name with
        //  any key as long as it's an AGENT, which is a fancy name for
        //  Avatar.  If we wanted to look for a specific person only, we
        //  could simply pass their name and/or key into these arguments.
    }
 
    sensor(integer num_detected)
    {
        //  ------------------------------------------------------
        //  This event will fire off at the rate of g_Rate in seconds
        //  after being called by either llSensor() or llSensorRepeat()
        //  ------------------------------------------------------
 
        //  First we start out by declaring a local variable "output". This
        //  variable will store information we want in a string until we
        //  are ready to display it at the end.
        string output;
 
        //  The next variable sets up the for loop
        integer x;
 
        //  This next section will loop through each one of the num_detected
        //  items properly sensed (in this case, it will be AGENTS or Avatars)
        //  and store the results into the output string.
        for(x = 0 ; x