Live Help
Membership
You are a guest!

Register Today!

Log In
Reset Password
Game Network
Community Forum

MMO GAME LIST
World of Warcraft
Age of Conan
Anarchy Online
Archlord
Cabal Online
City of Heroes
City of Villains
Dark Age of Camelot
Darkfall Online
Diablo 2
Dungeons and Dragons
Dofus
Eve Online
Everquest 2
Final Fantasy XI
Guild Wars
Hero Online
Knight Online
Lineage 2
Lord of the Rings Online
Maple Story
Ragnarok Online
Runescape 2
Second Life
SilkRoad Online
Star Wars Galaxies
Tibia
Warhammer Online

FPS GAME LIST
Call of Duty
Combat Arms
Counter Strike
Halo

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Radar emails, Slightly modified Avatar Radar
post Oct 16 2009, 08:29 PM
Post #1

aliz123



Advanced
Group Icon

Group: Elite Members
Posts: 89
Joined: 20-February 09
Member No.: 843,883






Slightly modified Avatar Radar.

E-mails the specified e-mail a list of avatars within 96m of the object. Will not scan in NoScript Areas.

Instructions
Rez a cube and drop the script in.
Set it to phantom.
Take it into your inventory.
Search your inventory for "Avatar Detector".
Take "Avatar Detector" and drop it somewhere.
Code


integer i;
vector Vec;
integer IntX;
integer IntY;
integer IntZ;
//string Position;
vector Pos;
string Compass;
float Angle;
float Opposite;
float Hypotenuse;
string Distance;
string Output;
vector Color = <.2, .8, .4>;
string mail = "Put a throwaway e-mail here in quotes"

default
{
state_entry()
{
llSetTexture("f54a0c32-3cd1-d49a-5b4f-7b792bebc204", ALL_SIDES);
llSetPrimitiveParams([PRIM_PHANTOM, TRUE]);
llSetObjectName("Avatar Detector");
llTargetOmega(<1,0,0>, -PI/4, 1);
llSensorRepeat("", NULL_KEY, AGENT, 96, PI, 0.1);
}

sensor(integer num_detected)
{
Output = "";
for (i = 0; i < num_detected; ++i)
{
Compass = "";
Vec = llDetectedPos(i);
//IntX = (integer)Vec.x;
//IntY = (integer)Vec.y;
//IntZ = (integer)Vec.z;
//Position = "<" + (string)IntX + ", " + (string)IntY + ", " + (string)IntZ + ">";
Distance = (string)llRound(llVecDist(llGetPos(), llDetectedPos(i)));
Vec.z = 0;
Pos = llGetPos();
Pos.z = 0;
Opposite = Vec.y - Pos.y;
Hypotenuse = llVecDist(Vec, Pos);
if(Hypotenuse == 0) { Hypotenuse = 0.01; }
Angle = llAsin(Opposite/Hypotenuse) * (180/PI);
if((Angle >= 22.5) && (Angle <= 90)) { Compass = "N"; }
if((Angle <= -22.5) && (Angle >= -90)) { Compass = "S"; }
if(((Angle >= -67.5) && (Angle <= 67.5)) && (Vec.x < Pos.x)) { Compass = Compass + "W"; }
if(((Angle >= -67.5) && (Angle <= 67.5)) && (Vec.x > Pos.x)) { Compass = Compass + "E"; }

Output = Output + llDetectedName(i) + " (" + Compass + " @ " + Distance + "m)\n";
}
llEmail(mail, "AVATARS DETECTED", Output);
llInstantMessage(llGetOwner(), "AVATARS DETECTED: " + Output); //Can be turned off by adding slashes.
llSleep(30);
}

no_sensor()
{

}
}
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 


> Board Footer
Time is now: 22nd March 2010 - 07:52 AM