Advertisement
StarWolff2000

Untitled

Dec 28th, 2018
994
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // StarWolffs MultiMenu w-AutoPop SubMenus
  2. // Script by StarWolff2000
  3.  
  4. // THIS:
  5. // (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]))
  6. // SHOULD CHANGE TO:
  7. // (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]) >= 0)
  8. //  ALL Locations
  9.  
  10.  
  11. // Obj_Toucher_Group is NOT currently working correctly - I need to use "get currently active group~v1" to get the Group UUID & then send it via a message to this script
  12.  
  13. // in GET_CAT_LinkNumbers(),
  14. // this needs to be changed: if(llGetSubString(PrimName,0,3) == "CAT1")
  15. // Instead, it should compare it to the name defined in the notecard
  16.  
  17. // in Menu_State, state_entry, THIS: llDetectedGroup(0) - may be used incorrectly - it says it returns TRUE or FALSE
  18.  
  19. // ---- I THINK THE PROBLEM is Item_INV_Marker
  20. //is  not set-correctly / used-correctly
  21.  
  22.  
  23. // --- I DON'T NEED SEPARATE menu_channel and options_channel - merge them into just 'channel'
  24.  
  25.  
  26. //2ADD: at the very start, it should scan all Item_Names, and report any that are over-length (over 24 char's) (textures & notecards & objects, NOT scripts
  27.  
  28.  
  29.  
  30.  
  31.  
  32. // Some Inventory-reading & Autopopulating menu scripting by Fred McCellan
  33. // Additional Credit to:
  34. // Dr. Harleen けム尺し乇Ɣ Quinzel
  35. // River (riverborn Resident)
  36. // Thales Militus
  37.  
  38.  
  39.  
  40. // Just put any Items you want to use in the prim.
  41.  
  42. // From the Source script:
  43. // v1.2
  44. // Added logging function (set logging_on to TRUE to turn logging on)
  45. // Added timer to remove listens when menu gets "abandoned"
  46. // Put user settable parameters at the top.
  47.  
  48. // USER SETTABLE PARAMETERS
  49. float MENU_TIMEOUT = 25; // Time in seconds before menu times out & listener is removed
  50.  
  51. // === Scripting Settings: === //
  52. // [DO NOT EDIT unless you know what you're doing]
  53. //      Obj_ID = Object ID code/Object Identifier
  54. string  Obj_ID = "00";
  55. //      Obj_Ch = Object Channel
  56. integer Obj_Ch = 420;
  57. integer Menu_Chan = 421;
  58. string  Scr_ReadNC  = "00~StarWolffs MultiMenu+~ReadNC~vC2";
  59. string  NC_Selected = "00~StarWolffs MultiMenu+~CFG";
  60.  
  61. // === DEBUG MODE === //
  62. integer Scr_State = 0; //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  63.  
  64. // === StarWolffs Stuff === //
  65. // * You may NOT edit this
  66. // * The button calling this info MUST appear in your final menu
  67. // * The related button code below MUST remain in your final menu
  68. //      Obj_Pn = Object Product Name
  69. string  Obj_Pn = "StarWolffs MultiMenu w-AutoPop SubMenus";
  70. //      Obj_Pb = Object Product by/Author
  71. string  Obj_Pb = "\nby secondlife:///app/agent/b3c21e55-a326-455e-b302-ffeeb95e4027/about";
  72. //      Obj_Vs = Object Version
  73. string  Obj_Vs = "vC1.9";
  74. //      Scr_Vs = Script Version
  75. //      Scr_Vs = "vC1.9";
  76. string  Menu_IA_SWSF_Capt = "StarWolffs SatisFactory
  77. I make stuff!
  78. * Prim-Tosser
  79. * Script-Fiddler
  80. * Texture-Paster
  81.  
  82. Store (MP):
  83. https://marketplace.secondlife.com/stores/---
  84. Store (SL): http://maps.secondlife.com/secondlife/Solaris%20Station/124/128/2601
  85. Group      : secondlife:///app/group/cfd3280b-01f9-70c1-21fa-d65f66f4d465/about";
  86. integer Menu_SWSF_EGG = 0;
  87.  
  88.  
  89. // Brand INFO
  90. // READ THESE FROM NOTECARD:
  91. list    Menu_IA_BrandxProduct_INFO;
  92. string  Menu_IA_Brand_Name = "StarWolffs SatisFactory"; // <---TEMPORARY VALUES, REPLACED by data in CFG
  93. string  Menu_IA_Brand_By = "StarWolff2000"; // <---TEMPORARY VALUES, REPLACED by data in CFG
  94. string  Menu_IA_Brand_Capt = "StarWolffs SatisFactory !"; // <---TEMPORARY VALUES, REPLACED by data in CFG
  95. // Product INFO
  96. string  Menu_IA_Product_Name = "StarWolffs MultiMenu+"; // <---TEMPORARY VALUES, REPLACED by data in CFG
  97. string  Menu_IA_Product_Vers = "v2.0"; // <---TEMPORARY VALUES, REPLACED by data in CFG
  98. string  Menu_IA_Product_Capt = "by StarWolff2000 & StarWolffs SatisFactory"; // <---TEMPORARY VALUES, REPLACED by data in CFG
  99.  
  100.  
  101. // === Menu parameters ===
  102. string  Menu_Capt;
  103. list    Menu_Butt;
  104. // -if- Menu_SUB_ID = 0 -----
  105. integer menu_channel; // THIS IS OBSELETE & NEEDS to be WEEDED OUT
  106. integer options_channel; // THIS IS OBSELETE & NEEDS to be WEEDED OUT
  107. integer menu_handler; // THIS IS OBSELETE & NEEDS to be WEEDED OUT
  108. integer options_handler; // THIS IS OBSELETE & NEEDS to be WEEDED OUT
  109. integer Menu_00_AUTH_Level = 0;
  110. string  Menu_00_Capt = "\nMain Menu - Select a Category: ";
  111. list    Menu_00a = ["INFO/About","Admin","Close Menu"];
  112. list    Menu_00b = ["INFO/About","Main Menu","Close Menu"];
  113. list    Menu_00_NAV = ["Modes","● Themes","undefined"];
  114. list    Menu_00_MenuName_List = ["Main Menu","Admin Menu","Categories Menu","Themes Menu","Modes Menu","INFO/About Menu"];
  115. list    Menu_ADM_AUTH_Users = []; // Owner,User1,User2,User3,User4,User5,User6,Group
  116. string  Menu_ADM_AUTH_ERR_Capt1 = "\n\nYou are not Authorized to use the:\n";
  117. string  Menu_ADM_AUTH_ERR_Capt2 = "\n\Contact the owner:\n";
  118. //
  119. integer Menu_CAT_IDX = 0;
  120. list    Menu_CAT_AUTH_Levels = []; // [default] // auth levels for each 'CAT#'
  121. list    Menu_CAT_Object_Names_Prefix = ["CAT1","CAT2","CAT3","CAT4","CAT5","CAT6"]; // [default] // prim names for each 'CAT#'
  122. list    Menu_CAT_Object_PrimLinks = ["0","0","0","0","0","0"]; // prim link numbers for each PrimName 'CAT#'
  123. list    Menu_CAT_Button_Labels = ["CAT1","CAT2","CAT3","CAT4","CAT5","CAT6"]; // [default] // button names for each PrimName 'CAT#'
  124. list    Menu_CAT_Button_Labels_456123 = ["CAT4","CAT5","CAT6","CAT1","CAT2","CAT3"]; // [default] // button names for each PrimName 'CAT#' in Menu order
  125. list    Menu_CAT_Action_Types = []; // Action types for each 'CAT#'
  126. list    Menu_CAT_Action_Faces = []; // Action faces for each 'CAT#'
  127. list    Menu_CAT_Action_Coords = []; // [default] // Action coords for each 'CAT#'
  128. integer Menu_SUB_ID = 0;
  129. // -if- Menu_SUB_ID = 1-6 (= >0, or anything other than 0 ) -----
  130. string  Menu_SUB_Capt = " Menu - Select an Item: ";
  131. //list Menu_SUB_NAV = ["INFO/About","Main Menu","Finished","<===","● Themes","===>"];
  132. list    Menu_SUB_NAV = ["<===","● Themes","===>"];
  133. integer Menu_SUB_THM_AUTH_Level = 0;
  134. //string  Menu_SUB_THM_Capt = "\nThemes Menu - Select a Theme:\nA Theme will change everything";
  135. //list    Menu_SUB_THM_Butt = ["Theme 7","Theme 8","Theme 9","Theme 4","Theme 5","Theme 6","Theme 1","Theme 2","Theme 3"];
  136. //list    Menu_SUB_THM_Descs = ["Theme 1","Theme 2","Theme 3","Theme 4","Theme 5","Theme 6","Theme 7","Theme 8","Theme 9"];
  137. ////////Menu_SUB_THM_Modes - NOT YET IMPLEMENTED - change shapes according to chosen Theme
  138. //list    Menu_SUB_THM_Modes = []; // Modes for each Theme
  139. //list    Menu_SUB_THM1_Objects = []; // Modes for each Theme
  140. //list    Menu_SUB_THM2_Objects = []; // Modes for each Theme
  141. //list    Menu_SUB_THM3_Objects = []; // Modes for each Theme
  142. //list    Menu_SUB_THM4_Objects = []; // Modes for each Theme
  143. //list    Menu_SUB_THM5_Objects = []; // Modes for each Theme
  144. //list    Menu_SUB_THM6_Objects = []; // Modes for each Theme
  145. //list    Menu_SUB_THM7_Objects = []; // Modes for each Theme
  146. //list    Menu_SUB_THM8_Objects = []; // Modes for each Theme
  147. //list    Menu_SUB_THM9_Objects = []; // Modes for each Theme
  148. ////list    Menu_SUB_THM_Desc = []; // NOTE: THIS IS TEMPORARILY dummy-defined in the Init routine - the Init routine should read it from the NC instead
  149. ////string  Menu_SUB_THM_Themes; //obselete - replaced by THM_Descs
  150. integer Menu_SUB_ADM_AUTH_Level = 1; // set default to 1-Owner-Only
  151. string  Menu_SUB_ADM_Capt = "\nAdmin Options Menu - Select an Item: ";
  152. list    Menu_SUB_ADM_Butt = ["Public","undefined 1","undefined 2","Owner","Group","List (NC)"];
  153. list    Menu_SUB_ADM_List = ["Owner","Group","List (NC)","Public","undefined 1","undefined 2"];
  154. // AUTH_Levels: 0=Public 1=Owner-Only 2=Owner+Group 3=Owner+List
  155. string  Menu_SUB_ADM_Choices = "\nOwner: Owner-Only\nGroup: Group Access Only\nList (NC): Assigned List (in CFG Notecard)\nPublic: Public access (to all but Admin menu)\nundefined 1: [Feature not yet available]\nundefined 2: [Feature not yet available]";
  156. integer Menu_SUB_MODE_AUTH_Level = 0;
  157. //string  Menu_SUB_MODE_Capt = "\nMode Options Menu - Select a Mode: ";
  158. //list    Menu_SUB_MODE_Butt = ["Mode 7","Mode 8","Mode 9","Mode 4","Mode 5","Mode 6","Mode 1","Mode 2","Mode 3"];
  159. //list    Menu_SUB_MODE_Descs = ["Mode 1","Mode 2","Mode 3","Mode 4","Mode 5","Mode 6","Mode 7","Mode 8","Mode 9"]; // NOTE: THIS IS TEMPORARILY dummy-defined in the Init routine - the Init routine should read it from the NC instead
  160. //list    Menu_SUB_MODE_Object_Names = []; // names for each Mode
  161. //list    Menu_SUB_MODE_Object_Acts = []; // actions for each Mode
  162. string  Menu_SUB_IA_Capt = "\nINFO/About Menu:\n";
  163.  
  164. list    Menu_CAT1_List = [];
  165. integer Menu_CAT1_Total = 0;
  166. //integer Menu_CAT1_IDX = 0;
  167. list    Menu_CAT2_List = [];
  168. integer Menu_CAT2_Total = 0;
  169. //integer Menu_CAT2_IDX = 0;
  170. list    Menu_CAT3_List = [];
  171. integer Menu_CAT3_Total = 0;
  172. //integer Menu_CAT3_IDX = 0;
  173. list    Menu_CAT4_List = [];
  174. integer Menu_CAT4_Total = 0;
  175. //integer Menu_CAT4_IDX = 0;
  176. list    Menu_CAT5_List = [];
  177. integer Menu_CAT5_Total = 0;
  178. //integer Menu_CAT5_IDX = 0;
  179. list    Menu_CAT6_List = [];
  180. integer Menu_CAT6_Total = 0;
  181. //integer Menu_CAT6_IDX = 0;
  182. list    Menu_CAT_SUB_Set = [];
  183. // TEMP VARIABLES
  184. list    Menu_CAT_SUB_TEMP = []; // CAT Sub list set of 6(or 9 if <9 total) [TEMPorary]
  185. integer Menu_CAT_SUB_Total = 0; // CAT Sub list total of 6(or 9 if <9 total) [TEMPorary]
  186. list    Menu_CAT_States = [1,1,1,1,1,1]; // Rezz-DeRezz & Show-Hide state for each PrimName 'CAT#'
  187.  
  188.  
  189. //Misc parameters
  190. string  Obj_OwnerToucher_NKG; // Owner's Key & Toucher's Name|Key|Group
  191. string  Obj_Owner_Key; // Owner's Avatar UUID
  192. string  Obj_Toucher_Name; // Toucher's Avatar Name
  193. string  Obj_Toucher_Key; // Toucher's Avatar UUID
  194. string  Obj_Toucher_Group; // Toucher's currently-active group
  195. //integer Obj_Toucher_Group; // Toucher's currently-active group [use to determine if the Toucher's currently-active group is the same as the Object's group]
  196. integer Item_Pointer = 0;
  197. integer Item_Counter = 0;
  198. integer Item_IDX = 0;
  199. integer Scr_Mem_Usage_Current;
  200. string  SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  201. integer SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  202. integer SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  203. integer SELECTED_status; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  204.  
  205.  
  206. //string TESTER = "THIS IS A TEST";
  207. //TEST_1()
  208. //{
  209. //    TESTER = "THIS IS A TEST";
  210. //    llSay(0,TESTER);
  211. //    return;
  212. //}
  213.  
  214.  
  215.  
  216. remove_listens()
  217. {
  218.     llSetTimerEvent(0.0);
  219.     llListenRemove(menu_handler);
  220.     llListenRemove(options_handler);
  221. }
  222.  
  223.  
  224.  
  225. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  226. // used for processing incoming commands from other scripts
  227.   //SendingPrimLinkNum is the LINK NUMBER of the prim that sent the message
  228.   //Scr_CMD_ID is used for sending an ID code to identify each message
  229.   //Str_ID_VarName_str is used for sending the Variable Name of the data value in Message
  230. //GET_Incoming_DATA(integer SendingPrimLinkNum, integer Scr_CMD_ID, string message, key Str_ID_VarName_str)
  231. GET_Incoming_CMDs(integer Scr_CMD_ID, string message, key Str_ID_VarName_str)
  232. {
  233.   if((Scr_CMD_ID == 100) || (Str_ID_VarName_str == "dummy_stand-in_message"))
  234.   {
  235.     list dummylist = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  236. llSay(0,">>>>> MESSAGE RECEIVED!!! <<<<");
  237.   }
  238.  
  239. //  return;
  240. }
  241. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  242.  
  243.  
  244.  
  245. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  246. // Get the Data from the notecard
  247.   //SendingPrimLinkNum is the LINK NUMBER of the prim that sent the message
  248.   //Scr_CMD_ID is used for sending an ID code to identify each message
  249.   //Str_ID_VarName_str is used for sending the Variable Name of the data value in Message
  250. //GET_Incoming_DATA(integer SendingPrimLinkNum, integer Scr_CMD_ID, string message, key Str_ID_VarName_str)
  251. GET_Incoming_DATA(integer Scr_CMD_ID, string message, key Str_ID_VarName_str)
  252. {
  253.  
  254. //  integer SendingPrimLinkNum; // TEST
  255. //  integer Scr_CMD_ID;
  256. //  string  Str_ID_VarName_str;
  257.   //SendingPrimLinkNum is the LINK NUMBER of the prim that sent the message
  258.   //Scr_CMD_ID is used for sending an ID code to identify each message
  259.   //Str_ID_VarName_str is used for sending the Variable Name of the data value in Message
  260.  
  261.   // Sort, Parse, & Relist all incoming data
  262.  
  263. //  if((Scr_CMD_ID == 950) || (message == "ERR: Missing Notecard") || (Str_ID_VarName_str == "ERR: Missing Notecard"))
  264.   if((message == "ERR: Missing Notecard") || (Str_ID_VarName_str == "ERR: Missing Notecard"))
  265.   {
  266.     llOwnerSay("\n");
  267.     llOwnerSay("! Missing Configuration Notecard: " + NC_Selected);
  268.   }
  269.  
  270. //  if((Scr_CMD_ID == 12) || (message == "BEG: Start Of Data") || (Str_ID_VarName_str == "SOD"))
  271.   if((message == "BEG: Start Of Data") || (Str_ID_VarName_str == "SOD"))
  272.   {
  273. //    llOwnerSay("\n");
  274.     llOwnerSay("> Receiving Data... [Main Script]");
  275.     Scr_State = (Scr_State + 1);
  276.   }
  277.  
  278. //  if((Scr_CMD_ID == 999) || (message == "END: End Of Data") || (Str_ID_VarName_str == "EOD"))
  279.   if((message == "END: End Of Data") || (Str_ID_VarName_str == "EOD"))
  280.   {
  281. //    if(Scr_State < 10)
  282. //    { Scr_State = 10; }
  283. //    if(Scr_State >= 90)
  284. //    { Scr_State = (Scr_State + 1); }
  285.     Scr_State = (Scr_State + 1);
  286.     Init_Data();
  287.   }
  288.  
  289. //  else if(Scr_CMD_ID >= 100)
  290.   else
  291.   {//else
  292.     if((Str_ID_VarName_str == "Menu_IA_BrandxProduct_INFO") || (Scr_CMD_ID == 100))
  293.     {
  294.       Menu_IA_BrandxProduct_INFO = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  295.       Menu_IA_Brand_Name = llList2String(Menu_IA_BrandxProduct_INFO,0);
  296.       Menu_IA_Brand_By   = llList2String(Menu_IA_BrandxProduct_INFO,1);
  297.       Menu_IA_Brand_Capt = llList2String(Menu_IA_BrandxProduct_INFO,2);
  298.       Menu_IA_Product_Name = llList2String(Menu_IA_BrandxProduct_INFO,3);
  299.       Menu_IA_Product_Capt = llList2String(Menu_IA_BrandxProduct_INFO,4);
  300.     }
  301.  
  302.     if((Str_ID_VarName_str == "Menu_SUB_ADM_AUTH_Level") || (Scr_CMD_ID == 111))
  303.     {
  304.       Menu_SUB_ADM_AUTH_Level = (integer)message;    // Parse the string back to a integer
  305.     }
  306.  
  307.     if((Str_ID_VarName_str == "Menu_ADM_AUTH_Users") || (Scr_CMD_ID == 112))
  308.     {
  309.       Menu_ADM_AUTH_Users = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  310.     }
  311.  
  312.     if((Str_ID_VarName_str == "Menu_CAT_AUTH_Levels") || (Scr_CMD_ID == 121))
  313.     {
  314.       Menu_CAT_AUTH_Levels = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  315.     }
  316.  
  317.     if((Str_ID_VarName_str == "Menu_CAT_Object_Names_Prefix") || (Scr_CMD_ID == 122))
  318.     {
  319.       Menu_CAT_Object_Names_Prefix = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  320.     }
  321.  
  322.     if((Str_ID_VarName_str == "Menu_CAT_Object_PrimLinks") || (Scr_CMD_ID == 123))
  323.     {
  324.       Menu_CAT_Object_PrimLinks = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  325.     }
  326.  
  327.     if((Str_ID_VarName_str == "Menu_CAT_Button_Labels") || (Scr_CMD_ID == 124))
  328.     {
  329.       Menu_CAT_Button_Labels = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  330.       Menu_CAT_Button_Labels_456123 = [llList2String(Menu_CAT_Button_Labels,3),llList2String(Menu_CAT_Button_Labels,4),llList2String(Menu_CAT_Button_Labels,5),llList2String(Menu_CAT_Button_Labels,0),llList2String(Menu_CAT_Button_Labels,1),llList2String(Menu_CAT_Button_Labels,2)];
  331.     }
  332.  
  333.     if((Str_ID_VarName_str == "Menu_CAT_Action_Types") || (Scr_CMD_ID == 125))
  334.     {
  335.       Menu_CAT_Action_Types = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  336.     }
  337.  
  338.     if((Str_ID_VarName_str == "Menu_CAT_Action_Faces") || (Scr_CMD_ID == 126))
  339.     {
  340.       Menu_CAT_Action_Faces = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  341.     }
  342.  
  343.     if((Str_ID_VarName_str == "Menu_CAT_Action_Coords") || (Scr_CMD_ID == 127))
  344.     {
  345.       Menu_CAT_Action_Coords = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  346.     }
  347.  
  348.     if((Str_ID_VarName_str == "Menu_SUB_THM_AUTH_Level") || (Scr_CMD_ID == 131))
  349.     {
  350.       Menu_SUB_THM_AUTH_Level = (integer)message;    // Parse the string back to a integer
  351.     }
  352.  
  353. //    if((Str_ID_VarName_str == "Menu_SUB_THM_Descs") || (Scr_CMD_ID == 132))
  354. //    {
  355. //      Menu_SUB_THM_Descs = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  356. //    }
  357.  
  358. //    if((Str_ID_VarName_str == "Menu_SUB_THM_Modes") || (Scr_CMD_ID == 133))
  359. //    {
  360. //      Menu_SUB_THM_Modes = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  361. //    }
  362.  
  363. //    if((Str_ID_VarName_str == "Menu_SUB_THM1_Objects") || (Scr_CMD_ID == 141))
  364. //    {
  365. //      Menu_SUB_THM1_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  366. //    }
  367.  
  368. //    if((Str_ID_VarName_str == "Menu_SUB_THM2_Objects") || (Scr_CMD_ID == 142))
  369. //    {
  370. //      Menu_SUB_THM2_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  371. //    }
  372.  
  373. //    if((Str_ID_VarName_str == "Menu_SUB_THM3_Objects") || (Scr_CMD_ID == 143))
  374. //    {
  375. //      Menu_SUB_THM3_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  376. //    }
  377.  
  378. //    if((Str_ID_VarName_str == "Menu_SUB_THM4_Objects") || (Scr_CMD_ID == 144))
  379. //    {
  380. //      Menu_SUB_THM4_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  381. //    }
  382.  
  383. //    if((Str_ID_VarName_str == "Menu_SUB_THM5_Objects") || (Scr_CMD_ID == 145))
  384. //    {
  385. //      Menu_SUB_THM5_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  386. //    }
  387.  
  388. //    if((Str_ID_VarName_str == "Menu_SUB_THM6_Objects") || (Scr_CMD_ID == 146))
  389. //    {
  390. //      Menu_SUB_THM6_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  391. //    }
  392.  
  393. //    if((Str_ID_VarName_str == "Menu_SUB_THM7_Objects") || (Scr_CMD_ID == 147))
  394. //    {
  395. //      Menu_SUB_THM7_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  396. //    }
  397.  
  398. //    if((Str_ID_VarName_str == "Menu_SUB_THM8_Objects") || (Scr_CMD_ID == 148))
  399. //    {
  400. //      Menu_SUB_THM8_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  401. //    }
  402.  
  403. //    if((Str_ID_VarName_str == "Menu_SUB_THM9_Objects") || (Scr_CMD_ID == 149))
  404. //    {
  405. //      Menu_SUB_THM9_Objects = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  406. //    }
  407.  
  408.     if((Str_ID_VarName_str == "Menu_SUB_MODE_AUTH_Level") || (Scr_CMD_ID == 151))
  409.     {
  410.       Menu_SUB_MODE_AUTH_Level = (integer)message;    // Parse the string back to a integer
  411.     }
  412.  
  413. //    if((Str_ID_VarName_str == "Menu_SUB_MODE_Descs") || (Scr_CMD_ID == 152))
  414. //    {
  415. //      Menu_SUB_MODE_Descs = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  416. //    }
  417.  
  418. //    if((Str_ID_VarName_str == "Menu_SUB_MODE_Object_Names") || (Scr_CMD_ID == 153))
  419. //    {
  420. //      Menu_SUB_MODE_Object_Names = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  421. //    }
  422.  
  423. //    if((Str_ID_VarName_str == "Menu_SUB_MODE_Object_Acts") || (Scr_CMD_ID == 154))
  424. //    {
  425. //      Menu_SUB_MODE_Object_Acts = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  426. //    }
  427.  
  428.     if((Str_ID_VarName_str == "Menu_CAT1_List") || (Scr_CMD_ID == 161))
  429.     {
  430.       Menu_CAT1_List = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  431.     }
  432.  
  433.     if((Str_ID_VarName_str == "Menu_CAT1_Total") || (Scr_CMD_ID == 162))
  434.     {
  435.       Menu_CAT1_Total = (integer)message;
  436.     }
  437.  
  438.     if((Str_ID_VarName_str == "Menu_CAT2_List") || (Scr_CMD_ID == 163))
  439.     {
  440.       Menu_CAT2_List = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  441.     }
  442.  
  443.     if((Str_ID_VarName_str == "Menu_CAT2_Total") || (Scr_CMD_ID == 164))
  444.     {
  445.       Menu_CAT2_Total = (integer)message;
  446.     }
  447.  
  448.     if((Str_ID_VarName_str == "Menu_CAT3_List") || (Scr_CMD_ID == 165))
  449.     {
  450.       Menu_CAT3_List = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  451.     }
  452.  
  453.     if((Str_ID_VarName_str == "Menu_CAT3_Total") || (Scr_CMD_ID == 166))
  454.     {
  455.       Menu_CAT3_Total = (integer)message;
  456.     }
  457.  
  458.     if((Str_ID_VarName_str == "Menu_CAT4_List") || (Scr_CMD_ID == 167))
  459.     {
  460.       Menu_CAT4_List = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  461.     }
  462.  
  463.     if((Str_ID_VarName_str == "Menu_CAT4_Total") || (Scr_CMD_ID == 168))
  464.     {
  465.       Menu_CAT4_Total = (integer)message;
  466.     }
  467.  
  468.     if((Str_ID_VarName_str == "Menu_CAT5_List") || (Scr_CMD_ID == 169))
  469.     {
  470.       Menu_CAT5_List = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  471.     }
  472.  
  473.     if((Str_ID_VarName_str == "Menu_CAT5_Total") || (Scr_CMD_ID == 170))
  474.     {
  475.       Menu_CAT5_Total = (integer)message;
  476.     }
  477.  
  478.     if((Str_ID_VarName_str == "Menu_CAT6_List") || (Scr_CMD_ID == 171))
  479.     {
  480.       Menu_CAT6_List = llParseString2List(message, ["|"], []);    // Parse the string back to a list
  481.     }
  482.  
  483.     if((Str_ID_VarName_str == "Menu_CAT6_Total") || (Scr_CMD_ID == 172))
  484.     {
  485.       Menu_CAT6_Total = (integer)message;
  486.     }
  487.  
  488.   }//else
  489.  
  490. }
  491. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  492.  
  493.  
  494.  
  495. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  496. //Scr_State = 0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  497. Init_Data()
  498. {
  499. // llSay(0,"Scr_State: " + (string)Scr_State);
  500. //  llOwnerSay("Check complete; Initialized & Ready!");
  501.  
  502. //    GET_CAT_LinkNumbers();
  503.     // GET the LinkNumbers for all the CAT prims
  504. //    GET_CAT_LinkNumbers();
  505. //    Scr_State = (Scr_State + 1);
  506.  
  507.     // GET the Items in Contents
  508. //    GET_Menu_CAT_Lists();
  509. //    Scr_State = (Scr_State + 1);
  510.  
  511. //---OK, we're all done, so
  512.     if((Scr_State <= 10) || (Scr_State >= 90)) // if we're done with all 3 data-gathering steps
  513.     {
  514.       if(Scr_State <= 10)
  515.       { Scr_State = 10; }
  516.  
  517.     llOwnerSay("Check complete; Initialized & Ready!");
  518.     state Menu_State;
  519. //    llSetScriptState(Scr_ReadNC,FALSE); // Turn off the Notecard-reading script defined in Scr_ReadNC
  520.     }
  521.  
  522. }
  523. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  524.  
  525.  
  526.  
  527. // UNCOMMENT '//MOVED TO OTHER SCRIPT// ' to reactivate
  528. //MOVED TO OTHER SCRIPT// // CALL in: on_rez() -&- changed()
  529. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  530. //MOVED TO OTHER SCRIPT// GET_CAT_LinkNumbers() //GET_CAT_LinkNumbers_according_to_its_CAT_Name
  531. //MOVED TO OTHER SCRIPT// {
  532. //MOVED TO OTHER SCRIPT// //DEBUG//llSay(0,"CAT# linknumbers:");
  533. //MOVED TO OTHER SCRIPT// integer PrimCheck;
  534. //MOVED TO OTHER SCRIPT// string  PrimName;
  535.  
  536. //MOVED TO OTHER SCRIPT//      llOwnerSay("> Getting Prim Linknumbers...");    
  537.  
  538. //MOVED TO OTHER SCRIPT//   for(PrimCheck = 1; PrimCheck <= llGetNumberOfPrims(); PrimCheck++)
  539. //MOVED TO OTHER SCRIPT//   {//for1
  540. //MOVED TO OTHER SCRIPT//      PrimName = llGetLinkName(PrimCheck);
  541.  
  542. //MOVED TO OTHER SCRIPT// //     if(llGetLinkName(PrimCheck) == "CAT1")
  543. //MOVED TO OTHER SCRIPT//      // if the first 3 characters of PrimName matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 0 (1st CAT item)...
  544. //MOVED TO OTHER SCRIPT//      if (llGetSubString(PrimName,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,0),0,3))) // in Menu_CAT_Object_Names_Prefix, 0(1st) item, first 3 chars
  545. //MOVED TO OTHER SCRIPT//      {
  546. //MOVED TO OTHER SCRIPT//         Menu_CAT_Object_PrimLinks = llListReplaceList(Menu_CAT_Object_PrimLinks,[(string)PrimCheck],0,0);
  547. //MOVED TO OTHER SCRIPT//      }
  548. //MOVED TO OTHER SCRIPT// //     if(llGetLinkName(PrimCheck) == "CAT2")
  549. //MOVED TO OTHER SCRIPT//      // if the first 3 characters of PrimName matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 1 (2nd CAT item)...
  550. //MOVED TO OTHER SCRIPT//      if (llGetSubString(PrimName,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,1),0,3))) // in Menu_CAT_Object_Names_Prefix, 1(2nd) item, first 3 chars
  551. //MOVED TO OTHER SCRIPT//      {
  552. //MOVED TO OTHER SCRIPT//         Menu_CAT_Object_PrimLinks = llListReplaceList(Menu_CAT_Object_PrimLinks,[(string)PrimCheck],1,1);
  553. //MOVED TO OTHER SCRIPT//      }
  554. //MOVED TO OTHER SCRIPT// //     if(llGetLinkName(PrimCheck) == "CAT3")
  555. //MOVED TO OTHER SCRIPT//      // if the first 3 characters of PrimName matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 2 (3rd CAT item)...
  556. //MOVED TO OTHER SCRIPT//      if (llGetSubString(PrimName,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,2),0,3))) // in Menu_CAT_Object_Names_Prefix, 2(3rd) item, first 3 chars
  557. //MOVED TO OTHER SCRIPT//      {
  558. //MOVED TO OTHER SCRIPT//         Menu_CAT_Object_PrimLinks = llListReplaceList(Menu_CAT_Object_PrimLinks,[PrimCheck],2,2);
  559. //MOVED TO OTHER SCRIPT//      }
  560. //MOVED TO OTHER SCRIPT// //     if(llGetLinkName(PrimCheck) == "CAT4")
  561. //MOVED TO OTHER SCRIPT//      // if the first 3 characters of PrimName matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 3 (4th CAT item)...
  562. //MOVED TO OTHER SCRIPT//      if (llGetSubString(PrimName,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,3),0,3))) // in Menu_CAT_Object_Names_Prefix, 3(4th) item, first 3 chars
  563. //MOVED TO OTHER SCRIPT//      {
  564. //MOVED TO OTHER SCRIPT//         Menu_CAT_Object_PrimLinks = llListReplaceList(Menu_CAT_Object_PrimLinks,[PrimCheck],3,3);
  565. //MOVED TO OTHER SCRIPT//      }
  566. //MOVED TO OTHER SCRIPT// //     if(llGetLinkName(PrimCheck) == "CAT5")
  567. //MOVED TO OTHER SCRIPT//      // if the first 3 characters of PrimName matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 4 (5th CAT item)...
  568. //MOVED TO OTHER SCRIPT//      if (llGetSubString(PrimName,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,4),0,3))) // in Menu_CAT_Object_Names_Prefix, 4(5th) item, first 3 chars
  569. //MOVED TO OTHER SCRIPT//      {
  570. //MOVED TO OTHER SCRIPT//         Menu_CAT_Object_PrimLinks = llListReplaceList(Menu_CAT_Object_PrimLinks,[PrimCheck],4,4);
  571. //MOVED TO OTHER SCRIPT//      }
  572. //MOVED TO OTHER SCRIPT// //     if(llGetLinkName(PrimCheck) == "CAT6")
  573. //MOVED TO OTHER SCRIPT//      // if the first 3 characters of PrimName matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 5 (6th CAT item)...
  574. //MOVED TO OTHER SCRIPT//      if (llGetSubString(PrimName,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,5),0,3))) // in Menu_CAT_Object_Names_Prefix, 5(6th) item, first 3 chars
  575. //MOVED TO OTHER SCRIPT//      {
  576. //MOVED TO OTHER SCRIPT//         Menu_CAT_Object_PrimLinks = llListReplaceList(Menu_CAT_Object_PrimLinks,[PrimCheck],5,5);
  577. //MOVED TO OTHER SCRIPT//      }
  578.  
  579. //MOVED TO OTHER SCRIPT//   }//for1
  580.  
  581. //MOVED TO OTHER SCRIPT// //-----
  582. //MOVED TO OTHER SCRIPT//     //if "0" is NOT found in the list (if they all have a value other than "0"...
  583. //MOVED TO OTHER SCRIPT//     //if2
  584. //MOVED TO OTHER SCRIPT//     if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == -1)
  585. //MOVED TO OTHER SCRIPT//     {
  586. //MOVED TO OTHER SCRIPT//       llOwnerSay("✔ Prim Linknumbers list: [Success]: " + (string)Menu_CAT_Object_PrimLinks);
  587. //MOVED TO OTHER SCRIPT//     }
  588. //MOVED TO OTHER SCRIPT//     else
  589. //MOVED TO OTHER SCRIPT//     {
  590. //MOVED TO OTHER SCRIPT//       for(PrimCheck = 0; PrimCheck < 5; PrimCheck++)
  591. //MOVED TO OTHER SCRIPT//       {//for2
  592. //MOVED TO OTHER SCRIPT//         //if, in the list Menu_CAT_Object_PrimLinks, is the value '0' is-at= position-in-the-list
  593. //MOVED TO OTHER SCRIPT//         if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == 0)
  594. //MOVED TO OTHER SCRIPT//         {
  595. //MOVED TO OTHER SCRIPT//           llOwnerSay("WARNING!: CAT1 prim not found");
  596. //MOVED TO OTHER SCRIPT//           llOwnerSay("The CAT1 prim name MUST start with '" + llList2String(Menu_CAT_Object_Names_Prefix,0) + "'");
  597. //MOVED TO OTHER SCRIPT//         }
  598. //MOVED TO OTHER SCRIPT//         if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == 1)
  599. //MOVED TO OTHER SCRIPT//         {
  600. //MOVED TO OTHER SCRIPT//           llOwnerSay("WARNING!: CAT2 prim not found");
  601. //MOVED TO OTHER SCRIPT//           llOwnerSay("The CAT2 prim name MUST start with '" + llList2String(Menu_CAT_Object_Names_Prefix,1) + "'");
  602. //MOVED TO OTHER SCRIPT//         }
  603. //MOVED TO OTHER SCRIPT//         if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == 2)
  604. //MOVED TO OTHER SCRIPT//         {
  605. //MOVED TO OTHER SCRIPT//           llOwnerSay("WARNING!: CAT3 prim not found");
  606. //MOVED TO OTHER SCRIPT//           llOwnerSay("The CAT3 prim name MUST start with '" + llList2String(Menu_CAT_Object_Names_Prefix,2) + "'");
  607. //MOVED TO OTHER SCRIPT//         }
  608. //MOVED TO OTHER SCRIPT//         if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == 3)
  609. //MOVED TO OTHER SCRIPT//         {
  610. //MOVED TO OTHER SCRIPT//           llOwnerSay("WARNING!: CAT4 prim not found");
  611. //MOVED TO OTHER SCRIPT//           llOwnerSay("The CAT4 prim name MUST start with '" + llList2String(Menu_CAT_Object_Names_Prefix,3) + "'");
  612. //MOVED TO OTHER SCRIPT//         }
  613. //MOVED TO OTHER SCRIPT//         if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == 4)
  614. //MOVED TO OTHER SCRIPT//         {
  615. //MOVED TO OTHER SCRIPT//           llOwnerSay("WARNING!: CAT5 prim not found");
  616. //MOVED TO OTHER SCRIPT//           llOwnerSay("The CAT5 prim name MUST start with '" + llList2String(Menu_CAT_Object_Names_Prefix,4) + "'");
  617. //MOVED TO OTHER SCRIPT//         }
  618. //MOVED TO OTHER SCRIPT//         if(llListFindList(Menu_CAT_Object_PrimLinks,["0"]) == 5)
  619. //MOVED TO OTHER SCRIPT//         {
  620. //MOVED TO OTHER SCRIPT//           llOwnerSay("WARNING!: CAT6 prim not found");
  621. //MOVED TO OTHER SCRIPT//           llOwnerSay("The CAT6 prim name MUST start with '" + llList2String(Menu_CAT_Object_Names_Prefix,5) + "'");
  622. //MOVED TO OTHER SCRIPT//         }
  623. //MOVED TO OTHER SCRIPT// //        else
  624. //MOVED TO OTHER SCRIPT// //        {
  625. //MOVED TO OTHER SCRIPT//           llOwnerSay("✖ Prim Linknumbers: [FAILED]: " + (string)Menu_CAT_Object_PrimLinks);
  626. //MOVED TO OTHER SCRIPT//           llOwnerSay("- There should NOT be any '0'");
  627. //MOVED TO OTHER SCRIPT// //        }
  628.  
  629. //MOVED TO OTHER SCRIPT//       }//for2
  630.  
  631. //MOVED TO OTHER SCRIPT//   }//if2
  632.  
  633. //MOVED TO OTHER SCRIPT// }
  634. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  635.  
  636.  
  637.  
  638. // UNCOMMENT '//MOVED TO OTHER SCRIPT// ' to reactivate
  639. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  640. //MOVED TO OTHER SCRIPT// GET_Menu_CAT_Lists()
  641. //MOVED TO OTHER SCRIPT// {
  642. //MOVED TO OTHER SCRIPT//   integer Item_Total = llGetInventoryNumber(INVENTORY_TEXTURE);
  643. //MOVED TO OTHER SCRIPT//   string  Item_TEMP;
  644. //MOVED TO OTHER SCRIPT// //  Menu_CAT1_Pointer = 0;
  645. //MOVED TO OTHER SCRIPT//   Menu_CAT1_Total = 0;
  646. //MOVED TO OTHER SCRIPT//   Menu_CAT1_List = [];
  647. //MOVED TO OTHER SCRIPT// //  Menu_CAT2_Pointer = 0;
  648. //MOVED TO OTHER SCRIPT//   Menu_CAT2_Total = 0;
  649. //MOVED TO OTHER SCRIPT//   Menu_CAT2_List = [];
  650. //MOVED TO OTHER SCRIPT// //  Menu_CAT3_Pointer = 0;
  651. //MOVED TO OTHER SCRIPT//   Menu_CAT3_Total = 0;
  652. //MOVED TO OTHER SCRIPT//   Menu_CAT3_List = [];
  653. //MOVED TO OTHER SCRIPT// //  Menu_CAT4_Pointer = 0;
  654. //MOVED TO OTHER SCRIPT//   Menu_CAT4_Total = 0;
  655. //MOVED TO OTHER SCRIPT//   Menu_CAT4_List = [];
  656. //MOVED TO OTHER SCRIPT// //  Menu_CAT5_Pointer = 0;
  657. //MOVED TO OTHER SCRIPT//   Menu_CAT5_Total = 0;
  658. //MOVED TO OTHER SCRIPT//   Menu_CAT5_List = [];
  659. //MOVED TO OTHER SCRIPT// //  Menu_CAT6_Pointer = 0;
  660. //MOVED TO OTHER SCRIPT//   Menu_CAT6_Total = 0;
  661. //MOVED TO OTHER SCRIPT//   Menu_CAT6_List = [];
  662.  
  663. //MOVED TO OTHER SCRIPT//   llOwnerSay("> Getting list of CATegory items...");    
  664.  
  665. //MOVED TO OTHER SCRIPT//   for (Item_Pointer = 0; Item_Pointer < Item_Total; Item_Pointer++)
  666. //MOVED TO OTHER SCRIPT//   {//for 1
  667.  
  668. //MOVED TO OTHER SCRIPT//     Item_TEMP = llGetInventoryName(INVENTORY_TEXTURE,Item_Pointer);
  669.  
  670. //MOVED TO OTHER SCRIPT//     if ((string)llGetSubString(Item_TEMP,0,8) == "StarWolff")
  671. //MOVED TO OTHER SCRIPT//     {//if 1
  672. //MOVED TO OTHER SCRIPT// //      if(Scr_State >= 90)
  673. //MOVED TO OTHER SCRIPT// //      {
  674. //MOVED TO OTHER SCRIPT// //      llOwnerSay("\n");
  675. //MOVED TO OTHER SCRIPT// //      llOwnerSay("Skipping:");
  676. //MOVED TO OTHER SCRIPT// //      llOwnerSay((string)Item_TEMP);
  677. //MOVED TO OTHER SCRIPT// //      llOwnerSay("\n");
  678. //MOVED TO OTHER SCRIPT// //      }
  679. //MOVED TO OTHER SCRIPT//     }//if 1
  680.  
  681. //MOVED TO OTHER SCRIPT//     else if ((string)llGetSubString(Item_TEMP,0,3) == "SWSF")
  682. //MOVED TO OTHER SCRIPT//     {//if 1
  683. //MOVED TO OTHER SCRIPT// //      if(Scr_State >= 90)
  684. //MOVED TO OTHER SCRIPT// //      {
  685. //MOVED TO OTHER SCRIPT// //      llOwnerSay("\n");
  686. //MOVED TO OTHER SCRIPT// //      llOwnerSay("Skipping:");
  687. //MOVED TO OTHER SCRIPT// //      llOwnerSay((string)Item_TEMP);
  688. //MOVED TO OTHER SCRIPT// //      llOwnerSay("\n");
  689. //MOVED TO OTHER SCRIPT// //      }
  690. //MOVED TO OTHER SCRIPT//     }//if 1
  691.  
  692. //MOVED TO OTHER SCRIPT//     else if (llStringLength(Item_TEMP) > 24)
  693. //MOVED TO OTHER SCRIPT//     {//if 1
  694. //MOVED TO OTHER SCRIPT//       llOwnerSay("\n");
  695. //MOVED TO OTHER SCRIPT//       llOwnerSay("WARNING: The Item Name:");
  696. //MOVED TO OTHER SCRIPT//       llOwnerSay(Item_TEMP);
  697. //MOVED TO OTHER SCRIPT//       llOwnerSay("is too long. Item Names MUST be less than 24 characters. The Item will not be added.");
  698. //MOVED TO OTHER SCRIPT//       llOwnerSay("\n");
  699. //MOVED TO OTHER SCRIPT//     }//if 1
  700.  
  701. //MOVED TO OTHER SCRIPT//     else
  702. //MOVED TO OTHER SCRIPT//     {//else 1
  703.  
  704. //MOVED TO OTHER SCRIPT//       // if the first 3 characters of Item_TEMP matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 0 (1st CAT item)...
  705. //MOVED TO OTHER SCRIPT//       if ((string)llGetSubString(Item_TEMP,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,0),0,3))) // in Menu_CAT_Object_Names_Prefix, 0(1st) item, first 3 chars
  706. //MOVED TO OTHER SCRIPT//       {//if 1.1
  707. //MOVED TO OTHER SCRIPT// //DEBUG//llOwnerSay("ADDED to: CAT1 (" + (string)Menu_CAT_Object_Names_Prefix(0) + ")");
  708. //MOVED TO OTHER SCRIPT//         Menu_CAT1_List += Item_TEMP;
  709. //MOVED TO OTHER SCRIPT//         Menu_CAT1_Total = Menu_CAT1_Total + 1;
  710. //MOVED TO OTHER SCRIPT//       }//if 1.1
  711. //MOVED TO OTHER SCRIPT//       // if the first 3 characters of Item_TEMP matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 1 (2nd CAT item)...
  712. //MOVED TO OTHER SCRIPT//       else if ((string)llGetSubString(Item_TEMP,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,1),0,3))) // in Menu_CAT_Object_Names_Prefix, 1(2nd) item, first 3 chars
  713. //MOVED TO OTHER SCRIPT//       {//if 1.2
  714. //MOVED TO OTHER SCRIPT// //DEBUG//llOwnerSay("ADDED to: CAT2 (" + (string)Menu_CAT_Object_Names_Prefix(1) + ")");
  715. //MOVED TO OTHER SCRIPT//         Menu_CAT2_List += Item_TEMP;
  716. //MOVED TO OTHER SCRIPT//         Menu_CAT2_Total = Menu_CAT2_Total + 1;
  717. //MOVED TO OTHER SCRIPT//       }//if 1.2
  718. //MOVED TO OTHER SCRIPT//       // if the first 3 characters of Item_TEMP matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 2 (3rd CAT item)...
  719. //MOVED TO OTHER SCRIPT//       else if ((string)llGetSubString(Item_TEMP,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,2),0,3))) // in Menu_CAT_Object_Names_Prefix, 2(3rd) item, first 3 chars
  720. //MOVED TO OTHER SCRIPT//       {//if 1.3
  721. //MOVED TO OTHER SCRIPT// //DEBUG//llOwnerSay("ADDED to: CAT3 (" + (string)Menu_CAT_Object_Names_Prefix(2) + ")");
  722. //MOVED TO OTHER SCRIPT//         Menu_CAT3_List += Item_TEMP;
  723. //MOVED TO OTHER SCRIPT//         Menu_CAT3_Total = Menu_CAT3_Total + 1;
  724. //MOVED TO OTHER SCRIPT//       }//if 1.3
  725. //MOVED TO OTHER SCRIPT//       // if the first 3 characters of Item_TEMP matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 3 (4th CAT item)...
  726. //MOVED TO OTHER SCRIPT//       else if ((string)llGetSubString(Item_TEMP,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,3),0,3))) // in Menu_CAT_Object_Names_Prefix, 3(4th) item, first 3 chars
  727. //MOVED TO OTHER SCRIPT//       {//if 1.4
  728. //MOVED TO OTHER SCRIPT// //DEBUG//llOwnerSay("ADDED to: CAT4 (" + (string)Menu_CAT_Object_Names_Prefix(3) + ")");
  729. //MOVED TO OTHER SCRIPT//         Menu_CAT4_List += Item_TEMP;
  730. //MOVED TO OTHER SCRIPT//         Menu_CAT4_Total = Menu_CAT4_Total + 1;
  731. //MOVED TO OTHER SCRIPT//       }//if 1.4
  732. //MOVED TO OTHER SCRIPT//       // if the first 3 characters of Item_TEMP matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 4 (5th CAT item)...
  733. //MOVED TO OTHER SCRIPT//       else if ((string)llGetSubString(Item_TEMP,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,4),0,3))) // in Menu_CAT_Object_Names_Prefix, 4(5th) item, first 3 chars
  734. //MOVED TO OTHER SCRIPT//       {//if 1.5
  735. //MOVED TO OTHER SCRIPT// //DEBUG//llOwnerSay("ADDED to: CAT5 (" + (string)Menu_CAT_Object_Names_Prefix(4) + ")");
  736. //MOVED TO OTHER SCRIPT//         Menu_CAT5_List += Item_TEMP;
  737. //MOVED TO OTHER SCRIPT//         Menu_CAT5_Total = Menu_CAT5_Total + 1;
  738. //MOVED TO OTHER SCRIPT//       }//if 1.5
  739. //MOVED TO OTHER SCRIPT//       // if the first 3 characters of Item_TEMP matches the first 3 characters of Menu_CAT_Object_Names_Prefix at position 5 (6th CAT item)...
  740. //MOVED TO OTHER SCRIPT//       else if ((string)llGetSubString(Item_TEMP,0,3) == ((string)llGetSubString(llList2String(Menu_CAT_Object_Names_Prefix,5),0,3))) // in Menu_CAT_Object_Names_Prefix, 5(6th) item, first 3 chars
  741. //MOVED TO OTHER SCRIPT//       {//if 1.6
  742. //MOVED TO OTHER SCRIPT// //DEBUG//llOwnerSay("ADDED to: CAT6 (" + (string)Menu_CAT_Object_Names_Prefix(5) + ")");
  743. //MOVED TO OTHER SCRIPT//         Menu_CAT6_List += Item_TEMP;
  744. //MOVED TO OTHER SCRIPT//         Menu_CAT6_Total = Menu_CAT6_Total + 1;
  745. //MOVED TO OTHER SCRIPT//       }//if 1.6
  746. //MOVED TO OTHER SCRIPT//       else // if the Item_Name isn't in the list of Menu_CAT_Object_Names_Prefix...
  747. //MOVED TO OTHER SCRIPT//       {//if 1.x
  748. //MOVED TO OTHER SCRIPT//         llOwnerSay("\n");
  749. //MOVED TO OTHER SCRIPT//         llOwnerSay("WARNING: The Item Name:");
  750. //MOVED TO OTHER SCRIPT//         llOwnerSay(Item_TEMP);
  751. //MOVED TO OTHER SCRIPT//         llOwnerSay("is undefined. Item Name's PREfix MUST be one of the defined Prefixes for the 6 Categories. The Item will not be added.");
  752. //MOVED TO OTHER SCRIPT//         llOwnerSay("\n");
  753. //MOVED TO OTHER SCRIPT//       }//if 1.x
  754. //MOVED TO OTHER SCRIPT//     }//else 1
  755.  
  756. //MOVED TO OTHER SCRIPT//   }//for 1
  757.  
  758. //MOVED TO OTHER SCRIPT//      if(Scr_State >= 90)//DEBUG//
  759. //MOVED TO OTHER SCRIPT//      {
  760. //MOVED TO OTHER SCRIPT// //DEBUG//       //llOwnerSay("\n");
  761. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("- Category Lists: ");
  762. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("Menu_CAT1_List: " + llList2String(Menu_CAT_Object_Names_Prefix,0) + " = " + (string)Menu_CAT1_Total + " Items");
  763. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay((string)Menu_CAT1_List);
  764. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("Menu_CAT2_List: " + llList2String(Menu_CAT_Object_Names_Prefix,1) + " = " + (string)Menu_CAT2_Total + " Items");
  765. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay((string)Menu_CAT2_List);
  766. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("Menu_CAT3_List: " + llList2String(Menu_CAT_Object_Names_Prefix,2) + " = " + (string)Menu_CAT3_Total + " Items");
  767. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay((string)Menu_CAT3_List);
  768. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("Menu_CAT4_List: " + llList2String(Menu_CAT_Object_Names_Prefix,3) + " = " + (string)Menu_CAT4_Total + " Items");
  769. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay((string)Menu_CAT4_List);
  770. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("Menu_CAT5_List: " + llList2String(Menu_CAT_Object_Names_Prefix,4) + " = " + (string)Menu_CAT5_Total + " Items");
  771. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay((string)Menu_CAT5_List);
  772. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("Menu_CAT6_List: " + llList2String(Menu_CAT_Object_Names_Prefix,5) + " = " + (string)Menu_CAT6_Total + " Items");
  773. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay((string)Menu_CAT6_List);
  774. //MOVED TO OTHER SCRIPT// //DEBUG//       llOwnerSay("\n");
  775. //MOVED TO OTHER SCRIPT//      }
  776.  
  777. //MOVED TO OTHER SCRIPT//     Item_Pointer = 0;
  778.  
  779. //MOVED TO OTHER SCRIPT//     return;
  780. //MOVED TO OTHER SCRIPT// }
  781. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  782.  
  783.  
  784.  
  785. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  786. DO_Rezz()
  787. {
  788. }
  789. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  790.  
  791.  
  792.  
  793. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  794. DO_ShowHide()
  795. {
  796. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  797. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected item's state
  798.  
  799.   if((integer)llList2String(Menu_CAT_States,(Menu_CAT_IDX -1)) == 1)
  800. //  if(llListFindList(Menu_CAT_States,["0"]) == (Menu_CAT_IDX -1))
  801.   {
  802.     SELECTED_status = 0;
  803.     Menu_CAT_States = llListReplaceList(Menu_CAT_States,[(integer)SELECTED_status],(Menu_CAT_IDX -1),(Menu_CAT_IDX -1)); // toggle the value in the list Menu_CAT_States, at pos (Menu_CAT_IDX -1)
  804.     llSay(0,"\n");
  805.     llSay(0,"> Now Hiding: " + llList2String(Menu_CAT_Button_Labels,(Menu_CAT_IDX -1)));
  806.   }
  807.  
  808. //  if((integer)llList2String(Menu_CAT_States,(Menu_CAT_IDX -1)) == 1)
  809. //  if(llListFindList(Menu_CAT_States,["1"]) == (Menu_CAT_IDX -1))
  810.   else
  811.   {
  812.     SELECTED_status = 1;
  813.     Menu_CAT_States = llListReplaceList(Menu_CAT_States,[(integer)SELECTED_status],(Menu_CAT_IDX -1),(Menu_CAT_IDX -1)); // toggle the value in the list Menu_CAT_States, at pos (Menu_CAT_IDX -1)
  814.     llSay(0,"\n");
  815.     llSay(0,"> Now Showing: " + llList2String(Menu_CAT_Button_Labels,(Menu_CAT_IDX -1)));
  816.   }
  817.  
  818. //  llSetLinkAlpha((integer)SELECTED_link,(float)SELECTED_status,ALL_SIDES);
  819.   llSetLinkAlpha(SELECTED_link,SELECTED_status,ALL_SIDES);
  820. //  llDialog(Obj_Toucher_Key, Menu_Capt, Menu_Butt, Menu_Chan);
  821.   return;
  822. }
  823. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  824.  
  825.  
  826.  
  827. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  828. DO_Mode()
  829. {
  830. }
  831. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  832.  
  833.  
  834.  
  835. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  836. DO_Theme()
  837. {
  838. }
  839. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  840.  
  841.  
  842.  
  843. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  844. //DO_Texture(integer SELECTED_link,string SELECTED_item,integer SELECTED_face)
  845. DO_Texture()
  846. {
  847. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  848. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  849. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  850. llSay(0,"\n");
  851. llSay(0,"> Now Setting: " + llList2String(Menu_CAT_Button_Labels,(Menu_CAT_IDX -1)) + ": " + SELECTED_item);
  852.   llSetLinkTexture(SELECTED_link, SELECTED_item, SELECTED_face);
  853. llOwnerSay("xxxADDED this RETURN - it worked without the Show-Hide but not after using that Show-Hide");
  854.     return;
  855. }
  856. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  857.  
  858.  
  859.  
  860. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  861. // Get the Set-of-6(or 9) for the selected Category
  862. GET_Menu_CAT_SUB_Set()
  863. // This assumes the list Menu_CAT_SUB_List is the Currently-set list
  864. // BEFORE calling this routine:
  865. //        - assign Menu_CAT_SUB_TEMP  = to the current CAT# list [Menu_CAT_SUB_List]
  866. //        - assign Menu_CAT_SUB_Total = to the current CAT# list's Total [Menu_CAT#_Total]
  867. {
  868.  
  869. //DEBUG//llOwnerSay("> GET_Menu_CAT_SUB_Set:");
  870. //DEBUG//llOwnerSay("(MCSS)(1): Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  871.   Menu_CAT_SUB_Set = [];
  872.   Item_Counter = 0;
  873.  
  874.   if (Menu_CAT_SUB_Total <= 9)
  875.   {
  876.     Menu_CAT_SUB_Set = Menu_CAT_SUB_TEMP;
  877.   }
  878.   else
  879.   {
  880.     if (llList2String(Menu_CAT_SUB_TEMP,Item_IDX) == "")
  881.      {
  882.        Item_IDX = 0;
  883.      }
  884.  
  885.     else
  886.     {
  887.       for (Item_Counter = Item_IDX; (Item_Counter <= (Item_IDX + 5)); Item_Counter++)
  888.       {//~for1
  889.         if (llList2String(Menu_CAT_SUB_TEMP,Item_Counter) == "")
  890.         {
  891.           Menu_CAT_SUB_Set += [" "];
  892.         }
  893.         else
  894.         {
  895.           Menu_CAT_SUB_Set += [llList2String(Menu_CAT_SUB_TEMP,Item_Counter)];
  896.         }
  897.       }//~for1
  898.     }
  899.      Menu_CAT_SUB_Set = Menu_SUB_NAV + Menu_CAT_SUB_Set;
  900.      Item_IDX = Item_Counter; // ADDED !!!!!!!
  901. // THIS WORKS:
  902. //      Menu_CAT_SUB_Set = Menu_SUB_NAV + [llList2String(Menu_CAT_SUB_TEMP,(Item_Pointer)),llList2String(Menu_CAT_SUB_TEMP,(Item_Pointer + 1)),llList2String(Menu_CAT_SUB_TEMP,(Item_Pointer + 2)),llList2String(Menu_CAT_SUB_TEMP,(Item_Pointer + 3)),llList2String(Menu_CAT_SUB_TEMP,(Item_Pointer + 4)),llList2String(Menu_CAT_SUB_TEMP,(Item_Pointer + 5))];
  903.   }
  904. //DEBUG//llOwnerSay("Menu_CAT_SUB_Set: ");
  905. //DEBUG//llOwnerSay((string)Menu_CAT_SUB_Set);
  906. //DEBUG//llOwnerSay("(MCSS)(2): Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  907.     return;
  908. }
  909. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  910.  
  911.  
  912.  
  913. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  914. // state default state ~ BEG
  915. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  916. default // RENAME to 'default' (NO 'state')
  917. {
  918. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  919.     state_entry()
  920.     {
  921.  
  922.       Obj_Owner_Key = (string)llGetOwner(); // -> returns UUID of owner
  923. //      Menu_ADM_AUTH_Owner = Obj_Owner_Key; // set, in Menu_ADM_AUTH_Owner, the Object Owner's key 'Obj_Owner_Key'
  924.       Menu_ADM_AUTH_Users = llListReplaceList(Menu_ADM_AUTH_Users,[Obj_Owner_Key],0,0); // put the owner's UUID in the list of authorized users, at pos 0
  925.  
  926.       if((Scr_State == 0) || (Scr_State >= 90))
  927.       {
  928.         if(Scr_State == 99)
  929.         {
  930.           llOwnerSay(">>> DEBUG Mode <<<");
  931.           llMessageLinked(LINK_THIS, 99, "MODE: DEBUG MODE", "MODE: DEBUG MODE");
  932.           Scr_State = 90;
  933.         }
  934.  
  935.         llOwnerSay("Please wait: Initializing & Checking Items...");
  936.  
  937. //        llOwnerSay("\n");
  938.  
  939.         // GET Notecard CFG data
  940. //        llSetScriptState(Scr_ReadNC,TRUE); // Turn on the Notecard-reading script defined in Scr_ReadNC
  941.         // Tell the NC script defined in Scr_ReadNC to start reading it's data
  942. //        llMessageLinked(LINK_THIS, 4, NC_Selected, "CFG: NC_Selected");
  943.         llMessageLinked(LINK_THIS, 5, "BEG: Read_Data", "BEG: Read_Data");
  944.  
  945.         // Gather data
  946. //        InitScript();
  947.  
  948. //        // Prepare for data
  949. //        if(Scr_State >= 90)
  950. //        {
  951. //          llSay(0,"Scr_State: " + (string)Scr_State);
  952. //        }
  953. //        // GET data
  954. //        GET_CAT_LinkNumbers();
  955. //        GET_Menu_CAT_Lists();
  956. //        Scr_State = (Scr_State + 1); //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  957.         // finish getting data
  958. //        InitScript();
  959. //        if(Scr_State >= 90)
  960. //        {
  961. //          llSay(0,"Scr_State: " + (string)Scr_State);
  962. //        }
  963. //        Scr_State = (Scr_State + 1); //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  964.       }
  965.  
  966. //      if((Scr_State == 9) || (Scr_State >= 90))
  967. //      {
  968. //        llOwnerSay("Check complete; Initialized & Ready!");
  969. //        Scr_State = (Scr_State + 1);
  970. //        state Menu_State;
  971. //      }
  972.  
  973. //        llOwnerSay("Check complete; Initialized & Ready!");
  974. //        state Menu_State;
  975.     }
  976. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  977.  
  978. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  979.     on_rez(integer a)
  980.     {
  981.         llResetScript();
  982.  
  983.         if(Scr_State >= 90)
  984.         {
  985.           llMessageLinked(LINK_THIS, 99, "MODE: DEBUG MODE", "MODE: DEBUG MODE");
  986.         }
  987.  
  988.         // Gather data
  989. //        InitScript();
  990.  
  991. //        // Prepare for data
  992. //        InitScript();
  993. //        if(Scr_State >= 90)
  994. //        {
  995. //          llSay(0,"Scr_State: " + (string)Scr_State);
  996. //        }
  997. //        // GET data
  998. //        GET_CAT_LinkNumbers();
  999. //        GET_Menu_CAT_Lists();
  1000. //        Scr_State = (Scr_State + 1); //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  1001.         // finish getting data
  1002. //        InitScript();
  1003. //        if(Scr_State >= 90)
  1004. //        {
  1005. //          llSay(0,"Scr_State: " + (string)Scr_State);
  1006. //        }
  1007. //        Scr_State = (Scr_State + 1); //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  1008.     }
  1009. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1010.  
  1011. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1012.     changed(integer b)
  1013.     {
  1014.         llResetScript();
  1015.  
  1016.         if(Scr_State >= 90)
  1017.         {
  1018.           llMessageLinked(LINK_THIS, 99, "MODE: DEBUG MODE", "MODE: DEBUG MODE");
  1019.         }
  1020.  
  1021.         // Gather data
  1022. //        InitScript();
  1023.  
  1024. //        // Prepare for data
  1025. //        InitScript();
  1026. //        if(Scr_State >= 90)
  1027. //        {
  1028. //          llSay(0,"Scr_State: " + (string)Scr_State);
  1029. //        }
  1030. //        // GET data
  1031. //        GET_CAT_LinkNumbers();
  1032. //        GET_Menu_CAT_Lists();
  1033. //        Scr_State = (Scr_State + 1); //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  1034.         // finish getting data
  1035. //        InitScript();
  1036. //        if(Scr_State >= 90)
  1037. //        {
  1038. //          llSay(0,"Scr_State: " + (string)Scr_State);
  1039. //        }
  1040. //        Scr_State = (Scr_State + 1); //0=Init(Start), 10=Init(End), 20=Run, 90=Init[DEBUG](Start), 91=Init[DEBUG](End), 92=Run[DEBUG](Run), 99=DEBUG_Mode <-99 to go into DEBUG mode
  1041.     }
  1042. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1043.  
  1044. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1045.     //SendingPrimLinkNum is the LINK NUMBER of the prim that sent the message
  1046.     //Scr_CMD_ID is used for sending an ID code to identify each message
  1047.     //Str_ID_VarName_str is used for sending the Variable Name of the data value in Message
  1048.     link_message(integer SendingPrimLinkNum, integer Scr_CMD_ID, string message, key Str_ID_VarName_str)
  1049.     { //linkmessage
  1050.  
  1051.       if((Scr_CMD_ID == 999) || (message == "END: End Of Data") || (Str_ID_VarName_str == "EOD"))
  1052.       {
  1053. //        if(Scr_State < 10)
  1054. //        { Scr_State = 10; }
  1055. //        if(Scr_State >= 90)
  1056. //        { Scr_State = (Scr_State + 1); }
  1057.         Scr_State = (Scr_State + 1);
  1058.         Init_Data();
  1059.       }
  1060.  
  1061.       else
  1062.       {
  1063.         // GET_Incoming_DATA(SendingPrimLinkNum, Scr_CMD_ID, message, Str_ID_VarName_str);
  1064.         GET_Incoming_DATA(Scr_CMD_ID, message, Str_ID_VarName_str);
  1065.       }
  1066.  
  1067. //      if((Scr_CMD_ID == 11) || (message == "BEG: Start Of Data") || (Str_ID_VarName_str == "SOD"))
  1068. //      {
  1069. //llSay(0,"~~~Receiving Data~~~");
  1070. //        Scr_State = (Scr_State + 1);
  1071. //      }
  1072.  
  1073. //      if((Scr_CMD_ID == 999) || (message == "END: End Of Data") || (Str_ID_VarName_str == "EOD"))
  1074. //      {
  1075. //        Scr_State = (Scr_State + 1);
  1076. //llSay(0,"~~~~~~~screwy script state: " + (string)Scr_State);
  1077. //        Init_Data();
  1078. //      }
  1079.  
  1080. //      else if(Scr_CMD_ID >= 100)
  1081. //      {
  1082. //        // GET_Incoming_DATA(SendingPrimLinkNum, Scr_CMD_ID, message, Str_ID_VarName_str);
  1083. //        GET_Incoming_DATA(Scr_CMD_ID, message, Str_ID_VarName_str);
  1084. //      }
  1085.  
  1086.     } //linkmessage
  1087. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1088.  
  1089. }
  1090. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1091. // state default state ~ END
  1092. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1093.  
  1094.  
  1095. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1096. // state Menu_State state ~ BEG
  1097. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1098. state Menu_State
  1099. {
  1100.     state_entry()
  1101.     {
  1102.     }
  1103.  
  1104.     on_rez(integer a)
  1105.     {
  1106.         llResetScript();
  1107.     }
  1108.  
  1109.     changed(integer b)
  1110.     {
  1111.         llResetScript();
  1112.     }
  1113.  
  1114. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1115.     //SendingPrimLinkNum is the LINK NUMBER of the prim that sent the message
  1116.     //Scr_CMD_ID is used for sending an ID code to identify each message
  1117.     //Str_ID_VarName_str is used for sending the Variable Name of the data value in Message
  1118.     link_message(integer SendingPrimLinkNum, integer Scr_CMD_ID, string message, key Str_ID_VarName_str)
  1119.     { //linkmessage
  1120. //      GET_Incoming_DATA(SendingPrimLinkNum, Scr_CMD_ID, message, Str_ID_VarName_str);
  1121.       GET_Incoming_CMDs(Scr_CMD_ID, message, Str_ID_VarName_str);
  1122.     } //linkmessage
  1123.  
  1124.     timer()
  1125.     {
  1126.         llSetTimerEvent(0.0);
  1127.         remove_listens();
  1128.     }
  1129.  
  1130.     touch_start(integer total_number)
  1131.     {
  1132.           Obj_Toucher_Name = llDetectedName(0); // put the toucher's Name in Obj_Toucher_Name
  1133.           Obj_Toucher_Key = (string)llDetectedKey(0); // put the toucher's UUID in Obj_Toucher_Key
  1134. //          Obj_Toucher_Group; // put the toucher's currently-active group in Obj_Toucher_Group
  1135. //          if(llDetectedGroup(0))
  1136. //          { Obj_Toucher_Group = TRUE; } // see if the toucher's currently-active group is the same as the object's group
  1137. //          else
  1138. //          { Obj_Toucher_Group = FALSE; }
  1139.           Obj_OwnerToucher_NKG = Obj_Owner_Key + "|" + Obj_Toucher_Name + "|" + Obj_Toucher_Key + "|" + Obj_Toucher_Group;
  1140.           llMessageLinked(LINK_THIS, 2, Obj_OwnerToucher_NKG, "Obj_OwnerToucher_NKG");
  1141.  
  1142.           Menu_SUB_ID = 0;
  1143.           Menu_Capt = "\n" + Menu_IA_Brand_Name + "\n" + Menu_IA_Product_Name + ", " + Menu_IA_Product_Vers + "\n" + Menu_00_Capt;
  1144.         // display the dialog
  1145.         Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1146. //        llDialog(llDetectedKey(0), Menu_Capt, Menu_Butt, Menu_Chan); // WORKS
  1147.         llDialog(Obj_Toucher_Key, Menu_Capt, Menu_Butt, Menu_Chan);
  1148. //DEBUG//llSay(0,"Main Menu 1:");
  1149. //DEBUG//llSay(0, "Menu_SUB_ID: " + (string)Menu_SUB_ID);
  1150. //DEBUG//llSay(0,"\n");
  1151.         llListen(Menu_Chan,"",NULL_KEY,"");
  1152.     }
  1153.  
  1154. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1155.     listen(integer channel, string name, key id, string message)
  1156.     { //listen
  1157. //DEBUG//llOwnerSay("> listen...");
  1158. //DEBUG//llOwnerSay("Menu_SUB_ID: " + (string)Menu_SUB_ID);
  1159. //DEBUG//llOwnerSay("Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1160. //llOwnerSay("Item_Pointer = " + (string)Item_Pointer + " - Item_IDX = " + (string)Item_IDX);
  1161. llOwnerSay("at listn: message: " + message);
  1162. //DEBUG//llOwnerSay("Menu_CAT_Object_Names_Prefix IDX #: " + (string)llListFindList(Menu_CAT_Button_Labels,[message]) + " (according to message position)");
  1163. //DEBUG//llOwnerSay("(^--- if this is -1, it means 'message' is not in the list of CATs - safe to ignore");
  1164. //DEBUG//llOwnerSay("Menu_CAT_Object_Names_Prefix IDX #: " + (string)Menu_SUB_ID + " (according to current CAT)");
  1165. //DEBUG//llOwnerSay("...");
  1166.  
  1167. //DEBUG//
  1168. Scr_Mem_Usage_Current = llGetUsedMemory();
  1169. llOwnerSay("xDELx Current Memory usage: " + (string)Scr_Mem_Usage_Current + "bytes");
  1170. //------------------------------------------
  1171. //------------------------------------------
  1172. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1173.       if ( (Obj_Toucher_Key == Obj_Owner_Key) || (Menu_00_AUTH_Level == 0) || ((Menu_00_AUTH_Level == 2) && (Obj_Toucher_Group == llList2String(Menu_ADM_AUTH_Users,7))) || ((Menu_00_AUTH_Level == 3) && (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]))) )
  1174.       {//if Authorized to use the menu...
  1175. //------------------------------------------
  1176. //------------------------------------------
  1177.         if (message != "Close Menu")
  1178.         {//if not 'Close Menu'...
  1179. //------------------------------------------
  1180.           // if Themes...
  1181.           if (message == "● Themes")
  1182.           {
  1183. //DEBUG//
  1184. llOwnerSay("xDELx Theme Menu: AUTH_Level = " + (string)Menu_SUB_THM_AUTH_Level);
  1185.               if (Menu_SWSF_EGG == 1)
  1186.               {
  1187.                 Menu_SWSF_EGG = 2;
  1188.               }
  1189.               if ( (Obj_Toucher_Key == Obj_Owner_Key) || (Menu_SUB_THM_AUTH_Level == 0) || ((Menu_SUB_THM_AUTH_Level == 2) && (Obj_Toucher_Group == llList2String(Menu_ADM_AUTH_Users,7))) || ((Menu_SUB_THM_AUTH_Level == 3) && (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]))) )
  1190.               {
  1191.                 Menu_SUB_ID = 10;
  1192.                 llMessageLinked(LINK_THIS, 10, "Menu_THM", "Menu_THM");
  1193.               }
  1194.               else // CHANGE THIS TO ERROR PAGE
  1195.               {
  1196.                 Menu_SUB_ID = 99;
  1197.                 Menu_Capt = Menu_ADM_AUTH_ERR_Capt1 + llList2String(Menu_00_MenuName_List,4) + Menu_ADM_AUTH_ERR_Capt2;
  1198.                 Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1199.               }
  1200.           }
  1201. //--------------
  1202.           // if Modes...
  1203.           else if (message == "Modes")
  1204.           {
  1205. llOwnerSay("xDELx Mode Menu: AUTH_Level = " + (string)Menu_SUB_MODE_AUTH_Level);
  1206.               if ( (Obj_Toucher_Key == Obj_Owner_Key) || (Menu_SUB_MODE_AUTH_Level == 0) || ((Menu_SUB_MODE_AUTH_Level == 2) && (Obj_Toucher_Group == llList2String(Menu_ADM_AUTH_Users,7))) || ((Menu_SUB_MODE_AUTH_Level == 3) && (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]))) )
  1207.               {
  1208.                 Menu_SUB_ID = 20;
  1209.                 llMessageLinked(LINK_THIS, 20, "Menu_MODE", "Menu_MODE");
  1210.               }
  1211.               else // CHANGE THIS TO ERROR PAGE
  1212.               {
  1213.                 Menu_SUB_ID = 0;
  1214.                 Menu_Capt = Menu_ADM_AUTH_ERR_Capt1 + llList2String(Menu_00_MenuName_List,4) + Menu_ADM_AUTH_ERR_Capt2;
  1215.                 Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1216.               }
  1217.           }
  1218. //--------------
  1219.           else
  1220.           {//else everything else
  1221. //--  --  --  --  --  --  --  --  --  --  --
  1222.             if (Menu_SWSF_EGG == 4)
  1223.             {
  1224.               Menu_SWSF_EGG = 5;
  1225.               Menu_SUB_ID = 0;
  1226.               Menu_Capt = "\n\nCONGRATULATIONS!\n\nYou found StarWolffs Easter Egg!\n\nA Gift should be delivered to you shortly\n- if it does not arrive, contact:\nsecondlife:///app/agent/b3c21e55-a326-455e-b302-ffeeb95e4027/about";
  1227. //StarWolffs SatisFactory Free Gift! //object
  1228. //            llGiveInventoryList(aviname,"StarWolffs SatisFactory Free Gift!",llGetInventoryName(INVENTORY_OBJECT,"StarWolffs SatisFactory Free Gift!"));
  1229.               llGiveInventory(Obj_Toucher_Name,"StarWolffs SatisFactory Free Gift!");
  1230.               Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1231. //DEBUG//llSay(0,"'Main Menu' button - then do the Main Menu llDialog again");
  1232.             }
  1233. //--------------
  1234.             else if (message == "Main Menu")
  1235.             {
  1236.               Menu_SUB_ID = 0;
  1237.               Menu_CAT_IDX = 0;
  1238.               Menu_Capt = "\n" + Menu_IA_Brand_Name + "\n" + Menu_IA_Product_Name + ", " + Menu_IA_Product_Vers + "\n" + Menu_00_Capt;
  1239.               Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1240. //DEBUG//llSay(0,"'Main Menu' button - then do the Main Menu llDialog again");
  1241.             }
  1242. //--------------
  1243.             else if (message == "Admin")
  1244.             {
  1245.               if (Menu_SWSF_EGG == 2)
  1246.               {
  1247.                 Menu_SWSF_EGG = 3;
  1248.               }
  1249. //DEBUG//
  1250. llOwnerSay("xDELx Admin Menu: AUTH_Level = " + (string)Menu_SUB_ADM_AUTH_Level);
  1251.               if (Obj_Toucher_Key == Obj_Owner_Key)
  1252.               {
  1253.                 Menu_SUB_ID = 80;
  1254.                 Menu_Capt = Menu_SUB_ADM_Capt + "\n" + Menu_SUB_ADM_Choices;
  1255.                 Menu_Butt = Menu_00b + Menu_SUB_ADM_Butt;
  1256.               }
  1257.               else // CHANGE THIS TO ERROR PAGE
  1258.               {
  1259.                 Menu_SUB_ID = 0;
  1260.                 Menu_Capt = Menu_ADM_AUTH_ERR_Capt1 + llList2String(Menu_00_MenuName_List,1) + Menu_ADM_AUTH_ERR_Capt2;
  1261.                 Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1262.               }
  1263.             }
  1264. //--------------
  1265.             else if (message == "INFO/About")
  1266.             {
  1267.               Menu_SUB_ID = 90;
  1268.               Menu_Capt = Menu_SUB_IA_Capt + "\nBrand:    " + Menu_IA_Brand_Name + " by " + Menu_IA_Brand_By + "\nProduct: " + Menu_IA_Product_Name + ", " + Menu_IA_Product_Vers + "\nCoding:  StarWolffs SatisFactory\n\nClick a button below for more details:";
  1269.               Menu_Butt = Menu_00b + [Menu_IA_Product_Name,Menu_IA_Brand_Name,"StarWolff"];
  1270. //DEBUG//llSay(0,"menu buttons (Menu_Butt): " + (string)Menu_Butt);
  1271.             }
  1272. //--------------
  1273.             else if (message == Menu_IA_Product_Name)
  1274.             {
  1275.               Menu_Capt = Menu_SUB_IA_Capt + "\n" + Menu_IA_Brand_Name + " - " + Menu_IA_Product_Name + ", " + Menu_IA_Product_Vers + "\n" + Menu_IA_Product_Capt;
  1276.               Menu_Butt = Menu_00b + [Menu_IA_Product_Name,Menu_IA_Brand_Name,"StarWolff"];
  1277. //DEBUG//llSay(0,"You clicked the 'Product' button");
  1278.             }
  1279. //--------------
  1280.             else if (message == Menu_IA_Brand_Name)
  1281.             {
  1282.               Menu_Capt = Menu_SUB_IA_Capt + "\n" + Menu_IA_Brand_Capt;
  1283.               Menu_Butt = Menu_00b + [Menu_IA_Product_Name,Menu_IA_Brand_Name,"StarWolff"];
  1284. //DEBUG//llSay(0,"You clicked the 'Brand' button");
  1285.             }
  1286. //--------------
  1287.             else if (message == "StarWolff")
  1288.             {
  1289.               if (Menu_SWSF_EGG == 0)
  1290.               {
  1291.                 Menu_SWSF_EGG = 1;
  1292.               }
  1293.               Menu_Capt = Menu_SUB_IA_Capt + "\n" + Obj_Pn + " - " + Obj_Vs + "\n\n" + Menu_IA_SWSF_Capt;
  1294.               Menu_Butt = Menu_00b + [Menu_IA_Product_Name,Menu_IA_Brand_Name,"StarWolff"];
  1295.             }
  1296. //--------------
  1297. //DISabled//            else if (message == "Modes")
  1298. //DISabled//            {
  1299. //DEBUG//
  1300. //DISabled//llSay(0,"Mode Menu: AUTH_Level = " + (string)Menu_SUB_MODE_AUTH_Level);
  1301. //DISabled//              if ( (Obj_Toucher_Key == Obj_Owner_Key) || (Menu_SUB_MODE_AUTH_Level == 0) || ((Menu_SUB_MODE_AUTH_Level == 2) && (Obj_Toucher_Group == llList2String(Menu_ADM_AUTH_Users,7))) || ((Menu_SUB_MODE_AUTH_Level == 3) && (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]))) )
  1302. //DISabled//              {
  1303. //DISabled//                Menu_SUB_ID = 20;
  1304. //DISabled//                llMessageLinked(LINK_THIS, 20, "Menu_MODE", "Menu_MODE");
  1305. //// =======FROM HERE DOWN, NO LONGER NEEDED ============== <<<<<<<<
  1306. //DISabled//                Menu_Capt = Menu_SUB_MODE_Capt + "\nMode 1: " + llList2String(Menu_SUB_MODE_Descs,0) + "\nMode 2: " + llList2String(Menu_SUB_MODE_Descs,1) + "\nMode 3: " + llList2String(Menu_SUB_MODE_Descs,2) + "\nMode 4: " + llList2String(Menu_SUB_MODE_Descs,3) + "\nMode 5: " + llList2String(Menu_SUB_MODE_Descs,4) + "\nMode 6: " + llList2String(Menu_SUB_MODE_Descs,5) + "\nMode 7: " + llList2String(Menu_SUB_MODE_Descs,6) + "\nMode 8: " + llList2String(Menu_SUB_MODE_Descs,7) + "\nMode 9: " + llList2String(Menu_SUB_MODE_Descs,8);
  1307. //DISabled//                Menu_Butt = Menu_00b + Menu_SUB_MODE_Butt;
  1308. //DISabled//              }
  1309. //DISabled//              else // CHANGE THIS TO ERROR PAGE
  1310. //DISabled//              {
  1311. //DISabled//                Menu_SUB_ID = 0;
  1312. //DISabled//                Menu_Capt = Menu_ADM_AUTH_ERR_Capt1 + llList2String(Menu_00_MenuName_List,4) + Menu_ADM_AUTH_ERR_Capt2;
  1313. //DISabled//                Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1314. //DISabled//              }
  1315. //DISabled//            }
  1316. //--------------
  1317. //DISabled//            else if (message == "● Themes")
  1318. //DISabled//            {
  1319. //DISabled////DEBUG//
  1320. //DISabled//llSay(0,"Theme Menu: AUTH_Level = " + (string)Menu_SUB_THM_AUTH_Level);
  1321. //DISabled//              if (Menu_SWSF_EGG == 1)
  1322. //DISabled//              {
  1323. //DISabled//                Menu_SWSF_EGG = 2;
  1324. //DISabled//              }
  1325. //DISabled//              if ( (Obj_Toucher_Key == Obj_Owner_Key) || (Menu_SUB_THM_AUTH_Level == 0) || ((Menu_SUB_THM_AUTH_Level == 2) && (Obj_Toucher_Group == llList2String(Menu_ADM_AUTH_Users,7))) || ((Menu_SUB_THM_AUTH_Level == 3) && (llListFindList(Menu_ADM_AUTH_Users,[Obj_Toucher_Key]))) )
  1326. //DISabled//              {
  1327. //DISabled//                Menu_SUB_ID = 10;
  1328. //DISabled//                llMessageLinked(LINK_THIS, 10, "Menu_THM", "Menu_THM");
  1329. //// =======FROM HERE DOWN, NO LONGER NEEDED ============== <<<<<<<<
  1330. //DISabled//                Menu_Capt = Menu_SUB_THM_Capt + "\nTheme 1: " + llList2String(Menu_SUB_THM_Descs,0) + "\nTheme 2: " + llList2String(Menu_SUB_THM_Descs,1) + "\nTheme 3: " + llList2String(Menu_SUB_THM_Descs,2) + "\nTheme 4: " + llList2String(Menu_SUB_THM_Descs,3) + "\nTheme 5: " + llList2String(Menu_SUB_THM_Descs,4) + "\nTheme 6: " + llList2String(Menu_SUB_THM_Descs,5) + "\nTheme 7: " + llList2String(Menu_SUB_THM_Descs,6) + "\nTheme 8: " + llList2String(Menu_SUB_THM_Descs,7) + "\nTheme 9: " + llList2String(Menu_SUB_THM_Descs,8);
  1331. //DISabled//                Menu_Butt = Menu_00b + Menu_SUB_THM_Butt;
  1332. //DISabled//              }
  1333. //DISabled//              else // CHANGE THIS TO ERROR PAGE
  1334. //DISabled//              {
  1335. //DISabled//                Menu_SUB_ID = 99;
  1336. //DISabled//                Menu_Capt = Menu_ADM_AUTH_ERR_Capt1 + llList2String(Menu_00_MenuName_List,4) + Menu_ADM_AUTH_ERR_Capt2;
  1337. //DISabled//                Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1338. //DISabled//              }
  1339. //DISabled//            }
  1340. //--------------
  1341.             // Admin SUB_Menu
  1342.             else if (Menu_SUB_ID >= 80 && Menu_SUB_ID < 90)
  1343.             {
  1344.               if (message == "Owner")
  1345.               {
  1346.                 Menu_SUB_ID = 81;
  1347.                 Menu_00_AUTH_Level = 1;
  1348.                 message = "Owner-Only";
  1349. //DEBUG//llSay(0,"You chose Admin 1!");
  1350. //DEBUG//llSay(0,llList2String(Menu_SUB_ADM_List,0));
  1351.               }
  1352.               else if (message == "Group")
  1353.               {
  1354.                 Menu_SUB_ID = 82;
  1355.                 Menu_00_AUTH_Level = 2;
  1356.                 message = "Owner+Group";
  1357. //DEBUG//llSay(0,"You chose Admin 2!");
  1358. //DEBUG//llSay(0,llList2String(Menu_SUB_ADM_List,1));
  1359.               }
  1360.               else if (message == "List (NC)")
  1361.               {
  1362.                 Menu_SUB_ID = 83;
  1363.                 Menu_00_AUTH_Level = 3;
  1364.                 message = "Owner+List";
  1365. //DEBUG//llSay(0,"You chose Admin 3!");
  1366. //DEBUG//llSay(0,llList2String(Menu_SUB_ADM_List,2));
  1367.               }
  1368.               else if (message == "Public")
  1369.               {
  1370.                 Menu_SUB_ID = 84;
  1371.                 Menu_00_AUTH_Level = 0;
  1372.                 message = "Public"; // redundant, but... consistency
  1373. //DEBUG//llSay(0,"You chose Admin 4!");
  1374. //DEBUG//llSay(0,llList2String(Menu_SUB_ADM_List,3));
  1375.               }
  1376.               else if (message == "undefined 1")
  1377.               {
  1378.                 Menu_SUB_ID = 85;
  1379.                 Menu_00_AUTH_Level = 0;
  1380.                 message = "Public"; // temporarily set this to public until this selection is defined - REMOVE this line when it's defined
  1381. //DEBUG//llSay(0,"You chose Admin 5!");
  1382. //DEBUG//llSay(0,llList2String(Menu_SUB_ADM_List,4));
  1383.               }
  1384.               else if (message == "undefined 2")
  1385.               {
  1386.                 Menu_SUB_ID = 86;
  1387.                 Menu_00_AUTH_Level = 0;
  1388.                 message = "Public"; // temporarily set this to public until this selection is defined - REMOVE this line when it's defined
  1389. //DEBUG//llSay(0,"You chose Admin 6!");
  1390. //DEBUG//llSay(0,llList2String(Menu_SUB_ADM_List,5));
  1391.               }
  1392.               Menu_Capt = Menu_SUB_ADM_Capt + "\n" + Menu_SUB_ADM_Choices + "\n\nNow setting Menu access to: " + message;
  1393.               Menu_Butt = Menu_00b + Menu_SUB_ADM_Butt;
  1394. //DEBUG//llSay(0,"'Admin' sub menu - Set it up!");
  1395.             }
  1396. //--------------
  1397.             else if (message == "<===")
  1398.             {
  1399. //DEBUG//llOwnerSay("> '<==='");
  1400. //DEBUG//llOwnerSay("(1) Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1401.               Item_IDX = (Item_IDX - 12); // set the pointer back 12 (back 1 page (6), minus the current page (6) - 6+6=12
  1402.               if (Item_IDX < 0)
  1403.               {
  1404.                 Item_IDX = 0;
  1405.                 // Item_Pointer = (6 * (whole number of (out of the total number of items [Menu_CAT_SUB_Total], divided by 6)), + 1)
  1406.                 //- for example:
  1407.                 //-  if Menu_CAT_SUB_Total = 8...
  1408.                 //-  8/6=1.333
  1409.                 //-  whole number of 1.333 = 1
  1410.                 //-  6*1=6
  1411.                 // so:
  1412.                 // (6* (whole number of(Menu_CAT_SUB_Total / 6)) + 1)
  1413. //                Item_Pointer = (6* (llRound(Menu_CAT_SUB_Total / 6)) + 1);
  1414.               }
  1415.               GET_Menu_CAT_SUB_Set(); // returns Menu_CAT_SUB_Set (set of 6, and if >9 with Menu_SUB_NAV)
  1416. //DEBUG//llOwnerSay("(2) Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1417.               Menu_Butt = Menu_00b + Menu_CAT_SUB_Set;
  1418.             }
  1419. //--------------
  1420.             else if (message == "===>")
  1421.             {
  1422.               if (Menu_SWSF_EGG == 3)
  1423.               {
  1424.                 Menu_SWSF_EGG = 4;
  1425.               }
  1426. //DEBUG//llOwnerSay("> '===>'");
  1427. //DEBUG//llOwnerSay("(1) Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1428.               Item_Pointer = (Item_Pointer + 6); // set the pointer forward 6
  1429. //                if (Item_Pointer > Menu_CAT_SUB_Total)
  1430.               if (Item_IDX > Menu_CAT_SUB_Total)
  1431.               {
  1432.                 Item_IDX = 0;
  1433.               }
  1434.               GET_Menu_CAT_SUB_Set(); // returns Menu_CAT_SUB_Set (set of 6, and if >9 with Menu_SUB_NAV)
  1435. //DEBUG//llOwnerSay("(2) Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1436.               Menu_Butt = Menu_00b + Menu_CAT_SUB_Set;
  1437.             }
  1438. //--------------
  1439.             // Item SUB_Menu
  1440.             else if (Menu_CAT_IDX > 0)
  1441.             {
  1442.               // if the selected item is in the list of CAT1...
  1443. //              if ((string)llListFindList(Menu_CAT1_List,[message])
  1444. //              if ((string)llListFindList(Menu_CAT1_List,[message]) != -1)
  1445.               if(Menu_CAT_IDX == 1)
  1446.               {
  1447.                 //llSetLinkTexture(linknumber,message,face); // REPLACE THIS with 'apply texture to correct face on correct linknumber'
  1448. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  1449. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  1450. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  1451.                 SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,0); // Apply to this prim the linknumber listed in the 0th (1st) position in Menu_CAT_Object_PrimLinks
  1452.                 SELECTED_item = message;
  1453.                 SELECTED_face = (integer)llList2String(Menu_CAT_Action_Faces,0); // Apply to this face the facenumber listed in the 0th (1st) position in Menu_CAT_Action_Faces
  1454.                 //                DO_Texture(SELECTED_link,SELECTED_item,SELECTED_face);
  1455. //                DO_Texture();
  1456. //DEBUG//llSay(0,"You chose: " + message);
  1457.               }
  1458.               // if the selected item is in the list of CAT2...
  1459. //              else if ((string)llListFindList(Menu_CAT2_List,[message]) != -1)
  1460.               else if(Menu_CAT_IDX == 2)
  1461.               {
  1462.                 //llSetLinkTexture(linknumber,message,face); // REPLACE THIS with 'apply texture to correct face on correct linknumber'
  1463. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  1464. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  1465. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  1466.                 SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,1); // Apply to this prim the linknumber listed in the 1st (2nd) position in Menu_CAT_Object_PrimLinks
  1467.                 SELECTED_item = message;
  1468.                 SELECTED_face = (integer)llList2String(Menu_CAT_Action_Faces,1); // Apply to this face the facenumber listed in the 1st (2nd) position in Menu_CAT_Action_Faces
  1469.                 //                DO_Texture(SELECTED_link,SELECTED_item,SELECTED_face);
  1470. //                DO_Texture();
  1471. //DEBUG//llSay(0,"You chose: " + message);
  1472.               }
  1473.               // if the selected item is in the list of CAT3...
  1474. //              else if ((string)llListFindList(Menu_CAT3_List,[message]) != -1)
  1475.               else if(Menu_CAT_IDX == 3)
  1476.               {
  1477.                 //llSetLinkTexture(linknumber,message,face); // REPLACE THIS with 'apply texture to correct face on correct linknumber'
  1478. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  1479. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  1480. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  1481.                 SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,2); // Apply to this prim the linknumber listed in the 2nd (3rd) position in Menu_CAT_Object_PrimLinks
  1482.                 SELECTED_item = message;
  1483.                 SELECTED_face = (integer)llList2String(Menu_CAT_Action_Faces,2); // Apply to this face the facenumber listed in the 2nd (3rd) position in Menu_CAT_Action_Faces
  1484.                 //                DO_Texture(SELECTED_link,SELECTED_item,SELECTED_face);
  1485. //                DO_Texture();
  1486. //DEBUG//llSay(0,"You chose: " + message);
  1487.               }
  1488.               // if the selected item is in the list of CAT4...
  1489. //              else if ((string)llListFindList(Menu_CAT4_List,[message]) != -1)
  1490.               else if(Menu_CAT_IDX == 4)
  1491.               {
  1492.                 //llSetLinkTexture(linknumber,message,face); // REPLACE THIS with 'apply texture to correct face on correct linknumber'
  1493. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  1494. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  1495. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  1496.                 SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,3); // Apply to this prim the linknumber listed in the 3rd (4th) position in Menu_CAT_Object_PrimLinks
  1497.                 SELECTED_item = message;
  1498.                 SELECTED_face = (integer)llList2String(Menu_CAT_Action_Faces,3); // Apply to this face the facenumber listed in the 3rd (4th) position in Menu_CAT_Action_Faces
  1499.                 //                DO_Texture(SELECTED_link,SELECTED_item,SELECTED_face);
  1500. //                DO_Texture();
  1501. //DEBUG//llSay(0,"You chose: " + message);
  1502.               }
  1503.               // if the selected item is in the list of CAT5...
  1504. //              else if ((string)llListFindList(Menu_CAT5_List,[message]) != -1)
  1505.               else if(Menu_CAT_IDX == 5)
  1506.               {
  1507.                 //llSetLinkTexture(linknumber,message,face); // REPLACE THIS with 'apply texture to correct face on correct linknumber'
  1508. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  1509. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  1510. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  1511.                 SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,4); // Apply to this prim the linknumber listed in the 4th (5th) position in Menu_CAT_Object_PrimLinks
  1512.                 SELECTED_item = message;
  1513.                 SELECTED_face = (integer)llList2String(Menu_CAT_Action_Faces,4); // Apply to this face the facenumber listed in the 4th (5th) position in Menu_CAT_Action_Faces
  1514.                 //                DO_Texture(SELECTED_link,SELECTED_item,SELECTED_face);
  1515. //                DO_Texture();
  1516. //DEBUG//llSay(0,"You chose: " + message);
  1517.               }
  1518.               // if the selected item is in the list of CAT6...
  1519. //              else if ((string)llListFindList(Menu_CAT6_List,[message]) != -1)
  1520.               else if(Menu_CAT_IDX == 6)
  1521.               {
  1522.                 //llSetLinkTexture(linknumber,message,face); // REPLACE THIS with 'apply texture to correct face on correct linknumber'
  1523. // SELECTED_link; // TEMP variable to reference 'any'/'whatever' currently-selected link number
  1524. // SELECTED_item; // TEMP variable to reference 'any'/'whatever' currently-selected item
  1525. // SELECTED_face; // TEMP variable to reference 'any'/'whatever' currently-selected prim face
  1526.                 SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,5); // Apply to this prim the linknumber listed in the 5th (6th) position in Menu_CAT_Object_PrimLinks
  1527.                 SELECTED_item = message;
  1528.                 SELECTED_face = (integer)llList2String(Menu_CAT_Action_Faces,5); // Apply to this face the facenumber listed in the 5th (6th) position in Menu_CAT_Action_Faces
  1529.                 //                DO_Texture(SELECTED_link,SELECTED_item,SELECTED_face);
  1530. //                DO_Texture();
  1531. //DEBUG//llSay(0,"You chose: " + message);
  1532.               }
  1533.  
  1534. //llOwnerSay("\n");
  1535. //llOwnerSay("xDELx +++ INSERT HERE: if action=texture, then DO_Texture - if action=rezz, then DO_Rezz, etc");
  1536.               if(llList2String(Menu_CAT_Action_Types,(Menu_CAT_IDX -1)) == "TEXTURE")
  1537.               { DO_Texture(); }
  1538.               if(llList2String(Menu_CAT_Action_Types,(Menu_CAT_IDX -1)) == "REZZ")
  1539.               { DO_Rezz(); }
  1540.  
  1541. llOwnerSay("xthis is after DO_Texture & Do_Rezz");
  1542.  
  1543.               Menu_Capt = Menu_SUB_Capt + "\n\nNow setting: " + llList2String(Menu_CAT_Button_Labels,(Menu_CAT_IDX -1)) + ": " + message;
  1544.               Menu_Butt = Menu_00b + Menu_CAT_SUB_Set;
  1545.             }
  1546. //--------------
  1547.             // if the message is in the list Menu_CAT_Button_Labels
  1548.             else if ((string)llListFindList(Menu_CAT_Button_Labels,[message]))
  1549.             {
  1550. //DEBUG//llOwnerSay("> CAT:");
  1551. //DEBUG//llOwnerSay("(1) Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1552.               Menu_CAT_SUB_Set = [];
  1553.               Menu_SUB_Capt = " Menu - Select an Item: ";
  1554.               Item_IDX = 0; // set the Index pointer back to 0
  1555.  
  1556.               // get it's position in the list Menu_CAT_Button_Labels... and assign the Menu_CAT_SUB_List = to the appropriate CAT list
  1557.               if (message == llList2String(Menu_CAT_Button_Labels,0)) // if the message is at index 0(aka CAT1)
  1558.               {
  1559. //DEBUG//llOwnerSay("You chose: " + message + " - CAT = " + llList2String(Menu_CAT_Object_Names_Prefix,0));
  1560.                 Menu_SUB_ID  = 1;
  1561.                 Menu_CAT_IDX = 1;
  1562.                 Menu_SUB_Capt = ("\n" + llList2String(Menu_CAT_Button_Labels,0) + Menu_SUB_Capt);
  1563.                 Menu_CAT_SUB_TEMP  = Menu_CAT1_List;
  1564.                 Menu_CAT_SUB_Total = Menu_CAT1_Total;
  1565.               }
  1566.               else if (message == llList2String(Menu_CAT_Button_Labels,1)) // if the message is at index 1(aka CAT2)
  1567.               {
  1568. //DEBUG//llOwnerSay("You chose: " + message + " - CAT = " + llList2String(Menu_CAT_Object_Names_Prefix,1));
  1569.                 Menu_SUB_ID  = 2;
  1570.                 Menu_CAT_IDX = 2;
  1571.                 Menu_SUB_Capt = ("\n" + llList2String(Menu_CAT_Button_Labels,1) + Menu_SUB_Capt);
  1572.                 Menu_CAT_SUB_TEMP  = Menu_CAT2_List;
  1573.                 Menu_CAT_SUB_Total = Menu_CAT2_Total;
  1574.               }
  1575.               else if (message == llList2String(Menu_CAT_Button_Labels,2)) // if the message is at index 2(aka CAT3)
  1576.               {
  1577. //DEBUG//llOwnerSay("You chose: " + message + " - CAT = " + llList2String(Menu_CAT_Object_Names_Prefix,2));
  1578.                 Menu_SUB_ID  = 3;
  1579.                 Menu_CAT_IDX = 3;
  1580.                 Menu_SUB_Capt = ("\n" + llList2String(Menu_CAT_Button_Labels,2) + Menu_SUB_Capt);
  1581.                 Menu_CAT_SUB_TEMP  = Menu_CAT3_List;
  1582.                 Menu_CAT_SUB_Total = Menu_CAT3_Total;
  1583.               }
  1584.               else if (message == llList2String(Menu_CAT_Button_Labels,3)) // if the message is at index 3(aka CAT4)
  1585.               {
  1586. //DEBUG//llOwnerSay("You chose: " + message + " - CAT = " + llList2String(Menu_CAT_Object_Names_Prefix,3));
  1587.                 Menu_SUB_ID  = 4;
  1588.                 Menu_CAT_IDX = 4;
  1589.                 Menu_SUB_Capt = ("\n" + llList2String(Menu_CAT_Button_Labels,3) + Menu_SUB_Capt);
  1590.                 Menu_CAT_SUB_TEMP  = Menu_CAT4_List;
  1591.                 Menu_CAT_SUB_Total = Menu_CAT4_Total;
  1592.               }
  1593.               else if (message == llList2String(Menu_CAT_Button_Labels,4)) // if the message is at index 4(aka CAT5)
  1594.               {
  1595. //DEBUG//llOwnerSay("You chose: " + message + " - CAT = " + llList2String(Menu_CAT_Object_Names_Prefix,4));
  1596.                 Menu_SUB_ID  = 5;
  1597.                 Menu_CAT_IDX = 5;
  1598.                 Menu_SUB_Capt = ("\n" + llList2String(Menu_CAT_Button_Labels,4) + Menu_SUB_Capt);
  1599.                 Menu_CAT_SUB_TEMP  = Menu_CAT5_List;
  1600.                 Menu_CAT_SUB_Total = Menu_CAT5_Total;
  1601.               }
  1602.               else if (message == llList2String(Menu_CAT_Button_Labels,5)) // if the message is at index 5(aka CAT6)
  1603.               {
  1604. //DEBUG//llOwnerSay("You chose: " + message + " - CAT = " + llList2String(Menu_CAT_Object_Names_Prefix,5));
  1605.                 Menu_SUB_ID  = 6;
  1606.                 Menu_CAT_IDX = 6;
  1607.                 Menu_SUB_Capt = ("\n" + llList2String(Menu_CAT_Button_Labels,5) + Menu_SUB_Capt);
  1608.                 Menu_CAT_SUB_TEMP  = Menu_CAT6_List;
  1609.                 Menu_CAT_SUB_Total = Menu_CAT6_Total;
  1610.               }
  1611.  
  1612. //              if(llListFindList(Menu_CAT_Action_Types,["SHOW-HIDE"]) == (Menu_CAT_IDX-1))
  1613.               if(llList2String(Menu_CAT_Action_Types,(Menu_CAT_IDX -1)) == "SHOW-HIDE")
  1614.               {
  1615. llOwnerSay("xSHOW-HIDE is set...");
  1616. //llOwnerSay((string)llList2String(Menu_CAT_Action_Types,(Menu_CAT_IDX -1)));
  1617.                SELECTED_link = (integer)llList2String(Menu_CAT_Object_PrimLinks,(Menu_CAT_IDX-1)); // Apply to this prim the linknumber listed in the Menu_CAT_IDX position in Menu_CAT_Object_PrimLinks
  1618.                DO_ShowHide();
  1619. llOwnerSay("xreturning from SHOW-HIDE");
  1620. llOwnerSay("xmessage = " + message);
  1621.               }
  1622.  
  1623. llOwnerSay("xcontinuing to GET_Menu_CAT_SUB_Set");
  1624.               GET_Menu_CAT_SUB_Set(); // returns Menu_CAT_SUB_Set (set of 6, and if >9 with Menu_SUB_NAV)
  1625. llOwnerSay("xreturning from GET_Menu_CAT_SUB_Set");
  1626. //DEBUG//llOwnerSay("..back at CAT:");
  1627. //DEBUG//llOwnerSay("(2) Item_Counter=" + (string)Item_Counter + " - Item_IDX=" + (string)Item_IDX);
  1628. //DEBUG//llOwnerSay("Menu_CAT_SUB_Set:");
  1629. //DEBUG//llOwnerSay((string)Menu_CAT_SUB_Set);
  1630.               Menu_Capt = Menu_SUB_Capt;
  1631.               Menu_Butt = Menu_00b + Menu_CAT_SUB_Set;
  1632.             }
  1633. //------------------------------------------
  1634.  
  1635.           // otherwise, do the Main Menu llDialog here
  1636. llOwnerSay("xMain Menu 2");
  1637. llOwnerSay((string)Obj_Toucher_Key);
  1638. //DEBUG//llSay(0,"menu buttons (Menu_Butt): " + (string)Menu_Butt);
  1639. //DEBUG//llSay(0,"\n");
  1640. //            llDialog(id, Menu_Capt, Menu_Butt, Menu_Chan); // WORKED
  1641.             llDialog(Obj_Toucher_Key, Menu_Capt, Menu_Butt, Menu_Chan);
  1642. llOwnerSay("xMain Menu 2-after the llDialog");
  1643. //            llListen(Menu_Chan,"",NULL_KEY,"");
  1644. llOwnerSay("xMain Menu 2-temp-added another listen which didn't help");
  1645. //            llDialog(Obj_Toucher_Key, Menu_Capt, Menu_Butt, Menu_Chan);
  1646. //          llDialog(llDetectedKey(0), Menu_Capt, Menu_Butt, Menu_Chan);
  1647. //--  --  --  --  --  --  --  --  --  --  --
  1648.           }//else everything else
  1649. //--  --  --  --  --  --  --  --  --  --  -- <---%%%%%%% from here up
  1650.         }//if not 'Close Menu'...
  1651. //--  --  --  --  --  --  --  --  --  --  --
  1652.  
  1653. //------------------------------------------
  1654.         else
  1655.         {
  1656. llOwnerSay("xTEMP-DISabled the close listen handler");
  1657. //          remove_listens();
  1658. //DEBUG//llSay(0,"'Close Menu' button - close listens & handlers");
  1659.         }
  1660.  
  1661.       }//if Authorized to use the menu... [if not, then:]
  1662.  
  1663.       else
  1664.       {
  1665.         Menu_SUB_ID = 0;
  1666.         Menu_Capt = Menu_ADM_AUTH_ERR_Capt1 + llList2String(Menu_00_MenuName_List,0) + Menu_ADM_AUTH_ERR_Capt2;
  1667.         Menu_Butt = Menu_00a + Menu_00_NAV + Menu_CAT_Button_Labels_456123;
  1668.       }
  1669.  
  1670. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1671. //------------------------------------------
  1672. //------------------------------------------
  1673.     } // listen end
  1674. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1675. }
  1676. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1677. // state Menu_State state ~ END
  1678. //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Advertisement
RAW Paste Data Copied
Advertisement