This script was tested and works on OpenSim version 0.7.4!

collision_alarm.lsl
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
integer enableRLV = FALSE;
 
default {
    state_entry() {
        integer comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) ^ 0x3FFFFFFF) & 0xBFFFFFFF;
        llListen(comChannel, "", llGetOwner(), "");
        llOwnerSay("@version=" + (string)comChannel);
        llSetTimerEvent(30);
    }
    listen(integer channel, string name, key id, string message) {
        if(llStringLength(message) != 0) enableRLV = TRUE;
        state detect;
    }
    timer() {
        state detect;
    }
    on_rez(integer num) {
        llResetScript();
    }
}
 
state detect
{
    collision_start(integer num) {
        if(llDetectedType(0) & AGENT) jump hiss;
        return;
@hiss; 
        vector pointTo = llDetectedPos(0) - llGetPos();
        if(enableRLV == TRUE) llOwnerSay("@setrot:" + (string)llAtan2(pointTo.x, pointTo.y) + "=force");
        llPlaySound("Hiss_" + (string)((integer)llFrand(10)), 1);
        llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
    }
    run_time_permissions(integer perm) {
        if(perm & PERMISSION_TRIGGER_ANIMATION) {
            llStartAnimation("Scratch");
            return;
        }
    }
    on_rez(integer num) {
        llResetScript();
    }
}