Difference between revisions of "User:Jana Kamachi/QC"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{Jana}} This version of the dector script will send objects fired at you from "Quantum Core" back into the owners face. Go Poor Coding! <pre> list dtc = []; list darl = []; integer darl...)
 
 
Line 2: Line 2:


This version of the dector script will send objects fired at you from "Quantum Core" back into the owners face. Go Poor Coding!
This version of the dector script will send objects fired at you from "Quantum Core" back into the owners face. Go Poor Coding!
  I need to update this, another user kindly improved the !Detect script this is based on.
<pre>
<pre>
list dtc = [];
list dtc = [];

Latest revision as of 01:43, 20 November 2007

If you like this script, or any script I've released, please post on my Talk page, or I'll most likely never see it o: If you want to improve a script, just go for it!


This version of the dector script will send objects fired at you from "Quantum Core" back into the owners face. Go Poor Coding!

 I need to update this, another user kindly improved the !Detect script this is based on.
list dtc = [];
list darl = [];

integer darl_d = FALSE;
integer cnt = 0;

vector lastpos;
vector curpos;

list chans = [8];
list names = ["Omicron HUD 1.3.3"];

default
{
    state_entry()
    {
        llSensorRepeat("","",SCRIPTED,0.6,PI*2,0.01);   
        llSetTimerEvent(0.01);
        lastpos = llGetPos();
    }
    
    sensor(integer n_m){
        integer i=0;
        list tmp;
        list maker;
        for(i=0;i<n_m;i++) {
            tmp+= [llDetectedName(i) + " owned by " + llKey2Name(llGetOwnerKey(llDetectedKey(i)))];
            maker = llGetObjectDetails(llDetectedKey(i),[OBJECT_CREATOR,OBJECT_DESC]);
            //llOwnerSay(llList2CSV(maker));
            if(llList2Key(maker,0) == "3f299d99-94c4-4c5c-aca3-b7721075ea4b" && llListFindList(darl,[llDetectedKey(i)]) == -1){
                llRegionSay((integer)llList2String(maker,1),llGetOwnerKey(llDetectedKey(i))); 
                llOwnerSay("Quantum Core Attack Detected, attempting to reverse...");
                darl+=[llDetectedKey(i)];
            } 
            if(llList2Key(maker,0) == "d9e62346-2ee3-43d7-84d9-f7860dc8bf7e" && llListFindList(darl,[llDetectedKey(i)]) == -1){
                llOwnerSay("Omicron HUD Attack Detected by " + llKey2Name(llGetOwnerKey(llDetectedKey(i))));
                darl+=[llDetectedKey(i)];   
            }
            if(i>2)
                jump out;   
        }
        @out;
        dtc = tmp;
    }
    
    timer(){
            cnt = cnt + 1;
            if(llVecDist(lastpos,llGetPos()) > 10000){
                llOwnerSay("Orbit Detected.");
                llOwnerSay("Possible Orbiters\n" + llDumpList2String(dtc,"\n"));  
                cnt = 501;
                lastpos = llGetPos(); 
            }
            if(cnt > 500){  
                lastpos = llGetPos();
                cnt = 0;
            }
    }
}