Blazed Spy Security Hud System

Written by: Headmaster

This is a security HUD.  Ther are four buttons that are needed for the HUD to work properly.

Seruity HUD

This script goes in the root prim of the HUD:

float scanWeather = 0.1;
float scanTactical = 5;
integer notify = 1;
integer interval = 1; ///----how long (in seconds it takes to update the text)
integer range = 200; ////----how far it will scan (max i can get is 96M)
string radarID="";///--default detects no one, so DO NOT CHANGE
key id; 



default
{
    on_rez(integer params){
        
        llResetScript();} //start fresh
    
    state_entry()
    {key owner = llGetOwner();
        llOwnerSay("This system only works on land you own. For GROUP LAND, deed the security system to group \n ******W A R N I N G****** \n ANY ONE CAN USE THESE CONTROLS WHEN YOU DEED THEM TO GROUP. \n ******W A R N I N G******");
        llGiveInventory(owner, "!Sensor.420-SecurityHUD");
        llTargetOmega(<0,0,1>,5,0); //see everyone around me
        llSensorRepeat("","",AGENT,range,PI,interval); //Sensor is always active
    }

    sensor(integer n) {
        integer i; 
        string blazedman; 
        vector pos; 
        vector me = llGetPos(); 
        integer dist;
        string agent = " ";
        for(i=0; i, 1); //set your color here
    }

no_sensor( ){ llSetText("", <1,1,1>, 1); ; } //when no one is around, the text goes away.
 
    }

 Unsit Avatar Button Script:

//Formatted Sensor Dialog script by Evil Fool
//Modified by blazed Undercity
//Now its got a use, i modified to allow owner to do stuff to the ppl that are in the sensor's range



integer gOwnerOnly = FALSE;
integer gChann = -293190; //make your OWN unique channel to be sure your not on someone else's.
integer gStride = 9;
list names;
list keys;
integer gPos = 0;
key tReq;


dialog(key id) 
{
    integer nTop = gPos + gStride - 1;
    list buttons = llList2List(names, gPos, nTop);
    string msg = llDumpList2String(buttons, "\n");
    while(llGetListLength(buttons) % 3 != 0)
    { buttons = llListInsertList(buttons, [" "], gStride);
    }
    if (gPos >= gStride)
    { buttons += ["PREVIOUS"];
    }
    if (nTop - 1 < llGetListLength(names))
    { buttons += ["NEXT"];
    }
    llDialog(id, "Targets in Range: \n \n" + msg, buttons, gChann);
}

