28 Commits
master ... sl

Author SHA1 Message Date
lickx
5049d3bd2d Merge branch 'master' into sl 2025-12-25 16:54:32 +01:00
lickx
10789cf557 Remove the heel stuff here too (for SL) 2025-12-13 13:28:21 +01:00
lickx
c02833452e heel_height and platform_height are unusable on sl
In SL, each always returns exactly 1 if higher than 0.0
Only OpenSim has this working correctly

So for now heel/platform height is not taken into account
anymore when setting the sitoffset on SL otherwise the avi
moves up 2 meter with SitAnywhere.
2025-12-13 13:19:05 +01:00
lickx
79499f0e2e Merge branch 'master' into sl 2025-05-31 06:29:06 +02:00
lickx
89bc04e740 Similar changes as in Tamai branch 2025-01-26 04:34:32 +01:00
lickx
d93484867a Use UUIDs instead of inventory textures 2024-12-24 13:17:17 +01:00
lickx
16d7539120 Remove shoe offset stuff 2024-12-24 12:56:12 +01:00
lickx
2d2b800ef6 Merge branch 'master' into sl 2024-06-28 04:43:17 +02:00
lickx
42d265808b Merge branch 'master' into sl 2024-03-17 10:30:23 +01:00
lickx
4209a40789 Check perms before enabling/disabling
In the case the user revoked them for whatever reason (common in OS)
2024-03-16 06:08:48 +01:00
lickx
430a520ad2 Drop cmdline heeloffset feature to save memory 2024-03-16 04:03:42 +01:00
lickx
8f6ee76a01 Merge branch 'master' into sl 2024-02-17 16:06:46 +01:00
lickx
845d9ea4ca Update AO comparison 2023-12-03 02:40:44 +01:00
lickx
dfd48aae09 Workaround for @attachallover not needed anymore for SL 2023-11-29 17:02:07 +01:00
lickx
6115efee3c Temporary workaround for a bug with AISv3 2023-11-11 04:32:11 +01:00
lickx
1038e20155 Merge branch 'master' into sl 2023-11-11 04:30:21 +01:00
lickx
40e0fa1489 Remove some OS specific stuff 2023-09-10 00:03:24 +02:00
lickx
d6b97be09f Revert "Use yengine to catch ossl exception when saving #91"
This reverts commit 5d7bf7334b.
2023-09-10 00:00:18 +02:00
lickx
72447d92d3 Merge branch 'master' into sl 2023-09-06 16:48:41 +02:00
lickx
2bc31e17b3 Merge branch 'master' into sl 2023-09-06 16:32:59 +02:00
lickx
cf700ca621 Finish the SL port of the collar 2023-03-29 07:37:51 +02:00
lickx
d9e1842ac4 Merge branch 'master' into sl 2023-03-11 08:30:34 +01:00
lickx
45b31ad5c9 Merge branch 'master' into sl 2023-02-20 08:27:34 +01:00
lickx
b4cad0ecec Merge branch 'master' into sl 2023-02-13 03:49:58 +01:00
lickx
4c62b9a62a Make use of the new llReplaceSubString() 2023-02-02 04:00:33 +01:00
lickx
201f378335 More optimizations, bring back multi groundsit 2023-01-26 15:18:18 +01:00
lickx
e89a9c5a82 Make the AO work somehow
Had to strip a lot out
Currently for groundsits only 1 sit is supported
2023-01-26 06:22:42 +01:00
lickx
a8eb0c1938 SL support, untested
Might not compile, will correct later
2023-01-25 07:05:07 +01:00
18 changed files with 97 additions and 137 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -103,7 +103,7 @@ FindButtons()
g_lPrimOrder = [0, LINK_ROOT]; // '1' - root prim
integer i;
for (i = 2; i <= llGetNumberOfPrims(); ++i) {
g_lButtons += llGetLinkName(i);
g_lButtons += [llGetLinkName(i)];
g_lPrimOrder += i;
}
}
@@ -112,17 +112,17 @@ DoTextures(string style)
{
list lTextures = [
"Dark",
"Minimize~button_dark_opensim",
"Power~button_dark_io",
"SitAny~button_dark_groundsit",
"Menu~button_dark_menu",
"Device~button_dark_device",
"Minimize~dc120517-1ff3-11fd-5ea8-f34423a7a664",
"Power~932903e4-5054-9cc1-04da-7b18379e2fa3",
"SitAny~a0909a18-f525-a40c-9201-9a7a5634b2de",
"Menu~b68efeba-0a3b-6eff-5b18-9fbb3833eeca",
"Device~4c811a48-7dce-8a7f-0ee8-1af22fa0099a",
"Light",
"Minimize~button_light_opensim",
"Power~button_light_io",
"SitAny~button_light_groundsit",
"Menu~button_light_menu",
"Device~button_light_device"
"Minimize~9ddcd586-ecd7-5662-7482-bc4089fe09e8",
"Power~8ebe634c-3243-3443-6017-16afa20ee421",
"SitAny~182c14e4-a9c8-e71f-38bd-d91716abb782",
"Menu~4c963ffd-d948-b8d4-7290-12e11d650e56",
"Device~6e950b0b-3cc7-ef75-7885-8689d2b9a5e7"
];
integer i = llListFindList(lTextures, [style]);
integer iEnd = i + (llGetListLength(lTextures)/2) - 1;
@@ -139,7 +139,6 @@ DoTextures(string style)
}
}
g_sStyle = style;
StoreSettings();
}
DefinePosition()
@@ -328,7 +327,7 @@ list SortButtons(list lButtons, list lStaticButtons)
lAllButtons = lButtons + lStaticButtons;
}
while (llGetListLength(lAllButtons) % 3 != 0 && llGetListLength(lAllButtons) < 12) {
lSpacers += "-";
lSpacers += ["-"];
lAllButtons = lButtons + lSpacers + lStaticButtons;
}
integer i = llListFindList(lAllButtons, ["BACK"]);
@@ -355,7 +354,7 @@ MenuAO(key kID)
else lButtons += ["Shuffle ☐"];
lButtons += ["Stand Time","Next Stand"];
if (kID == g_kWearer) lButtons += ["HUD Style"];
Dialog(kID, sPrompt, lButtons, ["Cancel"], "AO");
Dialog(kID, sPrompt, lButtons, ["Close"], "AO");
}
MenuLoad(key kID, integer iPage)
@@ -389,7 +388,7 @@ MenuLoad(key kID, integer iPage)
g_iNumberOfPages = llGetListLength(lButtons) / 9;
lButtons = llList2List(lButtons, iPage*9, iPage*9+8);
}
if (llGetListLength(lButtons) == 0) llOwnerSay("There aren't any animation sets installed!");
if (lButtons == []) llOwnerSay("There aren't any animation sets installed!");
Dialog(kID, sPrompt, lButtons, lStaticButtons,"Load");
}
@@ -418,7 +417,7 @@ MenuChooseAnim(key kID, string sAnimState, integer iUpDown)
integer iEnd = llGetListLength(g_lAnims2Choose);
integer i = 0;
while (++i <= iEnd) {
lButtons += (string)i;
lButtons += [(string)i];
sPrompt += "\n"+(string)i+": "+llList2String(g_lAnims2Choose, i-1);
}
if (iUpDown) Dialog(kID, sPrompt, lButtons, ["▲", "▼", "BACK"], sAnimState);
@@ -455,7 +454,7 @@ TranslateCollarCMD(string sCommand, key kID)
if (llSubStringIndex(sCommand,"stand") == 0) {
if (llSubStringIndex(sCommand, "off") != -1) {
g_iStandPause = TRUE;
if (llGetAnimationOverride("Standing") != "")
if (llGetAnimationOverride("Standing"))
llResetAnimationOverride("Standing");
llResetAnimationOverride("Turning Left");
llResetAnimationOverride("Turning Right");
@@ -535,71 +534,12 @@ StartUpdate(key kID)
llRegionSayTo(kID, -7483220, "ready|" + (string)iPin);
}
StoreSettings()
{
string sSettings;
string sOldSettings;
sSettings += "on="+(string)g_iAO_ON;
sSettings += "~card="+g_sCard;
sSettings += "~i="+(string)g_iChangeInterval;
sSettings += "~l="+(string)g_iLocked;
sSettings += "~rnd="+(string)g_iShuffle;
sSettings += "~sp="+(string)g_iStandPause;
sSettings += "~st="+g_sStyle;
// Now write them away only if changed (to spare the asset server):
sOldSettings = llList2String(llGetLinkPrimitiveParams(osGetLinkNumber("Menu"), [PRIM_DESC]), 0);
if (sOldSettings != sSettings)
llSetLinkPrimitiveParamsFast(osGetLinkNumber("Menu"), [PRIM_DESC, sSettings]);
// Put g_sWalkAnim on a seperate prim, as max desc length is 63 characters:
sSettings = "wa="+g_sWalkAnim;
sOldSettings = llList2String(llGetLinkPrimitiveParams(osGetLinkNumber("Power"), [PRIM_DESC]), 0);
if (sOldSettings != sSettings)
llSetLinkPrimitiveParamsFast(osGetLinkNumber("Power"), [PRIM_DESC, sSettings]);
// Put sit settings on a seperate prim, as max desc length is 63 characters:
sSettings = "~s="+(string)g_iSitAnimOn;
sSettings += "~so="+llGetSubString((string)g_fSitOffset, 0, 3);
sSettings += "~sa="+g_sSitAnim;
sOldSettings = llList2String(llGetLinkPrimitiveParams(osGetLinkNumber("SitAny"), [PRIM_DESC]), 0);
if (sOldSettings != sSettings)
llSetLinkPrimitiveParamsFast(osGetLinkNumber("SitAny"), [PRIM_DESC, sSettings]);
// Clean up root prim description if needed as we don't use it:
sOldSettings = llList2String(llGetLinkPrimitiveParams(LINK_ROOT, [PRIM_DESC]), 0);
if (llSubStringIndex(sOldSettings, "~") != -1)
llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_DESC, ""]);
}
RestoreSettings()
{
integer iLink = LINK_ROOT;
for (iLink = LINK_ROOT; iLink <= llGetNumberOfPrims(); iLink++) {
string sSettings = llList2String(llGetLinkPrimitiveParams(iLink, [PRIM_DESC]), 0);
list lSettings = llParseString2List(sSettings, ["~","="], []);
integer i;
for (i = 0; i < llGetListLength(lSettings); i += 2) {
string sKey = llList2String(lSettings, i);
string sValue = llList2String(lSettings, i + 1);
if (sKey == "on") g_iAO_ON = (integer)sValue;
else if (sKey == "card") g_sCard = sValue;
else if (sKey == "s") g_iSitAnimOn = (integer)sValue;
else if (sKey == "sa") g_sSitAnim = sValue;
else if (sKey == "wa") g_sWalkAnim = sValue;
else if (sKey == "i") g_iChangeInterval = (integer)sValue;
else if (sKey == "l") g_iLocked = (integer)sValue;
else if (sKey == "rnd") g_iShuffle = (integer)sValue;
else if (sKey == "sp") g_iStandPause = (integer)sValue;
else if (sKey == "so") g_fSitOffset = (float)sValue;
else if (sKey == "st") g_sStyle = sValue;
}
}
}
default
{
state_entry()
{
if (llGetInventoryType("oc_installer_sys") == INVENTORY_SCRIPT) return;
g_kWearer = llGetOwner();
RestoreSettings();
g_iInterfaceChannel = -llAbs((integer)("0x" + llGetSubString(g_kWearer,30,-1)));
llListen(g_iInterfaceChannel, "", "", "");
g_iHUDChannel = -llAbs((integer)("0x"+llGetSubString((string)llGetOwner(),-7,-1)));
@@ -612,6 +552,7 @@ default
g_sJson_Anims = "{}";
g_kCard = llGetNotecardLine(g_sCard, g_iCardLine);
} else MenuLoad(g_kWearer,0);
g_iTimerRlvDetect = llGetUnixTime() + 120;
g_iRLVOn = FALSE;
g_iTimerRlvDetect = llGetUnixTime() + 120;
g_iRlvListener = llListen(519274, "", (string)g_kWearer, "");
@@ -623,7 +564,6 @@ default
on_rez(integer iStart)
{
if (g_kWearer != llGetOwner()) llResetScript();
RestoreSettings();
g_iReady = FALSE;
if (llGetAttached()) {
if (g_iLocked) llOwnerSay("@detach=n");
@@ -665,7 +605,6 @@ default
} else if (sButton == "Power") {
if (g_iAO_ON) Command(g_kWearer, "off");
else if (g_iReady) Command(g_kWearer, "on");
StoreSettings();
} else if (sButton == "Device") {
llRegionSayTo(llGetOwner(), g_iHUDChannel, "menu");
}
@@ -700,6 +639,7 @@ default
TranslateCollarCMD(llList2String(lParams, 2), llList2Key(lParams, 3));
}
} else if (iChannel == 519274) {
g_iTimerRlvDetect = 0;
g_iRLVOn = TRUE;
llListenRemove(g_iRlvListener);
llSetTimerEvent(5.0);
@@ -710,7 +650,7 @@ default
g_lMenuIDs = llDeleteSubList(g_lMenuIDs, iMenuIndex, iMenuIndex+4);
if (llGetListLength(g_lMenuIDs) == 0 && g_iTimerDialogTimeout) g_iTimerDialogTimeout = 0;
if (sMenuType == "AO") {
if (sMessage == "Cancel") return;
if (sMessage == "Close") return;
else if (sMessage == "-") MenuAO(kID);
else if (sMessage == "Collar Menu") llRegionSayTo(g_kWearer, g_iHUDChannel, (string)g_kWearer+":menu");
else if (llSubStringIndex(sMessage,"LOCK") != -1) {
@@ -725,7 +665,7 @@ default
if (llSubStringIndex(sMessage,"☑") >= 0) {
g_iSitAnimOn = FALSE;
llResetAnimationOverride("Sitting");
} else if (g_sSitAnim != "") {
} else if (g_sSitAnim) {
g_iSitAnimOn = TRUE;
if (g_iAO_ON) llSetAnimationOverride("Sitting", g_sSitAnim);
} else Notify(kID,"Sorry, the currently loaded animation set doesn't have any sits.",TRUE);
@@ -739,7 +679,6 @@ default
else g_iShuffle = TRUE;
MenuAO(kID);
}
StoreSettings();
} else if (sMenuType == "Load") {
integer index = llListFindList(g_lCustomCards, [sMessage]);
if (index != -1) sMessage = llList2String(g_lCustomCards, index-1);
@@ -780,7 +719,6 @@ default
} else if (sMessage == "▲" || sMessage == "▼") {
if (sMessage == "▲") g_fSitOffset += 0.025;
else g_fSitOffset -= 0.025;
StoreSettings();
AdjustSitOffset();
MenuChooseAnim(kID, sMenuType, TRUE);
} else if (sMessage == "-") {
@@ -897,12 +835,12 @@ default
g_sSitAnywhereAnim = llList2String(lTemp, 0);
else if (sAnimationState == "Sitting") {
g_sSitAnim = llList2String(lTemp, 0);
if (g_sSitAnim != "") g_iSitAnimOn = TRUE;
if (g_sSitAnim) g_iSitAnimOn = TRUE;
else g_iSitAnimOn = FALSE;
} else if (sAnimationState == "Walking")
g_sWalkAnim = llList2String(lTemp, 0);
else if (sAnimationState != "Standing") lTemp = llList2List(lTemp, 0, 0);
if (llGetListLength(lTemp)) g_sJson_Anims = llJsonSetValue(g_sJson_Anims, [sAnimationState], llDumpList2String(lTemp,"|"));
if (lTemp != []) g_sJson_Anims = llJsonSetValue(g_sJson_Anims, [sAnimationState], llDumpList2String(lTemp,"|"));
}
@next;
g_kCard = llGetNotecardLine(g_sCard, ++g_iCardLine);
@@ -919,7 +857,6 @@ default
} else {
llOwnerSay("The \""+g_sCard+"\" animation set was loaded successfully.");
g_iAO_ON = TRUE;
StoreSettings();
}
DoStatus();
if (llGetAttached()) llRequestPermissions(g_kWearer,PERMISSION_OVERRIDE_ANIMATIONS | PERMISSION_TAKE_CONTROLS);

