From 7af5d6d9f7d76474c299c8df8d0c762982334ba0 Mon Sep 17 00:00:00 2001 From: zontreck Date: Tue, 30 Apr 2024 23:04:24 -0700 Subject: [PATCH] Fix compilation errors --- Dialog Module.lsl | 117 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 88 insertions(+), 29 deletions(-) diff --git a/Dialog Module.lsl b/Dialog Module.lsl index 6ab3259..d6301b6 100755 --- a/Dialog Module.lsl +++ b/Dialog Module.lsl @@ -31,16 +31,26 @@ // CONSTANTS // ******************************************************************** +// Link Commands +integer LINK_MENU_DISPLAY = 300; +integer LINK_MENU_CLOSE = 310; +integer LINK_MENU_RETURN = 320; +integer LINK_MENU_TIMEOUT = 330; +integer LINK_MENU_CHANNEL = 303; // Returns from the dialog module to inform what the channel is +integer LINK_MENU_ONLYCHANNEL = 302; // Sent with a ident to make a channel. No dialog will pop up, and it will expire just like any other menu if input is not received. +// Main Menu Details +string BACK = "<<"; string FOWARD = ">>"; string MANUAL_ENTRY = ">manual<"; +list MENU_NAVIGATE_BUTTONS = [ " ", " ", "-exit-"]; float MENU_TIMEOUT_CHECK = 10.0; integer MENU_TIMEOUT = 120; integer MAX_TEXT = 510; list NUMBER_PAD = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]; //list NUMBER_PAD = ["7", "8", "9", "4", "5", "6", "1", "2", "3"]; -list NUMBER_PAD_END_NO_RNG = ["Submit", "0", "Cancel"]; -list NUMBER_PAD_END_RNG = ["Submit", "RANDOM", "Cancel"]; +list NUMBER_PAD_END_NO_RNG = ["C", "0", "Confirm"]; +list NUMBER_PAD_END_RNG = ["Random", "0", "Confirm"]; string g_sNumPadCode; @@ -61,18 +71,63 @@ list menusActive; // Functions - General // ******************************************************************** +integer IsLikelyAvatarID(key kID) +{ + if(!IsLikelyUUID(kID))return FALSE; + // Avatar UUIDs always have the 15th digit set to a 4 + if(llGetSubString(kID,8,8) == "-" && llGetSubString(kID,14,14)=="4")return TRUE; + + return FALSE; +} + +string SLURL(key kID){ + return "secondlife:///app/agent/"+(string)kID+"/about"; +} +integer IsListOfIDs(list lIDs) +{ + integer i=0; + integer end = llGetListLength(lIDs); + for(i=0;i25){ + if(llGetSubString(sID,8,8)=="-" && llGetSubString(sID, 13,13) == "-" && llGetSubString(sID,18,18) == "-" && llGetSubString(sID,23,23)=="-") return TRUE; + + } + return FALSE; +} + debug(string debug) { if (DEBUG) llSay(DEBUG_CHANNEL,"DEBUG:"+llGetScriptName()+":"+debug+" : Free("+(string)llGetFreeMemory()+")"); } - -Notify(key kID, string sMsg) -{ - if(llGetAgentSize(kID) == ZERO_VECTOR) - { - llInstantMessage(kID, Substitutes(sMsg)); - } else llRegionSayTo(kID, 0, Substitutes(sMsg)); -} + integer string2Bool (string test) { @@ -190,10 +245,10 @@ DisplayMenu(key id, integer channel, integer page, integer iTextBox) if(llList2String(menuButtonsAll,0)=="colormenu" && llGetListLength(menuButtonsAll)==1){ menuButtonsAll = ["Dark Blue", "Blue", "Red", "Dark Red", "Green", "Dark Green", "Black", "White", ">custom<"]; - }else if(llList2String(menuButtonsAll,0) == "numpadplz" && llGetListLength(menuButtonsAll) == 2) + }else if(llList2String(menuButtonsAll,0) == "numpadplz" && llGetListLength(menuButtonsAll) == 1) { iNumpad = 1; - if(llList2String(menuButtonsAll,1) == "rng") + if(g_sNumPadCode == "") menuButtonsAll = NUMBER_PAD_END_RNG + NUMBER_PAD; else menuButtonsAll = NUMBER_PAD_END_NO_RNG + NUMBER_PAD; } @@ -220,11 +275,17 @@ DisplayMenu(key id, integer channel, integer page, integer iTextBox) for(x=0;x