default
{
    state_entry()
    {
        llListen(gChann, "", NULL_KEY, "");
    }
    
    touch_start(integer num_times)
    {  if ( ( gOwnerOnly == TRUE && llDetectedKey(0) == llGetOwner() ) || gOwnerOnly == FALSE)
        {tReq = llDetectedKey(0);
         llSensor("", NULL_KEY, AGENT, 96.0, PI);
        }
    }
    
    sensor(integer num_detected)
    { 
        names = [];
        gPos = 0;
        integer i;

       
        for (i = 0; i < num_detected; i++)
        {
            names = names + llDetectedName(i);
        }
        
        keys = [];
        integer k;

       
        for (k = 0; k < num_detected; k++)
        {
            keys = keys + llDetectedKey(k);
        }
        
        dialog(tReq);

     
    }
    
    
    ///This script handles 16 keys & names associated with the dialog buttons. Feel free to add more.
        
    
    
    
    listen(integer channel, string name, key id, string msg) 
    {  
         string key0 = llList2String(keys, 0);
         string key1 = llList2String(keys, 1);
         string key2 = llList2String(keys, 2);
         string key3 = llList2String(keys, 3);
         string key4 = llList2String(keys, 4);
         string key5 = llList2String(keys, 5);
         string key6 = llList2String(keys, 6);
         string key7 = llList2String(keys, 7);
         string key8 = llList2String(keys, 8);
         string key9 = llList2String(keys, 9);
         string key10 = llList2String(keys, 10);
         string key11 = llList2String(keys, 11);
         string key12 = llList2String(keys, 12);
         string key13 = llList2String(keys, 13);
         string key14 = llList2String(keys, 14);
         string key15 = llList2String(keys, 15);
         string key16 = llList2String(keys, 16);

         string name0 = llList2String(names, 0);
         string name1 = llList2String(names, 1);
         string name2 = llList2String(names, 2);
         string name3 = llList2String(names, 3);
         string name4 = llList2String(names, 4);
         string name5 = llList2String(names, 5);
         string name6 = llList2String(names, 6);
         string name7 = llList2String(names, 7);
         string name8 = llList2String(names, 8);
         string name9 = llList2String(names, 9);
         string name10 = llList2String(names, 10);
         string name11 = llList2String(names, 11);
         string name12 = llList2String(names, 12);
         string name13 = llList2String(names, 13);
         string name14 = llList2String(names, 14);
         string name15 = llList2String(names, 15);
         string name16 = llList2String(names, 16);

         
        
        if (msg == "NEXT")
        {   gPos = gPos + gStride;
            dialog(id);
        }else if (msg == "PREVIOUS")
        {   gPos = gPos - gStride;
            dialog(id);
        }else if (msg == " ")
        {}
        
        
        
        //If you wanna do stuff to the Avatars Detected, you must do the same for all the 'else if' statements below
        
        
        else if (msg == name0)
        {
        llUnSit(key0);
        }
        else if (msg == name1)
        {
        llUnSit(key1);
        }
        else if (msg == name2)
        {
        llUnSit(key2);
        }
        else if (msg == name3)
        {
        llUnSit(key3);
        }
        else if (msg == name4)
        {
        llUnSit(key4);
        }
        else if (msg == name5)
        {
        llUnSit(key5);
        }
        else if (msg == name6)
        {
        llUnSit(key6);
        }
        else if (msg == name7)
        {
        llUnSit(key7);
        }
        else if (msg == name8)
        {
        llUnSit(key8);
        }
        else if (msg == name9)
        {
        llUnSit(key9);
        }
        else if (msg == name10)
        {
        llUnSit(key10);
        }
        else if (msg == name11)
        {
        llUnSit(key11);
        }
        else if (msg == name12)
        {
       llUnSit(key12);
        }
        else if (msg == name13)
        {
        llUnSit(key13);
        }
        else if (msg == name14)
        {
        llUnSit(key14);
        }
        else if (msg == name15)
        {
        llUnSit(key15);
        }
        else if (msg == name16)
        {
        llUnSit(key16);
        }
            
        
       
    }
} 

 Send Home Button:

//Formatted Sensor Dialog script by Evil Fool
//Modified by blazed Undercity
//Now its got a use, i modified to allow owner to do stuff to the ppl that are in the sensor's range



integer gOwnerOnly = FALSE;
integer gChann = -293190; //make your OWN unique channel to be sure your not on someone else's.
integer gStride = 9;
list names;
list keys;
integer gPos = 0;
key tReq;


dialog(key id) 
{
    integer nTop = gPos + gStride - 1;
    list buttons = llList2List(names, gPos, nTop);
    string msg = llDumpList2String(buttons, "\n");
    while(llGetListLength(buttons) % 3 != 0)
    { buttons = llListInsertList(buttons, [" "], gStride);
    }
    if (gPos >= gStride)
    { buttons += ["PREVIOUS"];
    }
    if (nTop - 1 < llGetListLength(names))
    { buttons += ["NEXT"];
    }
    llDialog(id, "Targets in Range: \n \n" + msg, buttons, gChann);
}