View File

@@ -146,7 +146,13 @@ ClearCam()
llMessageLinked(LINK_SAVE, LM_SETTING_DELETE, g_sSettingToken + "all", "");
}
CamFocus(vector g_vCamPos, rotation g_rCamRot) {
rotation Slerp(rotation a, rotation b, float t)
{
return llAxisAngle2Rot( llRot2Axis(b /= a), t * llRot2Angle(b)) * a;
}//Written collectively, Taken from http://forums-archive.secondlife.com/54/3b/50692/1.html
CamFocus(vector g_vCamPos, rotation g_rCamRot)
{
vector vStartPose = llGetCameraPos();
rotation rStartRot = llGetCameraRot();
float fSteps = 8.0;
@@ -161,7 +167,7 @@ CamFocus(vector g_vCamPos, rotation g_rCamRot) {
for(fCurrentStep = 0.0; fCurrentStep <= fSteps; ++fCurrentStep) {
//Set next position in tween
vector vNextPos = vStartPose + (vPosStep * fCurrentStep);
rotation rNextRot = osSlerp(rStartRot, g_rCamRot, fCurrentStep / fSteps);
rotation rNextRot = Slerp(rStartRot, g_rCamRot, fCurrentStep / fSteps);
//Set camera parameters
llSetCameraParams([
CAMERA_ACTIVE, 1, //1 is active, 0 is inactive

View File

@@ -409,7 +409,7 @@ UserCommand(integer iAuth, string sStr, key kID, integer iRemenu)
if (iAuth!=CMD_OWNER && !(sAction == "trust" && kID == g_sWearerID)) {
llMessageLinked(LINK_DIALOG, NOTIFY, "0"+"%NOACCESS%", kID);
if (iRemenu) AuthMenu(kID, Auth(kID));
} else if (osIsUUID(sTmpID)){
} else if ((key)sTmpID){
AddUniquePerson(sTmpID, sAction, kID);
if (iRemenu) Dialog(kID, "\nChoose who to add to the "+sAction+" list:\n", [sTmpID], [UPMENU], 0, Auth(kID),"AddAvi"+sAction, TRUE);
} else {
@@ -423,7 +423,7 @@ UserCommand(integer iAuth, string sStr, key kID, integer iRemenu)
if (iAuth != CMD_OWNER && !( sAction == "trust" && kID == g_sWearerID )) {
llMessageLinked(LINK_DIALOG,NOTIFY,"0"+"%NOACCESS%",kID);
if (iRemenu) AuthMenu(kID, Auth(kID));
} else if (osIsUUID(sTmpID)) {
} else if ((key)sTmpID) {
RemovePerson(sTmpID, sAction, kID, FALSE);
if (iRemenu) RemPersonMenu(kID, sAction, Auth(kID));
} else if (llToLower(sTmpID) == "remove all") {
@@ -433,7 +433,7 @@ UserCommand(integer iAuth, string sStr, key kID, integer iRemenu)
} else if (sCommand == "group") {
if (iAuth==CMD_OWNER){
if (sAction == "on") {
if (osIsUUID(llList2String(lParams, -1))) g_kGroup = llList2Key(lParams, -1);
if ((key)llList2String(lParams, -1)) g_kGroup = llList2Key(lParams, -1);
else g_kGroup = llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0);
if (g_kGroup != NULL_KEY) {
llMessageLinked(LINK_SAVE, LM_SETTING_SAVE, g_sSettingToken + "group=" + (string)g_kGroup, "");
@@ -500,7 +500,6 @@ UserCommand(integer iAuth, string sStr, key kID, integer iRemenu)
RunAway()
{
llMessageLinked(LINK_DIALOG, NOTIFY_OWNERS, "%WEARERNAME% ran away!", "");
g_lOwner = [];
llMessageLinked(LINK_ALL_OTHERS, LM_SETTING_RESPONSE, g_sSettingToken + "owner=", "");
llMessageLinked(LINK_SAVE, LM_SETTING_DELETE, g_sSettingToken + "owner", "");
llMessageLinked(LINK_SAVE, LM_SETTING_DELETE, g_sSettingToken + "vanilla", "");
@@ -577,7 +576,7 @@ default
if (sToken == "owner")
g_lOwner = llParseString2List(sValue, [","], []);
else if (sToken == "tempowner") {
if (osIsUUID(sValue)) g_lTempOwner = [sValue];
if ((key)sValue) g_lTempOwner = [sValue];
else g_lTempOwner = [];
} else if (sToken == "vanilla") g_iVanilla = (integer)sValue;
else if (sToken == "group") {
@@ -646,7 +645,7 @@ default
else if (sMessage == UPMENU) AuthMenu(kAv, iAuth);
else if (sMessage == "No") llMessageLinked(LINK_DIALOG, NOTIFY, "0"+"Runaway aborted.", kAv);
} if (llSubStringIndex(sMenu,"AddAvi") == 0) {
if (osIsUUID(sMessage)) {
if ((key)sMessage) {
AddUniquePerson(sMessage, llGetSubString(sMenu,6,-1), kAv);
AuthMenu(kAv,iAuth);
} else if (sMessage == "BACK")

View File

@@ -177,7 +177,7 @@ Dialog(key kRecipient, string sPrompt, list lMenuItems, list lUtilityButtons, in
sNumberedButtons="\n";
for (iCur = iStart; iCur <= iEnd; iCur++) {
string sButton = llList2String(lMenuItems, iCur);
if (osIsUUID(sButton)) {
if ((key)sButton) {
if (g_iSelectAviMenu) sButton = NameURI((key)sButton);
else if (llGetDisplayName((key)sButton)) sButton = llGetDisplayName((key)sButton);
else sButton = llKey2Name((key)sButton);

View File

@@ -293,7 +293,7 @@ UserCommand(integer iNum, string sStr, key kID) {
for (iL = 0; iL < iInd; iL += 2) {
sWho = llList2String(lParts, iL);
string sWhoName;
if (osIsUUID(sWho)) sWhoName = "secondlife:///app/agent/"+sWho+"/about";
if ((key)sWho) sWhoName = "secondlife:///app/agent/"+sWho+"/about";
else sWhoName = sWho;
sLower = llToLower(sWho);
if (llListFindList(g_lOwners, [sWho]) != -1) {

View File

@@ -429,7 +429,7 @@ UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
else if (sVal == "me") {
g_iPassConfirmed = TRUE;
LeashTo(kMessageID, kMessageID, iAuth, [], TRUE);
} else if (osIsUUID(sVal)) {
} else if ((key)sVal) {
g_iPassConfirmed = TRUE;
LeashTo((key)sVal, kMessageID, iAuth, [], TRUE);
} else
@@ -506,7 +506,7 @@ UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
if (CheckCommandAuth(kMessageID, iAuth) == FALSE) return;
if (sVal==llToLower(BUTTON_UPMENU))
UserCommand(iAuth, "leashmenu", kMessageID, bFromMenu);
else if(osIsUUID(sVal)) {
else if((key)sVal) {
list lPoints;
if (llGetListLength(lParam) > 2) lPoints = llList2List(lParam, 2, -1);
LeashTo((key)sVal, kMessageID, iAuth, lPoints, FALSE);
@@ -533,7 +533,7 @@ UserCommand(integer iAuth, string sMessage, key kMessageID, integer bFromMenu) {
if (bFromMenu) UserCommand(iAuth, "post", kMessageID, bFromMenu);
}
if (sVal == llToLower(BUTTON_UPMENU)) UserCommand(iAuth, "menu leash", kMessageID ,bFromMenu);
else if(osIsUUID(sVal)) {
else if((key)sVal) {
list lPoints;
if (llGetListLength(lParam) > 2) lPoints = llList2List(lParam, 2, -1);
if (llGetAgentSize((key)sVal) != ZERO_VECTOR) g_iPassConfirmed = FALSE;
@@ -550,13 +550,11 @@ default
on_rez(integer start_param)
{
if (llGetOwner() != g_kWearer) llResetScript();
g_vRegionSize = osGetRegionSize();
DoUnleash(FALSE);
}
state_entry() {
g_kWearer = llGetOwner();
g_vRegionSize = osGetRegionSize();
DoUnleash(FALSE);
FindLeashHolder();
}
@@ -762,7 +760,6 @@ default
changed (integer iChange)
{
if (iChange & CHANGED_OWNER) g_kWearer = llGetOwner();
if (iChange & CHANGED_REGION) g_vRegionSize = osGetRegionSize();
if (iChange & CHANGED_INVENTORY) FindLeashHolder();
}
}

View File

@@ -112,7 +112,7 @@ Dialog(key kID, string sPrompt, list lChoices, list lUtilityButtons, integer iPa
key SanitizeKey(string uuid)
{
if (osIsUUID(uuid)) return llToLower(uuid);
if ((key)uuid) return llToLower(uuid);
return NULL_KEY;
}
@@ -157,7 +157,7 @@ integer Auth(string sObjectID, string sUserID)
else if (g_sTempTrustObj == sObjectID) {}
else if (llListFindList(g_lOwner+g_lTrust+[g_sTempOwner],[sOwner]) != -1) {}
else iAuth = 0;
if (osIsUUID(sUserID)) {
if ((key)sUserID) {
if (llListFindList(g_lBlock+g_lBlockAv,[sUserID]) != -1) return -1;
else if (g_iBaseMode == 3) {}
else if (g_sTempTrustUser == sUserID) {}

View File

@@ -505,7 +505,7 @@ UserCommand(integer iNum, string sStr, key kID, integer bFromMenu)
} else if (llSubStringIndex(sLowerStr,"sit ") == 0) {
if (iNum <= g_iStandRestricted || g_iStandRestricted == FALSE) {
sLowerStr = llDeleteSubString(sStr,0,llStringLength("sit ")-1);
if (osIsUUID(sLowerStr)) {
if ((key)sLowerStr) {
llMessageLinked(LINK_RLV, RLV_CMD, "unsit=y,unsit=force", "vdRestrict");
llSleep(0.5);
g_kLastForcedSeat=(key)sLowerStr;

View File

@@ -1,6 +1,4 @@
yoptions;
// oc_settings.lsl
//
// Copyright (c) 2008 - 2017 Nandana Singh, Cleo Collins, Master Starship,

View File

@@ -156,7 +156,7 @@ string NameGroupURI(string sStr){
SettingsMenu(key kID, integer iAuth) {
string sPrompt = "\nSettings";
list lButtons = ["Print","Load Card","Save Card","Dump LSD","Fix"];
list lButtons = ["Print","Load Card","Dump LSD","Fix"];
lButtons += g_lResizeButtons;
if (g_iHide) lButtons += ["☐ Visible"];
else lButtons += ["☑ Visible"];
@@ -177,10 +177,6 @@ UpdateConfirmMenu() {
HelpMenu(key kID, integer iAuth) {
string sPrompt="\nVersion: "+g_sCollarVersion+"\n";
sPrompt += "\nThis %DEVICETYPE% has a "+g_sIntegrity+" core.\n";
string sVersion = osGetSimulatorVersion();
integer idx = llSubStringIndex(sVersion, " ");
integer idx2 = llSubStringIndex(llGetSubString(sVersion, idx+1, -1), " ");
sPrompt += "\nSimulator: "+llGetSubString(sVersion, 0, idx+idx2); // strip contents of bin/.version
list lUtility = [UPMENU];
list lStaticButtons=["Help","Update","Version"];
Dialog(kID, sPrompt, lStaticButtons, lUtility, 0, iAuth, "Help/About");
@@ -316,15 +312,43 @@ UserCommand(integer iNum, string sStr, key kID, integer fromMenu) {
}*/
}
// Returns timestamp in gridtime (PDT/PST) as YYYY-MM-DD.HH:MM:SS
string GetTimestamp() {
integer sltSecs = (integer) llGetWallclock(); // Get SL time in seconds (will be either PST or PDT)
integer diff = (integer) llGetGMTclock() - sltSecs; // Compute the difference between UTC and SLT
integer iEpoch = llGetUnixTime(); // UTC unix
if (diff == 25200 || diff == -61200) iEpoch -= 25200; // PDT unix
else iEpoch -= 28800; // PST unix
string sOut = osUnixTimeToTimestamp(iEpoch); // threatlevel VeryLow
return llGetSubString(sOut, 0, 18); // strip off unnecessary microseconds
string GetTimestamp() { // Return a string of the date and time
string out;
string DateUTC = llGetDate();
if (llGetGMTclock() < 28800) { // that's 28800 seconds, a.k.a. 8 hours.
list DateList = llParseString2List(DateUTC, ["-", "-"], []);
integer year = llList2Integer(DateList, 0);
integer month = llList2Integer(DateList, 1);
integer day = llList2Integer(DateList, 2);
// day = day - 1; //Remember, remember, the 0th of November!
if(day==1) {
if(month==1) return (string)(year-1) + "-01-31";
else {
--month;
if(month==2) day = 28+(year%4==FALSE); //To do: fix before 28th feb 2100.
else day = 30+ (!~llListFindList([4,6,9,11],[month])); //31 days hath == TRUE
}
}
else --day;
out=(string)year + "-" + (string)month + "-" + (string)day;
} else out=llGetDate();
integer t = (integer)llGetWallclock(); // seconds since midnight
out += " " + (string)(t / 3600) + ":";
integer mins=(t % 3600) / 60;
if (mins <10){
out += "0";
}
out += (string)mins+":";
integer secs=t % 60;
if (secs < 10){
out += "0";
}
out += (string)secs;
return out;
}
SetLockElementAlpha() { //EB
@@ -515,7 +539,7 @@ default {
else if (sMessage == "Help") UserCommand(iAuth, "help", kAv, TRUE);
else if (sMessage == "Update") UserCommand(iAuth, "update", kAv, TRUE);
else if (sMessage == "Version")
g_kHttpVersion = llHTTPRequest("https://raw.githubusercontent.com/lickx/oscollar-dev/master/web/device", [], "");
g_kHttpVersion = llHTTPRequest("https://raw.githubusercontent.com/lickx/oscollar-dev/sl/web/device", [], "");
} else if (sMenu == "UpdateConfirmMenu"){
if (sMessage=="Yes") StartUpdate();
else {
@@ -525,7 +549,6 @@ default {
} else if (sMenu == "Settings") {
if (sMessage == "Print") llMessageLinked(LINK_SAVE, iAuth, "print settings", kAv);
else if (sMessage == "Load Card") llMessageLinked(LINK_SAVE, iAuth, sMessage, kAv);
else if (sMessage == "Save Card") llMessageLinked(LINK_SAVE, iAuth, sMessage, kAv);
else if (sMessage == "Dump LSD") llMessageLinked(LINK_SAVE, iAuth, sMessage, kAv);
else if (sMessage == "Fix") {
UserCommand(iAuth, sMessage, kAv, TRUE);
@@ -672,7 +695,7 @@ default {
if (compareVersions(sWebVersion, g_sCollarVersion)) {
llOwnerSay("An update is available!");
// Fetch a list of distribution sites:
g_kHttpDistsites = llHTTPRequest("https://raw.githubusercontent.com/lickx/oscollar-dev/master/web/distsites", [], "");
g_kHttpDistsites = llHTTPRequest("https://raw.githubusercontent.com/lickx/oscollar-dev/sl/web/distsites", [], "");
} else
llOwnerSay("You are using the most recent version");
} else if (kID == g_kHttpDistsites) {
@@ -680,4 +703,4 @@ default {
llOwnerSay(sBody);
}
}
}
}

View File

@@ -361,7 +361,7 @@ UserCommand(integer iNum, string sStr, key kID, integer reMenu, integer iPage)
if (iDefaultTextureIndex != -1) sTextureShortName = llList2String(g_lTextureDefaults, iDefaultTextureIndex+1);
}
integer iTextureIndex = llListFindList(g_lTextures,[sElement+"~"+sTextureShortName]);
if (osIsUUID(sTextureShortName)) iTextureIndex = 0;
if ((key)sTextureShortName) iTextureIndex = 0;
else if (iTextureIndex == -1)
iTextureIndex = llListFindList(g_lTextures,[sTextureShortName]);
if (sTextureShortName == "") {
@@ -371,7 +371,7 @@ UserCommand(integer iNum, string sStr, key kID, integer reMenu, integer iPage)
if (reMenu) TextureMenu(kID, 0, iNum, sCommand+" "+sElement);
} else {
string sTextureKey;
if (osIsUUID(sTextureShortName)) sTextureKey = sTextureShortName;
if ((key)sTextureShortName) sTextureKey = sTextureShortName;
else sTextureKey = llList2String(g_lTextureKeys,iTextureIndex);
integer iLinkCount = llGetNumberOfPrims()+1;
while (iLinkCount-- > 2) {

View File

@@ -359,7 +359,7 @@ UserCommand(integer iNum, string sStr, key kID, integer reMenu, integer iPage)
if (iDefaultTextureIndex != -1) sTextureShortName = llList2String(g_lTextureDefaults, iDefaultTextureIndex+1);
}
integer iTextureIndex = llListFindList(g_lTextures, [sElement+"~"+sTextureShortName]);
if (osIsUUID(sTextureShortName)) iTextureIndex = 0;
if ((key)sTextureShortName) iTextureIndex = 0;
else if (iTextureIndex == -1)
iTextureIndex = llListFindList(g_lTextures, [sTextureShortName]);
if (sTextureShortName == "") {
@@ -369,7 +369,7 @@ UserCommand(integer iNum, string sStr, key kID, integer reMenu, integer iPage)
if (reMenu) TextureMenu(kID, 0, iNum, sCommand+" "+sElement);
} else {
string sTextureKey;
if (osIsUUID(sTextureShortName)) sTextureKey = sTextureShortName;
if ((key)sTextureShortName) sTextureKey = sTextureShortName;
else sTextureKey = llList2String(g_lTextureKeys, iTextureIndex);
integer iLinkCount = llGetNumberOfPrims()+1;
while (iLinkCount-- > 1) {

View File

@@ -155,10 +155,6 @@ default
Check4Core5Script();
string sResponse = llDumpList2String([sType, sName, sCmd], "|");
//Debug("responding: " + response);
// Bug in older OpenSim versions, fixed since 2018-10-18:
// 7391: Messages sent with llRegionSayTo are only received by one listening script per prim (object?)
// See: http://opensimulator.org/mantis/view.php?id=7391
//llRegionSay(iChannel, sResponse); // workaround
llRegionSayTo(kID, iChannel, sResponse);
} else if (sMsg == "Core5Done") Check4Core5Script();
else if (llSubStringIndex(sMsg, "DONE") == 0){
@@ -180,7 +176,7 @@ default
integer i;
for (i = 0; i < llGetListLength(lTest); ++i) {
string sValue = llList2String(lTest, i);
if (osIsUUID(sValue)) {}
if ((key)sValue) {}
else lTest = llDeleteSubList(lTest, i, i);
}
sSetting = sToken+"="+llDumpList2String(lTest,",");

View File

@@ -402,7 +402,7 @@ default
while(numAgents--) {
key avId = llList2Key(agentList, numAgents);
string name = llKey2Name(avId);
if ( llSubStringIndex(llToLower(name), llToLower(find)) == -1 || llListFindList(excl,[(string)avId]) != -1 || osIsNpc(avId)) { //if this name does not contain find string or key is in the exclude list
if ( llSubStringIndex(llToLower(name), llToLower(find)) == -1 || llListFindList(excl,[(string)avId]) != -1) { //if this name does not contain find string or key is in the exclude list
agentList = llDeleteSubList(agentList, numAgents, numAgents); //delete this agent from the list
}
}

View File

@@ -444,7 +444,7 @@ default {
i = llGetListLength(lAgents);
do {
kID = llList2Key(lAgents, --i);
if (kID != g_kOwner && llListFindList(g_lPartners,[(string)kID]) == -1 && !osIsNpc(kID)) {
if (kID != g_kOwner && llListFindList(g_lPartners,[(string)kID]) == -1) {
if (llGetListLength(g_lListeners) < 60) {//Only 65 listens can simultaneously be open in any single script (SL wiki)
iChannel = PersonalChannel(kID, 0);
g_lListeners += [llListen(iChannel, "", "", "" )] ;

View File

@@ -133,7 +133,7 @@ Dialog(key kID, string sPrompt, list lChoices, list lUtilityButtons, integer iPa
// Sanitizes a key coming from the outside, so that only valid
// keys are returned, and invalid ones are mapped to NULL_KEY
key SanitizeKey(string uuid) {
if (osIsUUID(uuid)) return llToLower(uuid);
if ((key)uuid) return llToLower(uuid);
return NULL_KEY;
}

View File

@@ -1,4 +1,8 @@
Get an updater at:
TBD
Place1
slurl
Place2
slurl