Jump to content

KeyFrame Attack Detector Script


JJValero Writer
 Share

You are about to reply to a thread that has been inactive for 1467 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

In same sites like the region Barbarossa or same sandbox there are grieffers using Keyframe attacks. Those attacks are able to enter in "no entry" parcels. 

Due those attacks are not detected by the SL client or Firestorm i created this script.

Create a little orb and put the script inside and add to your avatar.

 

default {
    state_entry() {
    }

    attach(key id) {
        if (id == NULL_KEY) {
            if (llGetPermissions() & PERMISSION_TAKE_CONTROLS) {
                llReleaseControls();
                llSetTimerEvent(0.0);
            }
        } else {
            llRequestPermissions(id, PERMISSION_TAKE_CONTROLS);
        }
    }
    
    run_time_permissions(integer perm) {
        if (perm & PERMISSION_TAKE_CONTROLS) {
            llTakeControls( CONTROL_ML_LBUTTON , TRUE, TRUE);
        }
    }

    control(key id, integer level, integer edge) {
    }

    collision_start(integer num) {
        
        integer cnt;
        for (cnt = 0; cnt < num; cnt++) {
            
            integer type = llDetectedType(cnt);
            string name = llDetectedName(cnt);
            string ownerId = llDetectedOwner(cnt);
            
            key kObject = llDetectedKey(cnt);
            list lResults = llGetObjectDetails(kObject, [ OBJECT_PHYSICS ]);
            
            if ((type & (ACTIVE | SCRIPTED) ) != 0) {
                
                integer bIsPhysical = llList2Integer(lResults, 0);
                if (bIsPhysical == FALSE) {
                    
                    float fVel = llVecMag(llDetectedVel(cnt));
                    // Can be a NPV, frame Orbiter, frame pusher, elevator, ....
                    if (fVel > 30.0) {
                        llOwnerSay("keyframe : '" + name + "'  Speed: '" + (string) fVel + "'   Owner: secondlife:///app/agent/" + ownerId + "/about");
                    } // if
                }
            }
        }
        
    }
    
    collision_end(integer num) {
    }
}

 

 

 

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1467 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...