default
{
    state_entry()
    {
        llListen(gChann, "", NULL_KEY, "");
    }
    
    touch_start(integer num_times)
    {  if ( ( gOwnerOnly == TRUE && llDetectedKey(0) == llGetOwner() ) || gOwnerOnly == FALSE)
        {tReq = llDetectedKey(0);
         llSensor("", NULL_KEY, AGENT, 96.0, PI);
        }
    }
    
    sensor(integer num_detected)
    { 
        names = [];
        gPos = 0;
        integer i;

       
        for (i = 0; i < num_detected; i++)
        {
            names = names + llDetectedName(i);
        }
        
        keys = [];
        integer k;

       
        for (k = 0; k < num_detected; k++)
        {
            keys = keys + llDetectedKey(k);
        }
        
        dialog(tReq);

     
    }
    
    
    ///This script handles 16 keys & names associated with the dialog buttons. Feel free to add more.
        
    
    
    
    listen(integer channel, string name, key id, string msg) 
    {  
         string key0 = llList2String(keys, 0);
         string key1 = llList2String(keys, 1);
         string key2 = llList2String(keys, 2);
         string key3 = llList2String(keys, 3);
         string key4 = llList2String(keys, 4);
         string key5 = llList2String(keys, 5);
         string key6 = llList2String(keys, 6);
         string key7 = llList2String(keys, 7);
         string key8 = llList2String(keys, 8);
         string key9 = llList2String(keys, 9);
         string key10 = llList2String(keys, 10);
         string key11 = llList2String(keys, 11);
         string key12 = llList2String(keys, 12);
         string key13 = llList2String(keys, 13);
         string key14 = llList2String(keys, 14);
         string key15 = llList2String(keys, 15);
         string key16 = llList2String(keys, 16);

         string name0 = llList2String(names, 0);
         string name1 = llList2String(names, 1);
         string name2 = llList2String(names, 2);
         string name3 = llList2String(names, 3);
         string name4 = llList2String(names, 4);
         string name5 = llList2String(names, 5);
         string name6 = llList2String(names, 6);
         string name7 = llList2String(names, 7);
         string name8 = llList2String(names, 8);
         string name9 = llList2String(names, 9);
         string name10 = llList2String(names, 10);
         string name11 = llList2String(names, 11);
         string name12 = llList2String(names, 12);
         string name13 = llList2String(names, 13);
         string name14 = llList2String(names, 14);
         string name15 = llList2String(names, 15);
         string name16 = llList2String(names, 16);

         
        
        if (msg == "NEXT")
        {   gPos = gPos + gStride;
            dialog(id);
        }else if (msg == "PREVIOUS")
        {   gPos = gPos - gStride;
            dialog(id);
        }else if (msg == " ")
        {}
        
        
        
        //If you wanna do stuff to the Avatars Detected, you must do the same for all the 'else if' statements below
        
        
        else if (msg == name0)
        {
        llTeleportAgentHome(key0);
  
        }
        else if (msg == name1)
        {
        llTeleportAgentHome(key1);
        }
        else if (msg == name2)
        {
        llTeleportAgentHome(key2);
        }
        else if (msg == name3)
        {
        llTeleportAgentHome(key3);
        }
        else if (msg == name4)
        {
        llTeleportAgentHome(key4);
        }
        else if (msg == name5)
        {
        llTeleportAgentHome(key5);
        }
        else if (msg == name6)
        {
        llTeleportAgentHome(key6);
        }
        else if (msg == name7)
        {
        llTeleportAgentHome(key7);
        }
        else if (msg == name8)
        {
        llTeleportAgentHome(key8);
        }
        else if (msg == name9)
        {
        llTeleportAgentHome(key9);
        }
        else if (msg == name10)
        {
        llTeleportAgentHome(key10);
        }
        else if (msg == name11)
        {
        llTeleportAgentHome(key11);
        }
        else if (msg == name12)
        {
       llTeleportAgentHome(key12);
        }
        else if (msg == name13)
        {
        llTeleportAgentHome(key13);
        }
        else if (msg == name14)
        {
        llTeleportAgentHome(key14);
        }
        else if (msg == name15)
        {
        llTeleportAgentHome(key15);
        }
        else if (msg == name16)
        {
        llTeleportAgentHome(key16);
        }
            

}} 

 Eject Button Script:

//Formatted Sensor Dialog script by Evil Fool
//Modified by blazed Undercity
//Now its got a use, i modified to allow owner to do stuff to the ppl that are in the sensor's range



integer gOwnerOnly = FALSE;
integer gChann = -293190; //make your OWN unique channel to be sure your not on someone else's.
integer gStride = 9;
list names;
list keys;
integer gPos = 0;
key tReq;


dialog(key id) 
{
    integer nTop = gPos + gStride - 1;
    list buttons = llList2List(names, gPos, nTop);
    string msg = llDumpList2String(buttons, "\n");
    while(llGetListLength(buttons) % 3 != 0)
    { buttons = llListInsertList(buttons, [" "], gStride);
    }
    if (gPos >= gStride)
    { buttons += ["PREVIOUS"];
    }
    if (nTop - 1 < llGetListLength(names))
    { buttons += ["NEXT"];
    }
    llDialog(id, "Targets in Range: \n \n" + msg, buttons, gChann);
}

