list g_lFillers; whoFilling(vector vPos) { integer iMaxPrims = llGetParcelMaxPrims(vPos, TRUE); list lAgents = llGetAgentList(AGENT_LIST_REGION, []); integer iMax = llGetListLength(lAgents); integer iCount; for (iCount = 0; iCount < iMax; iCount++){ key kAgent = llList2Key(lAgents, iCount); integer iAgentInfo = llGetAgentInfo(kAgent); list lDetails = llGetObjectDetails(kAgent, [OBJECT_ROOT, OBJECT_NAME]); key kObject = llList2Key(lDetails, 0); string sAvatar = llList2String(lDetails, 1); if (iAgentInfo & AGENT_ON_OBJECT) { if (kAgent != kObject) { list lObjDetails = llGetObjectDetails( kObject, [OBJECT_NAME, OBJECT_PRIM_EQUIVALENCE]); string sObjName = llList2String(lObjDetails, 0); integer iNPrims = llList2Integer(lObjDetails, 1); if (iNPrims > iMaxPrims) { if (llListFindList(g_lFillers, [ kAgent ]) == -1) { g_lFillers = g_lFillers + [ kAgent ]; llOwnerSay(sAvatar + " is overfilling the parcel."); llPlaySound("cb59c4cd-9ecd-0b66-a564-927a6a0e4ffc", 1.0); } } else { integer iPos = llListFindList(g_lFillers, [ kAgent ]); if (iPos >= 0) { g_lFillers = llDeleteSubList(g_lFillers, iPos, iPos); llOwnerSay(sAvatar + " stopped overfill the parcel."); llPlaySound("06097e08-d880-6684-627c-dce5e4c6cf13", 1.0); } } } } } } integer isOverFilled(vector vPos) { integer bResult = FALSE; integer iMaxPrimsT = llGetParcelMaxPrims(vPos, TRUE); integer iTotalRe = llGetParcelPrimCount(vPos, PARCEL_COUNT_TEMP, TRUE); if (iTotalRe > iMaxPrimsT) { bResult = TRUE; } return bResult; } default { state_entry() { g_lFillers = []; llSetTimerEvent(2.0); } on_rez(integer start_param) { g_lFillers = []; } timer() { vector vPos = llGetPos(); if (isOverFilled(llGetPos()) == TRUE) { whoFilling(vPos); } else { if (llGetListLength(g_lFillers) > 0) { whoFilling(vPos); } } } changed(integer change) { if ((change & CHANGED_REGION) == CHANGED_REGION) { g_lFillers = []; } } }