default
{
    state_entry()
    {
        llListen(gChann, "", NULL_KEY, "");
    }
    
    touch_start(integer num_times)
    {  if ( ( gOwnerOnly == TRUE && llDetectedKey(0) == llGetOwner() ) || gOwnerOnly == FALSE)
        {tReq = llDetectedKey(0);
         llSensor("", NULL_KEY, AGENT, 96.0, PI);
        }
    }
    
    sensor(integer num_detected)
    { 
        names = [];
        gPos = 0;
        integer i;

       
        for (i = 0; i < num_detected; i++)
        {
            names = names + llDetectedName(i);
        }
        
        keys = [];
        integer k;

       
        for (k = 0; k < num_detected; k++)
        {
            keys = keys + llDetectedKey(k);
        }
        
        dialog(tReq);

     
    }
    
    
    ///This script handles 16 keys & names associated with the dialog buttons. Feel free to add more.
        
    
    
    
    listen(integer channel, string name, key id, string msg) 
    {  
         string key0 = llList2String(keys, 0);
         string key1 = llList2String(keys, 1);
         string key2 = llList2String(keys, 2);
         string key3 = llList2String(keys, 3);
         string key4 = llList2String(keys, 4);
         string key5 = llList2String(keys, 5);
         string key6 = llList2String(keys, 6);
         string key7 = llList2String(keys, 7);
         string key8 = llList2String(keys, 8);
         string key9 = llList2String(keys, 9);
         string key10 = llList2String(keys, 10);
         string key11 = llList2String(keys, 11);
         string key12 = llList2String(keys, 12);
         string key13 = llList2String(keys, 13);
         string key14 = llList2String(keys, 14);
         string key15 = llList2String(keys, 15);
         string key16 = llList2String(keys, 16);

         string name0 = llList2String(names, 0);
         string name1 = llList2String(names, 1);
         string name2 = llList2String(names, 2);
         string name3 = llList2String(names, 3);
         string name4 = llList2String(names, 4);
         string name5 = llList2String(names, 5);
         string name6 = llList2String(names, 6);
         string name7 = llList2String(names, 7);
         string name8 = llList2String(names, 8);
         string name9 = llList2String(names, 9);
         string name10 = llList2String(names, 10);
         string name11 = llList2String(names, 11);
         string name12 = llList2String(names, 12);
         string name13 = llList2String(names, 13);
         string name14 = llList2String(names, 14);
         string name15 = llList2String(names, 15);
         string name16 = llList2String(names, 16);

         
        
        if (msg == "NEXT")
        {   gPos = gPos + gStride;
            dialog(id);
        }else if (msg == "PREVIOUS")
        {   gPos = gPos - gStride;
            dialog(id);
        }else if (msg == " ")
        {}
        
        
        
        //If you wanna do stuff to the Avatars Detected, you must do the same for all the 'else if' statements below
        
        
        else if (msg == name0)
        {
        llEjectFromLand(key0);
        }
        else if (msg == name1)
        {
        llEjectFromLand(key1);
        }
        else if (msg == name2)
        {
        llEjectFromLand(key2);
        }
        else if (msg == name3)
        {
        llEjectFromLand(key3);
        }
        else if (msg == name4)
        {
        llEjectFromLand(key4);
        }
        else if (msg == name5)
        {
        llEjectFromLand(key5);
        }
        else if (msg == name6)
        {
        llEjectFromLand(key6);
        }
        else if (msg == name7)
        {
        llEjectFromLand(key7);
        }
        else if (msg == name8)
        {
        llEjectFromLand(key8);
        }
        else if (msg == name9)
        {
        llEjectFromLand(key9);
        }
        else if (msg == name10)
        {
        llEjectFromLand(key10);
        }
        else if (msg == name11)
        {
        llEjectFromLand(key11);
        }
        else if (msg == name12)
        {
       llEjectFromLand(key12);
        }
        else if (msg == name13)
        {
        llEjectFromLand(key13);
        }
        else if (msg == name14)
        {
        llEjectFromLand(key14);
        }
        else if (msg == name15)
        {
        llEjectFromLand(key15);
        }
        else if (msg == name16)
        {
        llEjectFromLand(key16);
        }
            
        
        
    }
} 

 Ban Button:

//Formatted Sensor Dialog script by Evil Fool
//Modified by blazed Undercity
//Now its got a use, i modified to allow owner to do stuff to the ppl that are in the sensor's range



integer gOwnerOnly = FALSE;
integer gChann = -293190; //make your OWN unique channel to be sure your not on someone else's.
integer gStride = 9;
list names;
list keys;
integer gPos = 0;
key tReq;


dialog(key id) 
{
    integer nTop = gPos + gStride - 1;
    list buttons = llList2List(names, gPos, nTop);
    string msg = llDumpList2String(buttons, "\n");
    while(llGetListLength(buttons) % 3 != 0)
    { buttons = llListInsertList(buttons, [" "], gStride);
    }
    if (gPos >= gStride)
    { buttons += ["PREVIOUS"];
    }
    if (nTop - 1 < llGetListLength(names))
    { buttons += ["NEXT"];
    }
    llDialog(id, "Targets in Range: \n \n" + msg, buttons, gChann);
}

default
{
    state_entry()
    {
        llListen(gChann, "", NULL_KEY, "");
    }
    
    touch_start(integer num_times)
    {  if ( ( gOwnerOnly == TRUE && llDetectedKey(0) == llGetOwner() ) || gOwnerOnly == FALSE)
        {tReq = llDetectedKey(0);
         llSensor("", NULL_KEY, AGENT, 96.0, PI);
        }
    }
    
    sensor(integer num_detected)
    { 
        names = [];
        gPos = 0;
        integer i;

       
        for (i = 0; i < num_detected; i++)
        {
            names = names + llDetectedName(i);
        }
        
        keys = [];
        integer k;

       
        for (k = 0; k < num_detected; k++)
        {
            keys = keys + llDetectedKey(k);
        }
        
        dialog(tReq);

     
    }
    
    
    ///This script handles 16 keys & names associated with the dialog buttons. Feel free to add more.
        
    
    
    
    listen(integer channel, string name, key id, string msg) 
    {  
         string key0 = llList2String(keys, 0);
         string key1 = llList2String(keys, 1);
         string key2 = llList2String(keys, 2);
         string key3 = llList2String(keys, 3);
         string key4 = llList2String(keys, 4);
         string key5 = llList2String(keys, 5);
         string key6 = llList2String(keys, 6);
         string key7 = llList2String(keys, 7);
         string key8 = llList2String(keys, 8);
         string key9 = llList2String(keys, 9);
         string key10 = llList2String(keys, 10);
         string key11 = llList2String(keys, 11);
         string key12 = llList2String(keys, 12);
         string key13 = llList2String(keys, 13);
         string key14 = llList2String(keys, 14);
         string key15 = llList2String(keys, 15);
         string key16 = llList2String(keys, 16);

         string name0 = llList2String(names, 0);
         string name1 = llList2String(names, 1);
         string name2 = llList2String(names, 2);
         string name3 = llList2String(names, 3);
         string name4 = llList2String(names, 4);
         string name5 = llList2String(names, 5);
         string name6 = llList2String(names, 6);
         string name7 = llList2String(names, 7);
         string name8 = llList2String(names, 8);
         string name9 = llList2String(names, 9);
         string name10 = llList2String(names, 10);
         string name11 = llList2String(names, 11);
         string name12 = llList2String(names, 12);
         string name13 = llList2String(names, 13);
         string name14 = llList2String(names, 14);
         string name15 = llList2String(names, 15);
         string name16 = llList2String(names, 16);

         
        
        if (msg == "NEXT")
        {   gPos = gPos + gStride;
            dialog(id);
        }else if (msg == "PREVIOUS")
        {   gPos = gPos - gStride;
            dialog(id);
        }else if (msg == " ")
        {}
        
        
        
        //If you wanna do stuff to the Avatars Detected, you must do the same for all the 'else if' statements below
        
        
        else if (msg == name0)
        {
        llAddToLandBanList(key0,0);
        }
        else if (msg == name1)
        {
        llAddToLandBanList(key1,0);
        }
        else if (msg == name2)
        {
        llAddToLandBanList(key2,0);
        }
        else if (msg == name3)
        {
        llAddToLandBanList(key3,0);
        }
        else if (msg == name4)
        {
        llAddToLandBanList(key4,0);
        }
        else if (msg == name5)
        {
        llAddToLandBanList(key5,0);
        }
        else if (msg == name6)
        {
        llAddToLandBanList(key6,0);
        }
        else if (msg == name7)
        {
        llAddToLandBanList(key7,0);
        }
        else if (msg == name8)
        {
        llAddToLandBanList(key8,0);
        }
        else if (msg == name9)
        {
        llAddToLandBanList(key9,0);
        }
        else if (msg == name10)
        {
        llAddToLandBanList(key10,0);
        }
        else if (msg == name11)
        {
        llAddToLandBanList(key11,0);
        }
        else if (msg == name12)
        {
       llAddToLandBanList(key12,0);
        }
        else if (msg == name13)
        {
        llAddToLandBanList(key13,0);
        }
        else if (msg == name14)
        {
        llAddToLandBanList(key14,0);
        }
        else if (msg == name15)
        {
        llAddToLandBanList(key15,0);
        }
        else if (msg == name16)
        {
        llAddToLandBanList(key16,0);
        }
            
        
        
    }
}