Jump to content

JJValero Writer

Resident
  • Posts

    61
  • Joined

  • Last visited

Everything posted by JJValero Writer

  1. I never was able to upload mesh on Beta Grid. I changed my password, but it did not help.
  2. As far as I've seen, usually when servers have been restarted no many problems crossing regions. Generally, when a region has LAG is when problems arise. I crossed with a flying vehicle several simcrossings at high speeds and i haved no problems. Other times i crashed at low speed. And never, never, never try to cross with a vehicle to a region that has been grieffed. There are simcrossings that almost never have problems, and other simcrossings that very often are a problem. One way to recognize these evil-simcrossings is they usually have a collection of automatic cars floating in the air in the edge of the region. To test simcrossings, it is best to go to the beginning of a road and travel by car to the end.
  3. There are a defective script counter that count incorrectly. You or anyone can be banned having only 3 scripts.
  4. I disagree. SL regions made a rollback always they crash or they reboot. I am a owner of a sandbox and many avatars lost items or work here. Sometimes I had to do the same job twice.
  5. Platonic Generator is a tool to tessellatethe five platonic objects; Tetrahedron, Hexahedron, Octahedron, Icosahedron and Dodecahedron. This is a new version able of create bigger structures due the new limit of 64 m and other minor changes. The first step is to create two primitives and link in one object and drop inside this script.// This script create the object "Platonic Generator 0.4.7" and autodelete. // Put this in the inventory of a linset with 2 prims. default { state_entry() { if (llGetNumberOfPrims() != 2) { llOwnerSay("ERROR: The linkset must be of 2 prims"); return; } // if llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_NAME, "Platonic Generator 0.4.7", PRIM_TYPE, PRIM_TYPE_SCULPT, "71eeddee-a441-eace-6b2d-e3180dbb082a", PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <0.9, 0.9, 0.9>, PRIM_MATERIAL, PRIM_MATERIAL_METAL, PRIM_TEXTURE, ALL_SIDES, TEXTURE_BLANK, <1.0, 1.0, 0.0>, ZERO_VECTOR, PI_BY_TWO, PRIM_COLOR, ALL_SIDES, <0.6, 0.6, 0.6>, 1.0, PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_MEDIUM, PRIM_BUMP_NONE ]); llSetLinkPrimitiveParamsFast( LINK_ALL_CHILDREN, [ PRIM_TYPE, PRIM_TYPE_SPHERE, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, ZERO_VECTOR, <0.0, 1.0, 0.0>, PRIM_SIZE, <1.1, 1.1, 1.1>, PRIM_POS_LOCAL, ZERO_VECTOR, PRIM_ROT_LOCAL, llEuler2Rot(<0.0, 90.0, 0.0> * DEG_TO_RAD), PRIM_MATERIAL, PRIM_MATERIAL_GLASS, PRIM_TEXTURE, ALL_SIDES, "990d1249-0b61-13bc-9a0c-cbad5f120aed", <1.0, 1.0, 0.0>, ZERO_VECTOR, -PI_BY_TWO, PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.6, PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_GLOW, ALL_SIDES, 0.05]); llSetLinkTextureAnim(LINK_ALL_CHILDREN, ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1, 0.02); llRemoveInventory(llGetScriptName()); } // state_entry changed(integer change) { if ((change & CHANGED_LINK) == CHANGED_LINK) { llResetScript(); } // if } // changed } // default Now you have a nice object but useless. Second step. Now, create other object and drop this other script inside.string MSG_DELETE = "delete"; string MSG_PURGE = "purge"; string MSG_OK = "OK"; string MSG_NEXT = "NEXT"; string MSG_NODE_SIZE = "node_size"; string MSG_EDGE_THICKNESS = "edge_thickness"; string MSG_TRIANGLE_THICK = "triangle_thickness"; vector AXIS_UP = <0,0,1>; // Constants for piece types. string PRIM_TYPE_NODE = "NODE"; string PRIM_TYPE_EDGE = "EDGE"; string PRIM_TYPE_TRIANGLE = "TRIANGLE"; string PRIM_TYPE_RECTANGLE = "RECTANGLE"; string TRIANGLE_TEXTURE = "1f93926c-966d-9cb3-126c-1341b71a457d"; string CLEAR_TEXTURE = "f54a0c32-3cd1-d49a-5b4f-7b792bebc204"; float TIMEOUT = 3.0; integer g_iListenDesc; integer g_iChannel; string g_sPieceType; key g_kRezzerKey; // // Protocol Anti-Fail // // 1 Rezzer -------------- rez ---------------> Object // 2 Rezzer <---------- whisper "OK" ---------- Object // 3 Rezzer ------- whisper parameters -------> Object // 4 Rezzer <-------- shout "NEXT" ----------- Object // // If object no receive parameters in TIMEOUT seconds, say again "OK" // If object no receive NEXT in TIMEOUT seconds, check object position, // it is in the same position, whisper again parameters, else, rez the // next object. executeMessage(string message) { vector start_pos = llGetPos(); list lTok = llParseString2List(message, ["|"], []); g_sPieceType = llList2String(lTok, 0); if (g_sPieceType == PRIM_TYPE_NODE) { vector target_pos = (vector) llList2String(lTok, 1); float fSize = (float) llList2String(lTok, 2); integer iNumNode = (integer) llList2String(lTok, 3); llSetRegionPos(target_pos); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_POSITION, target_pos, PRIM_SIZE, <fSize, fSize, fSize>, PRIM_TYPE, PRIM_TYPE_SPHERE, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, ZERO_VECTOR, <0.0, 1.0, 0.0>, PRIM_NAME, g_sPieceType ]); if (iNumNode >= 0) { llSetText((string) iNumNode, <1.0, 1.0, 1.0>, 1.0); } // if } else if (g_sPieceType == PRIM_TYPE_EDGE) { vector v1 = (vector) llList2String(lTok, 1); vector v2 = (vector) llList2String(lTok, 2); float thickness = (float) llList2String(lTok, 3); vector target_pos = (v2 + v1) / 2; llSetRegionPos(target_pos); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_POSITION, target_pos, PRIM_ROTATION, llGetRot() * llRotBetween(AXIS_UP * llGetRot(), v2 - v1), PRIM_SIZE, <thickness, thickness, llVecDist(v2, v1)>, PRIM_TYPE, PRIM_TYPE_CYLINDER, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, ZERO_VECTOR, <1.0, 1.0, 0.0>, ZERO_VECTOR, PRIM_NAME, g_sPieceType ]); } else if (g_sPieceType == PRIM_TYPE_TRIANGLE) { vector scale = (vector) llList2String(lTok, 1); float y_shear = (float) llList2String(lTok, 2); vector target_pos = (vector) llList2String(lTok, 3); rotation rRot = (rotation) llList2String(lTok, 4); llSetRegionPos(target_pos); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_POSITION, target_pos, PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 0.0, 0.0>, <0.0, y_shear, 0.0>, PRIM_SIZE, scale, PRIM_ROTATION, rRot, PRIM_NAME, g_sPieceType, PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.5, PRIM_TEXTURE, 0, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 1, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 2, TRIANGLE_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 3, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 4, TRIANGLE_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 5, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0 ]); } else if (g_sPieceType == PRIM_TYPE_RECTANGLE) { vector scale = (vector) llList2String(lTok, 1); float y_tape = 1.0 - (float) llList2String(lTok, 2); float y_shear = (float) llList2String(lTok, 3); vector target_pos = (vector) llList2String(lTok, 4); rotation rRot = (rotation) llList2String(lTok, 5); llSetRegionPos(target_pos); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_POSITION, target_pos, PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, y_tape, 0.0>, <0.0, y_shear, 0.0>, PRIM_SIZE, scale, PRIM_ROTATION, rRot, PRIM_NAME, g_sPieceType, PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.5, PRIM_TEXTURE, 0, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 1, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 2, TRIANGLE_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 3, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 4, TRIANGLE_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0, PRIM_TEXTURE, 5, CLEAR_TEXTURE, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0 ]); } // if } // executeMessage default { state_entry() { llSetText("", ZERO_VECTOR, 0.0); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, <0.0, 1.0, 0.0>, 0.0, ZERO_VECTOR, <1.0, 1.0, 0.0>, ZERO_VECTOR, PRIM_SIZE, <0.5, 0.5, 0.5>, PRIM_ROTATION, ZERO_ROTATION, PRIM_NAME, "Object", PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 1.0, PRIM_TEXTURE, ALL_SIDES, TEXTURE_BLANK, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0 ]); } // state_entry state_exit() { llSetTimerEvent(0.0); llListenRemove(g_iListenDesc); } // state_exit on_rez(integer start_param) { g_iChannel = start_param; g_iListenDesc = llListen(g_iChannel, "", NULL_KEY, ""); if (g_iChannel != 0) { llSetTimerEvent(TIMEOUT); llWhisper(g_iChannel, MSG_OK); } // if } // on_rez listen(integer channel, string name, key id, string message) { if (llGetOwnerKey(id) != llGetOwner()) { return; } // if if ((id == llGetKey()) || (channel == 0)) { return; } // if llSetTimerEvent(0.0); g_kRezzerKey = id; llWhisper(channel, MSG_NEXT); executeMessage(message); state InPos; } // listen timer() { llWhisper(g_iChannel, MSG_OK); } // timer } // default state InPos { state_entry() { llListen(g_iChannel, "", g_kRezzerKey, ""); } // state_entry listen(integer channel, string name, key id, string message) { if (llGetOwnerKey(id) != llGetOwner()) { return; } // if if ((id == llGetKey()) || (channel == 0)) { return; } // if list lTok = llParseString2List(message, ["|"], []); string sMsg = llList2String(lTok, 0); if (sMsg == MSG_DELETE) { llDie(); } else if (sMsg == MSG_PURGE) { llRemoveInventory(llGetScriptName()); } else if ((sMsg == MSG_NODE_SIZE) && (g_sPieceType == PRIM_TYPE_NODE)) { float fSize = (float) llList2String(lTok, 1); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_SIZE, <fSize, fSize, fSize>]); } else if ((sMsg == MSG_EDGE_THICKNESS) && (g_sPieceType == PRIM_TYPE_EDGE)) { vector vSize = llGetScale(); float fSize = (float) llList2String(lTok, 1); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_SIZE, <fSize, fSize, vSize.z>]); } else if ((sMsg == MSG_TRIANGLE_THICK) && (g_sPieceType == PRIM_TYPE_TRIANGLE)) { vector vSize = llGetScale(); float fSize = (float) llList2String(lTok, 1); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_SIZE, <fSize, vSize.y, vSize.z>]); } else if ((sMsg == MSG_TRIANGLE_THICK) && (g_sPieceType == PRIM_TYPE_RECTANGLE)) { vector vSize = llGetScale(); float fSize = (float) llList2String(lTok, 1); llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_SIZE, <fSize, vSize.y, vSize.z>]); } // if } // listen } // InPosNow you have an object with name "Object". Please, do not change the name. Third step. Take the object with name "Object" and put in the inventory of the first object with name "Platonic Generator 0.4.7". Fourth step. Drop in the Platonic Generator this script://_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ //_/_/ _/_/ //_/_/ PLATONIC GENERATOR _/_/ //_/_/ By: JJValero Writer _/_/ //_/_/ _/_/ //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ //_/_/ //_/_/ CONSTANTS float GOLDEN = 1.618; // NO CHANGE THIS VALUE. http://www.mathopenref.com/rectanglegolden.html float EDGE_SIDE = 3.0; // Default length of edge. (min = 1, max = 10) float MAX_EDGE_SIDE = 35.0; float MIN_EDGE_SIDE = 1.0; float EDGE_THICKNESS = 0.3; // default thickness of edge 0 = OFF float MAX_EDGE_THICK = 3.0; float MIN_EDGE_THICK = 0.0; float NODE_SIZE = 0.4; // default size of node. float MAX_NODE_SIZE = 3.0; float MIN_NODE_SIZE = 0.0; float TRIANGLE_THICKNESS = 0.03; // default thickness of triangle 0 = OFF float MAX_TRIANGLE_THICK = 1.0; float MIN_TRIANGLE_THICK = 0.0; string OBJECT_TO_REZ = "Object"; integer CHANNEL = -884726; // channel for comunicate position to edges. integer USER_CHANNEL = 5; // user channel. integer DEVELOP_MODE = FALSE; // If TRUE, spheres shows the node number in floating text. //----------------------------------- // Structures supported. string STRUCT_TETRAHEDRON = "Tetrahedron"; string STRUCT_HEXAHEDRON = "Hexahedron"; string STRUCT_OCTAHEDRON = "Octahedron"; string STRUCT_ICOSAHEDRON = "Icosahedron"; string STRUCT_DODECAHEDRON = "Dodecahedron"; string TETRAHEDRON_SCULPT = "1646063c-baf9-fb2e-fc2b-c74b992f178e"; string HEXAHEDRON_SCULPT = "3496f3c6-3b09-c052-fe00-59235dc57ddf"; string OCTAHEDRON_SCULPT = "5cce4c13-ba04-deba-aa93-e7b197e35670"; string ICOSAHEDRON_SCULPT = "71eeddee-a441-eace-6b2d-e3180dbb082a"; string DODECAHEDRON_SCULPT = "8bbe9747-8d89-a339-671d-09df4f664065"; // If you change one of those constants, check scripts of node and edge objects. // ............................................................................... // chat commands string MSG_DELETE = "delete"; string MSG_PURGE = "purge"; string MSG_REZ = "rez"; string MSG_HELP = "help"; string MSG_MENU = "menu"; string MSG_OK = "OK"; // The object says OK when it is rezzed. string MSG_NEXT = "NEXT"; // The object says NEXT when received parameters. string MSG_NODE_SIZE = "node_size"; // Says to nodes their new size. string MSG_EDGE_THICKNESS = "edge_thickness"; // Says to edges their new thickness. string MSG_TRIANGLE_THICK = "triangle_thickness"; // Says to triangles their new thickness. // ............................................................................... string PRIM_TYPE_NODE = "NODE"; string PRIM_TYPE_EDGE = "EDGE"; string PRIM_TYPE_TRIANGLE = "TRIANGLE"; string PRIM_TYPE_RECTANGLE = "RECTANGLE"; // ............................................................................... // Main Menu options string OPC_DELETE = "Delete"; string OPC_PURGE = "Purge"; string OPC_REZ = "Rez"; string OPC_STRUCT = "Struct"; string OPC_SIZE = "Size"; string OPC_EDGE_THICK = "Edge Thick"; string OPC_NODE_SIZE = "Node Size"; string OPC_TRIANGLE_THICK = "Tr. Thick"; string OPC_RETURN = "Return"; string OPC_DONE = "Done"; string OPC_VERBOSE = "Verbose"; string OPC_QUIET = "Quiet"; // Size options string OPC_SIZEP1 = "+1"; string OPC_SIZEL1 = "-1"; string OPC_SIZEP05 = "+0.5"; string OPC_SIZEL05 = "-0.5"; string OPC_SIZEP01 = "+0.1"; string OPC_SIZEL01 = "-0.1"; string OPC_SIZEP005 = "+0.05"; string OPC_SIZEL005 = "-0.05"; string OPC_SIZEP001 = "+0.01"; string OPC_SIZEL001 = "-0.01"; string OPC_MAX = "Max"; string OPC_MIN = "Min"; string OPC_OFF = "Off"; // Triangle Stuff //float DELTA = 0.01; // Minimal distance between 2 vertices. float TIMEOUT = 6.0; //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ //_/_/ //_/_/ GLOBALS list g_lRelPos; // Position of all nodes list g_lConnectList; // pair of node numbers, every pair is one edge. list g_lTriangleList; // List os triangle nodes list g_lRectangleList; // List of rectangles integer g_iListenDesc; // listen descriptor of user channel. integer g_iUserListenDesc; // listen descriptor of build channel. integer g_iCounter; integer g_iMax; vector g_vSavedPos; integer g_bVerbose; string g_sActualMenu; string g_sActualStruct; // structure to rez float g_fEdgeLength; // Length of the edge. (Max is 10 m) float g_fEdgeThick; // Thickness of edge. float g_fNodeSize; // Size of the node. float g_fTriangleDepth; // thickness of triangles rezzed string g_sObjectParams; // Parameters to send to object. //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ //_/_/ //_/_/ FUNCTIONS // List of coordinates taken from http://en.wikipedia.org/wiki/Icosahedron list getNodeList(float fSize) { float A = fSize / 2; float B = (fSize * GOLDEN) / 2; float C = (fSize * (1.0 / GOLDEN)) / 2; list lRelPos = []; if (g_sActualStruct == STRUCT_ICOSAHEDRON) { lRelPos = [ <0, A, B>, <0, A, -B>, <0, -A, B>, <0, -A, -B>, <A, B, 0>, <A, -B, 0>, <-A, B, 0>, <-A, -B, 0>, <B, 0, A>, <-B, 0, A>, <B, 0, -A>, <-B, 0, -A> ]; } else if (g_sActualStruct == STRUCT_DODECAHEDRON) { lRelPos = [ <-A, -A, -A>, <-A, -A, A>, <-A, A, -A>, <-A, A, A>, < A, -A, -A>, < A, -A, A>, < A, A, -A>, < A, A, A>, < 0, C, B>, < 0, C, -B>, < 0, -C, B>, < 0, -C, -B>, < C, B, 0>, < C, -B, 0>, <-C, B, 0>, <-C, -B, 0>, < B, 0, C>, < B, 0, -C>, <-B, 0, C>, <-B, 0, -C> ]; } else if (g_sActualStruct == STRUCT_TETRAHEDRON) { lRelPos = [<A, A, A>, <-A, -A, A>, <-A, A, -A>, <A, -A, -A>]; } else if (g_sActualStruct == STRUCT_HEXAHEDRON) { lRelPos = [ <A, A, A>, <A, A, -A>, <A, -A, A>, <A, -A, -A>, <-A, A, A>, <-A, A, -A>, <-A, -A, A>, <-A, -A, -A> ]; } else if (g_sActualStruct == STRUCT_OCTAHEDRON) { lRelPos = [<A, 0, 0>, <-A, 0, 0>, <0, A, 0>, <0, -A, 0>, <0, 0, A>, <0, 0, -A>]; } // if return lRelPos; } // getNodeList //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ list getConnectList() { list lConnectList = []; if (g_sActualStruct == STRUCT_ICOSAHEDRON) { lConnectList = [ 0, 2, 0, 9, 0, 6, 0, 4, 0, 8, 1, 6, 1, 11, 1, 3, 1, 10, 1, 4, 6, 4, 6, 9, 6, 11, 4, 8, 4, 10, 10, 3, 3, 11, 11, 9, 9, 2, 2, 8, 8, 10, 5, 3, 5, 10, 5, 8, 5, 2, 5, 7, 7, 2, 7, 9, 7, 11, 7, 3 ]; } else if (g_sActualStruct == STRUCT_DODECAHEDRON) { lConnectList = [ 0, 19, 0, 15, 0, 11, 2, 19, 2, 9, 2, 14, 9, 11, 9, 6, 19, 18, 18, 3, 3, 14, 6, 12, 12, 14, 6, 17, 17, 4, 4, 11, 4, 13, 13, 15, 18, 1, 1, 15, 13, 5, 5, 16, 16, 17, 1, 10, 10, 5, 10, 8, 8, 3, 8, 7, 7, 16, 7, 12 ]; } else if (g_sActualStruct == STRUCT_TETRAHEDRON) { lConnectList = [ 0, 1, 0, 2, 0, 3, 1, 2, 1, 3, 2, 3 ]; } else if (g_sActualStruct == STRUCT_HEXAHEDRON) { lConnectList = [ 0, 1, 1, 3, 3, 2, 2, 0, 4, 5, 5, 7, 7, 6, 6, 4, 0, 4, 2, 6, 1, 5, 3, 7 ]; } else if (g_sActualStruct == STRUCT_OCTAHEDRON) { lConnectList = [ 4, 0, 4, 1, 4, 2, 4, 3, 5, 0, 5, 1, 5, 2, 5, 3, 0, 2, 2, 1, 1, 3, 3, 0 ]; } // if return lConnectList; } // getConnectList //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ list getTriangleList() { list lConnectList = []; if (g_sActualStruct == STRUCT_ICOSAHEDRON) { lConnectList = [ 0, 4, 6, 0, 6, 9, 0, 8, 4, 0, 8, 2, 0, 2, 9, 3, 7, 5, 3, 5, 10, 3, 10, 1, 3, 1, 11, 3, 11, 7, 1, 6, 11, 6, 11, 9, 11, 9, 7, 9, 7, 2, 7, 2, 5, 2, 5, 8, 5, 8, 10, 8, 10, 4, 10, 4, 1, 4, 1, 6 ]; } else if (g_sActualStruct == STRUCT_DODECAHEDRON) { lConnectList = [ 17, 4, 6, 19, 0, 2, 9, 6, 2, 11, 0, 4, 4, 13, 17, 6, 17, 12, 0, 19, 15, 14, 2, 19, 18, 1, 3, 8, 10, 7, 10, 1, 5, 8, 7, 3 ]; } else if (g_sActualStruct == STRUCT_TETRAHEDRON) { lConnectList = [ 0, 1, 2, 0, 2, 3, 0, 1, 3, 1, 3, 2 ]; } else if (g_sActualStruct == STRUCT_OCTAHEDRON) { lConnectList = [ 4, 0, 2, 4, 2, 1, 4, 1, 3, 4, 3, 0, 5, 0, 2, 5, 2, 1, 5, 1, 3, 5, 3, 0 ]; } // if return lConnectList; } // getTriangleList //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ list getRectangleList() { list lConnectList = []; if (g_sActualStruct == STRUCT_DODECAHEDRON) { lConnectList = [ 4, 6, 11, 9, 2, 0, 9, 11, 6, 2, 12, 14, 0, 4, 15, 13, 14, 19, 3, 18, 19, 15, 18, 1, 13, 17, 5, 16, 17, 12, 16, 7, 7, 3, 12, 14, 1, 5, 15, 13, 10, 7, 5, 16, 3, 1, 8, 10 ]; } else if (g_sActualStruct == STRUCT_HEXAHEDRON) { lConnectList = [ 1, 3, 0, 2, 3, 7, 2, 6, 7, 5, 6, 4, 5, 1, 4, 0, 5, 1, 7, 3, 4, 0, 6, 2 ]; } // if return lConnectList; } // getRectangleList //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ string decimalTrunc(float fIn) { float fIn = (float)((string) fIn); integer iIn = (integer) (fIn * 100); integer iIntPart = iIn / 100; integer iDecimal = iIn % 100; string sDecimal; if (iDecimal < 10) { sDecimal = "0" + (string) iDecimal; } else { sDecimal = (string) iDecimal; } // if string sOut = (string) iIntPart + "." + sDecimal; if (sOut == "0.00") { sOut = "Off"; } // if return sOut; } // decimalTrunc //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ showConfig() { string sMsg = "Selected: " + g_sActualStruct + "\n"; sMsg += "Size: " + decimalTrunc(g_fEdgeLength) + "\n"; sMsg += "Edge thickness: " + decimalTrunc(g_fEdgeThick) + "\n"; sMsg += "Node Size: " + decimalTrunc(g_fNodeSize) + "\n"; sMsg += "Triangle thickness: " + decimalTrunc(g_fTriangleDepth) + "\n"; llSetText(sMsg, <1.0, 1.0, 1.0>, 1.0); } // showConfig //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ // safe_posJum, do not work in various regions. // Changed by a combination of llSetRegionPos and llSetLinkPrimitiveParamsFast. safe_posJump(vector target_pos) { llSetRegionPos(target_pos); llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_POSITION, target_pos]); } // safe_posJump //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ showHelp() { string sChan = "\t/" + (string) USER_CHANNEL + " "; string sMsg = "\n"; sMsg += sChan + MSG_HELP + "\tshows this message.\n"; sMsg += sChan + MSG_REZ + "\tfor rez " + g_sActualStruct + ".\n"; sMsg += sChan + MSG_DELETE + "\tfor delete " + g_sActualStruct + ".\n"; sMsg += sChan + MSG_PURGE + "\tfor remove scripts.\n"; sMsg += sChan + MSG_MENU + "\tshows main menu."; llOwnerSay(sMsg); } // showHelp //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ mainMenu(key kUser) { list lOptions = [ OPC_DONE, "." ]; if (g_bVerbose) { lOptions += [ OPC_QUIET ]; } else { lOptions += [ OPC_VERBOSE ]; } // if lOptions += [ OPC_DELETE, OPC_PURGE, OPC_REZ, OPC_EDGE_THICK, OPC_NODE_SIZE, OPC_TRIANGLE_THICK, OPC_STRUCT, OPC_SIZE, "." ]; g_sActualMenu = ""; string sMsg = "Options\n"; sMsg += " " + OPC_DONE + ":\t Close this dialog box.\n"; if (g_bVerbose) { sMsg += " " + OPC_QUIET + ":\t Quiet mode.\n"; } else { sMsg += " " + OPC_VERBOSE + ": Verbose mode.\n"; } // if sMsg += " " + OPC_DELETE + ":\tDelete the structure.\n"; sMsg += " " + OPC_PURGE + ":\t Remove scripts from objects.\n"; sMsg += " " + OPC_REZ + ":\t\t Rez the structure.\n"; sMsg += " " + OPC_STRUCT + ":\tSelect structure.\n"; sMsg += " " + OPC_SIZE + ":\t\tChanges size.\n"; sMsg += " " + OPC_EDGE_THICK + ":\tChanges thickness of edge.\n"; sMsg += " " + OPC_NODE_SIZE + ":\tChanges node size.\n"; sMsg += " " + OPC_TRIANGLE_THICK + ":\tChanges thickness of triangle.\n"; llDialog(kUser,sMsg, lOptions, USER_CHANNEL); } // mainMenu //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ structMenu(key kUser) { list lOptions = [ OPC_RETURN, ".", OPC_DONE, STRUCT_ICOSAHEDRON, STRUCT_DODECAHEDRON, STRUCT_TETRAHEDRON, STRUCT_HEXAHEDRON, STRUCT_OCTAHEDRON ]; string sMsg = "Options\n"; sMsg += "Structure selected: " + g_sActualStruct + "\n\n"; sMsg += " Select one of the listed structures."; llDialog(kUser,sMsg, lOptions, USER_CHANNEL); } // structMenu //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ sizeMenu(key kUser) { g_sActualMenu = OPC_SIZE; list lOptions = [ OPC_RETURN, ".", OPC_DONE, OPC_SIZEL1, OPC_SIZEL05, OPC_SIZEL01, OPC_SIZEP1, OPC_SIZEP05, OPC_SIZEP01, OPC_MAX, OPC_MIN ]; string sMsg = "Options\n"; sMsg += "Actual size is : " + decimalTrunc(g_fEdgeLength) + "\n\n"; llDialog(kUser,sMsg, lOptions, USER_CHANNEL); } // sizeMenu //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ edgeMenu(key kUser) { g_sActualMenu = OPC_EDGE_THICK; list lOptions = [ OPC_RETURN, ".", OPC_DONE, OPC_SIZEL01, OPC_SIZEL005, OPC_SIZEL001, OPC_SIZEP01, OPC_SIZEP005, OPC_SIZEP001, OPC_MAX, OPC_MIN, OPC_OFF ]; string sMsg = "Options\n"; sMsg += "Actual edge thickness is : " + decimalTrunc(g_fEdgeThick) + "\n\n"; llDialog(kUser,sMsg, lOptions, USER_CHANNEL); } // edgeMenu //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ nodeMenu(key kUser) { g_sActualMenu = OPC_NODE_SIZE; list lOptions = [ OPC_RETURN, ".", OPC_DONE, OPC_SIZEL01, OPC_SIZEL005, OPC_SIZEL001, OPC_SIZEP01, OPC_SIZEP005, OPC_SIZEP001, OPC_MAX, OPC_MIN, OPC_OFF ]; string sMsg = "Options\n"; sMsg += "Actual node size is : " + decimalTrunc(g_fNodeSize) + "\n\n"; llDialog(kUser,sMsg, lOptions, USER_CHANNEL); } // nodeMenu //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ triangleMenu(key kUser) { g_sActualMenu = OPC_TRIANGLE_THICK; list lOptions = [ OPC_RETURN, ".", OPC_DONE, OPC_SIZEL01, OPC_SIZEL005, OPC_SIZEL001, OPC_SIZEP01, OPC_SIZEP005, OPC_SIZEP001, OPC_MAX, OPC_MIN, OPC_OFF ]; string sMsg = "Options\n"; sMsg += "Actual triangle thickness is : " + decimalTrunc(g_fTriangleDepth) + "\n\n"; llDialog(kUser,sMsg, lOptions, USER_CHANNEL); } // triangleMenu //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ rez_triangle(vector a, vector b, vector c) { vector origin = llGetPos(); a = origin + a; b = origin + b; c = origin + c; float fSideAB = llVecDist(a, b); float fSideBC = llVecDist(b, c); float fSideCA = llVecDist(c, a); if ((fSideAB >= fSideBC) && (fSideAB >= fSideCA)) { triangle(c, a, b); } else if ((fSideBC >= fSideAB) && (fSideBC >= fSideCA)) { triangle(a, b, c); } else if ((fSideCA >= fSideAB) && (fSideCA >= fSideBC)) { triangle(b, c, a); } // if } // rez_triangle triangle(vector a, vector b, vector c) { float width = llVecDist(b, c); vector left = llVecNorm(b - c); vector fwd = llVecNorm(left % (a - c)); vector up = fwd % left; float height = (a - c) * up; float fShear = 0.5 - ((b-a) * left) / width; vector vPos = 0.5 * ((b+c) + (height * up)); vector vScale = <g_fTriangleDepth, width, height>; rotation rRot = llAxes2Rot(fwd, left, up); g_sObjectParams = PRIM_TYPE_TRIANGLE + "|" + (string) vScale + "|" + (string) fShear + "|" + (string) vPos + "|" + (string) rRot; llRezObject(OBJECT_TO_REZ, llGetPos(), ZERO_VECTOR, ZERO_ROTATION, CHANNEL); } // triangle //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ // "rez_triangle()" and "triangle()" functions are based in a freebie of "seifer surface" rez_rectangle(vector a, vector b, vector c, vector d) { vector origin = llGetPos(); a = origin + a; b = origin + b; c = origin + c; d = origin + d; if (llVecDist(a, b) >= llVecDist(c, d)) { rectangle(a, b, c, d); } else { rectangle(c, d, a, b); } // if } // rez_rectangle rectangle(vector a, vector b, vector c, vector d) { float width = llVecDist(a, b); vector left = llVecNorm(a - b); vector fwd = llVecNorm(left % (a - c)); vector up = fwd % left; float height = (a - c) * up; float fShear = 0.0; vector vPos = (a + b + c+ d) / 4; //0.5 * ((b+c) + (height * up)); vector vScale = <g_fTriangleDepth, width, height>; rotation rRot = llAxes2Rot(fwd, left, up); float fTape = (llVecDist(c, d) / llVecDist(a, b)) - 1.0; //float fTape = -0.35; //1.0; g_sObjectParams = PRIM_TYPE_RECTANGLE + "|" + (string) vScale + "|" + (string) fTape + "|" + (string) fShear + "|" + (string) vPos + "|" + (string) rRot; llRezObject(OBJECT_TO_REZ, llGetPos(), ZERO_VECTOR, ZERO_ROTATION, CHANNEL); } // rectangle //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ rez_node(vector a) { vector vNodePos = llGetPos() + a; integer iNumNode = -1; if (DEVELOP_MODE) { iNumNode = g_iCounter; } // if g_sObjectParams = PRIM_TYPE_NODE + "|"+ (string) vNodePos + "|" + (string) g_fNodeSize + "|" + (string) iNumNode; llRezObject(OBJECT_TO_REZ, llGetPos(), ZERO_VECTOR, ZERO_ROTATION, CHANNEL); } // rez_node //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ rez_edge(vector a, vector b) { vector origin = llGetPos(); a = origin + a; b = origin + b; g_sObjectParams = PRIM_TYPE_EDGE + "|" + (string) a + "|" + (string) b + "|" + (string) g_fEdgeThick; llRezObject(OBJECT_TO_REZ, llGetPos(), ZERO_VECTOR, ZERO_ROTATION, CHANNEL); } // rez_edge //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ //_/_/ //_/_/ STATES default { state_entry() { // Default settings. g_sActualStruct = STRUCT_ICOSAHEDRON; g_fEdgeLength = EDGE_SIDE; g_fEdgeThick = EDGE_THICKNESS; g_fNodeSize = NODE_SIZE; g_fTriangleDepth = TRIANGLE_THICKNESS; g_bVerbose = FALSE; g_sActualMenu = ""; llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, ICOSAHEDRON_SCULPT, PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <0.9, 0.9, 0.9> ]); llSetLinkTextureAnim(LINK_ALL_CHILDREN, ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1, 0.02); llOwnerSay("Listening in channel " + (string) USER_CHANNEL + "\n"); llOwnerSay("Say /" + (string) USER_CHANNEL + " " + MSG_HELP + " for help or touch me to dialog menu."); state UserInterface; } // state_entry } // default state UserInterface { state_entry() { g_iUserListenDesc = llListen(USER_CHANNEL, "", NULL_KEY, ""); showConfig(); } // state_entry state_exit() { llListenRemove(g_iUserListenDesc); } // state_exit on_rez(integer start_param) { llResetScript(); } // on_rez touch_start(integer num_detected) { if (llDetectedKey(0) != llGetOwner()) { return; } // if mainMenu(llDetectedKey(0)); } // touch_start listen(integer channel, string name, key id, string message) { if (llGetOwnerKey(id) != llGetOwner()) { return; } // if string sMsg = llToLower(message); if ((sMsg == MSG_DELETE) || (sMsg == MSG_PURGE)) { llRegionSay(CHANNEL, sMsg); if (message != sMsg) { mainMenu(id); } // if } else if (sMsg == MSG_HELP) { showHelp(); } else if (sMsg == llToLower(OPC_VERBOSE)) { g_bVerbose = TRUE; llOwnerSay("Verbose mode activated."); mainMenu(id); } else if (sMsg == llToLower(OPC_QUIET)) { g_bVerbose = FALSE; mainMenu(id); } else if ((sMsg == MSG_MENU) || (sMsg == llToLower(OPC_RETURN))) { mainMenu(id); } else if (sMsg == llToLower(OPC_STRUCT)) { structMenu(id); } else if (sMsg == llToLower(OPC_SIZE)) { sizeMenu(id); } else if (sMsg == llToLower(OPC_EDGE_THICK)) { edgeMenu(id); } else if (sMsg == llToLower(OPC_NODE_SIZE)) { nodeMenu(id); } else if (sMsg == llToLower(OPC_TRIANGLE_THICK)) { triangleMenu(id); } else if (sMsg == llToLower(STRUCT_ICOSAHEDRON)) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, ICOSAHEDRON_SCULPT, PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <0.9, 0.9, 0.9> ]); g_sActualStruct = STRUCT_ICOSAHEDRON; if (g_bVerbose == TRUE) { llOwnerSay("Selected : " + g_sActualStruct); } // if showConfig(); mainMenu(id); } else if (sMsg == llToLower(STRUCT_DODECAHEDRON)) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, DODECAHEDRON_SCULPT, PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <0.9, 0.9, 0.9> ]); g_sActualStruct = STRUCT_DODECAHEDRON; if (g_bVerbose == TRUE) { llOwnerSay("Selected : " + g_sActualStruct); } // if showConfig(); mainMenu(id); } else if (sMsg == llToLower(STRUCT_TETRAHEDRON)) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, TETRAHEDRON_SCULPT, PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <0.8, 0.8, 0.8> ]); g_sActualStruct = STRUCT_TETRAHEDRON; if (g_bVerbose == TRUE) { llOwnerSay("Selected : " + g_sActualStruct); } // if showConfig(); mainMenu(id); } else if (sMsg == llToLower(STRUCT_HEXAHEDRON)) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, HEXAHEDRON_SCULPT, PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <0.6, 0.6, 0.6> ]); g_sActualStruct = STRUCT_HEXAHEDRON; if (g_bVerbose == TRUE) { llOwnerSay("Selected : " + g_sActualStruct); } // if showConfig(); mainMenu(id); } else if (sMsg == llToLower(STRUCT_OCTAHEDRON)) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_TYPE, PRIM_TYPE_SCULPT, OCTAHEDRON_SCULPT, PRIM_SCULPT_TYPE_PLANE, PRIM_SIZE, <1.0, 1.0, 1.0> ]); g_sActualStruct = STRUCT_OCTAHEDRON; if (g_bVerbose == TRUE) { llOwnerSay("Selected : " + g_sActualStruct); } // if showConfig(); mainMenu(id); } else if ((sMsg == OPC_SIZEP1) || (sMsg == OPC_SIZEL1) || (sMsg == OPC_SIZEP05) || (sMsg == OPC_SIZEL05) || (sMsg == OPC_SIZEP01) || (sMsg == OPC_SIZEL01) || (sMsg == OPC_SIZEL005) || (sMsg == OPC_SIZEL001) || (sMsg == OPC_SIZEP005) || (sMsg == OPC_SIZEP001) ) { float fIncr = (float) sMsg; float fNew = 0.0; if (g_sActualMenu == OPC_SIZE) { fNew = (float)((string)(g_fEdgeLength + fIncr)); if ((fNew <= MAX_EDGE_SIDE) && (fNew >= MIN_EDGE_SIDE)) { g_fEdgeLength = fNew; if (g_bVerbose == TRUE) { llOwnerSay("Size changed to: " + (string) g_fEdgeLength); } // if showConfig(); } // if sizeMenu(id); } else if (g_sActualMenu == OPC_EDGE_THICK) { fNew = (float)((string)(g_fEdgeThick + fIncr)); if ((fNew <= MAX_EDGE_THICK) && (fNew >= MIN_EDGE_THICK)) { g_fEdgeThick = fNew; if (g_bVerbose == TRUE) { llOwnerSay("Edge thickness changed to: " + (string) g_fEdgeThick); } // if llRegionSay(CHANNEL, MSG_EDGE_THICKNESS + "|" + (string) g_fEdgeThick); showConfig(); } // if edgeMenu(id); } else if (g_sActualMenu == OPC_NODE_SIZE) { fNew = (float)((string)(g_fNodeSize + fIncr)); if ((fNew <= MAX_NODE_SIZE) && (fNew >= MIN_NODE_SIZE)) { g_fNodeSize = fNew; if (g_bVerbose == TRUE) { llOwnerSay("Node size changed to: " + (string) g_fNodeSize); } // if llRegionSay(CHANNEL, MSG_NODE_SIZE + "|" + (string) g_fNodeSize); showConfig(); } // if nodeMenu(id); } else if (g_sActualMenu == OPC_TRIANGLE_THICK) { fNew = (float)((string)(g_fTriangleDepth + fIncr)); if ((fNew <= MAX_TRIANGLE_THICK) && (fNew >= MIN_TRIANGLE_THICK)) { g_fTriangleDepth = fNew; if (g_bVerbose == TRUE) { llOwnerSay("Triangle thickness changed to: " + (string) g_fTriangleDepth); } // if llRegionSay(CHANNEL, MSG_TRIANGLE_THICK + "|" + (string) g_fTriangleDepth); showConfig(); } // if triangleMenu(id); } // if } else if (sMsg == llToLower(OPC_MAX)) { if (g_sActualMenu == OPC_SIZE) { g_fEdgeLength = MAX_EDGE_SIDE; if (g_bVerbose == TRUE) { llOwnerSay("Size changed to: " + (string) g_fEdgeLength); } // if showConfig(); sizeMenu(id); } else if (g_sActualMenu == OPC_EDGE_THICK) { g_fEdgeThick = MAX_EDGE_THICK; if (g_bVerbose == TRUE) { llOwnerSay("Edge thickness changed to: " + (string) g_fEdgeThick); } // if llRegionSay(CHANNEL, MSG_EDGE_THICKNESS + "|" + (string) g_fEdgeThick); showConfig(); edgeMenu(id); } else if (g_sActualMenu == OPC_NODE_SIZE) { g_fNodeSize = MAX_NODE_SIZE; if (g_bVerbose == TRUE) { llOwnerSay("Node size changed to: " + (string) g_fNodeSize); } // if llRegionSay(CHANNEL, MSG_NODE_SIZE + "|" + (string) g_fNodeSize); showConfig(); nodeMenu(id); } else if (g_sActualMenu == OPC_TRIANGLE_THICK) { g_fTriangleDepth = MAX_TRIANGLE_THICK; if (g_bVerbose == TRUE) { llOwnerSay("Triangle thickness changed to: " + (string) g_fTriangleDepth); } // if llRegionSay(CHANNEL, MSG_TRIANGLE_THICK + "|" + (string) g_fTriangleDepth); showConfig(); triangleMenu(id); } // if } else if (sMsg == llToLower(OPC_MIN)) { if (g_sActualMenu == OPC_SIZE) { g_fEdgeLength = MIN_EDGE_SIDE; if (g_bVerbose == TRUE) { llOwnerSay("Size changed to: " + (string) g_fEdgeLength); } // if showConfig(); sizeMenu(id); } else if (g_sActualMenu == OPC_EDGE_THICK) { g_fEdgeThick = (float)((string)(MIN_EDGE_THICK + 0.01)); if (g_bVerbose == TRUE) { llOwnerSay("Edge thickness changed to: " + (string) g_fEdgeThick); } // if llRegionSay(CHANNEL, MSG_EDGE_THICKNESS + "|" + (string) g_fEdgeThick); showConfig(); edgeMenu(id); } else if (g_sActualMenu == OPC_NODE_SIZE) { g_fNodeSize = (float)((string)(MIN_NODE_SIZE + 0.01)); if (g_bVerbose == TRUE) { llOwnerSay("Node size changed to: " + (string) g_fNodeSize); } // if llRegionSay(CHANNEL, MSG_NODE_SIZE + "|" + (string) g_fNodeSize); showConfig(); nodeMenu(id); } else if (g_sActualMenu == OPC_TRIANGLE_THICK) { g_fTriangleDepth = (float)((string)(MIN_TRIANGLE_THICK + 0.01)); if (g_bVerbose == TRUE) { llOwnerSay("Triangle thickness changed to: " + (string) g_fTriangleDepth); } // if llRegionSay(CHANNEL, MSG_TRIANGLE_THICK + "|" + (string) g_fTriangleDepth); showConfig(); triangleMenu(id); } // if } else if (sMsg == llToLower(OPC_OFF)) { if (g_sActualMenu == OPC_EDGE_THICK) { g_fEdgeThick = MIN_EDGE_THICK; if (g_bVerbose == TRUE) { llOwnerSay("Disabled rez edges."); } // if llRegionSay(CHANNEL, MSG_EDGE_THICKNESS + "|" + (string) g_fEdgeThick); showConfig(); edgeMenu(id); } else if (g_sActualMenu == OPC_NODE_SIZE) { g_fNodeSize = MIN_NODE_SIZE; if (g_bVerbose == TRUE) { llOwnerSay("Disabled rez nodes."); } // if llRegionSay(CHANNEL, MSG_NODE_SIZE + "|" + (string) g_fNodeSize); showConfig(); nodeMenu(id); } else if (g_sActualMenu == OPC_TRIANGLE_THICK) { g_fTriangleDepth = MIN_TRIANGLE_THICK; if (g_bVerbose == TRUE) { llOwnerSay("Disabled rez triangles."); } // if llRegionSay(CHANNEL, MSG_TRIANGLE_THICK + "|" + (string) g_fTriangleDepth); showConfig(); triangleMenu(id); } // if } else if (sMsg == MSG_REZ) { g_vSavedPos = llGetPos(); float fTrueSize = g_fEdgeLength; if (g_sActualStruct == STRUCT_DODECAHEDRON) { fTrueSize *= GOLDEN; } else if (g_sActualStruct == STRUCT_TETRAHEDRON) { fTrueSize /= llSqrt(2); } else if (g_sActualStruct == STRUCT_OCTAHEDRON) { fTrueSize *= llSqrt(2); } // if safe_posJump(g_vSavedPos + <0.0, 0.0, fTrueSize>); g_lRelPos = getNodeList(fTrueSize); g_lConnectList = getConnectList(); g_lTriangleList = getTriangleList(); g_lRectangleList = getRectangleList(); state rezzNodes; } // if } // listen } // UserInterface state rezzNodes { state_entry() { if (g_fNodeSize > MIN_NODE_SIZE) { g_iMax = llGetListLength(g_lRelPos); g_iCounter = 0; if (g_iMax > 0) { if (g_bVerbose == TRUE) { llOwnerSay("Rezzing Nodes."); } // if g_iListenDesc = llListen(CHANNEL, OBJECT_TO_REZ, NULL_KEY, ""); vector v1 = llList2Vector(g_lRelPos, g_iCounter); rez_node(v1); } else { state rezzEdges; } // if } else { state rezzEdges; } // if } // state_entry state_exit() { llListenRemove(g_iListenDesc); } // state_exit on_rez(integer start_param) { llResetScript(); } // on_rez listen(integer channel, string name, key id, string message) { if ((llGetOwnerKey(id) != llGetOwner()) || (id == llGetKey())) { return; } // if if (message == MSG_OK) { llWhisper(CHANNEL, g_sObjectParams); } else if (message == MSG_NEXT) { g_iCounter ++; if (g_iCounter < g_iMax) { vector v1 = llList2Vector(g_lRelPos, g_iCounter); rez_node(v1); } else { state rezzEdges; } // if } // if } // listen } // rezzNodes state rezzEdges { state_entry() { if (g_fEdgeThick > MIN_EDGE_THICK) { g_iMax = llGetListLength(g_lConnectList); g_iCounter = 0; if (g_iMax >= 2) { if (g_bVerbose == TRUE) { llOwnerSay("Rezzing Edges."); } // if g_iListenDesc = llListen(CHANNEL, OBJECT_TO_REZ, NULL_KEY, ""); vector v1 = llList2Vector(g_lRelPos, llList2Integer(g_lConnectList, g_iCounter)); vector v2 = llList2Vector(g_lRelPos, llList2Integer(g_lConnectList, g_iCounter + 1)); rez_edge(v1, v2); } else { state rezTriangles; } // if } else { state rezTriangles; } // if } // state_entry state_exit() { llListenRemove(g_iListenDesc); } // state_exit on_rez(integer start_param) { llResetScript(); } // on_rez listen(integer channel, string name, key id, string message) { if ((llGetOwnerKey(id) != llGetOwner()) || (id == llGetKey())) { return; } // if if (message == MSG_OK) { llWhisper(CHANNEL, g_sObjectParams); } else if (message == MSG_NEXT) { g_iCounter += 2; if (g_iCounter < g_iMax) { vector v1 = llList2Vector(g_lRelPos, llList2Integer(g_lConnectList, g_iCounter)); vector v2 = llList2Vector(g_lRelPos, llList2Integer(g_lConnectList, g_iCounter + 1)); rez_edge(v1, v2); } else { state rezTriangles; } // if } // if } // listen } // rezzEdges state rezTriangles { state_entry() { if (g_fTriangleDepth > MIN_TRIANGLE_THICK) { g_iMax = llGetListLength(g_lTriangleList); g_iCounter = 0; if (g_iMax >= 3) { if (g_bVerbose == TRUE) { llOwnerSay("Rezzing Triangles."); } // if g_iListenDesc = llListen(CHANNEL, OBJECT_TO_REZ, NULL_KEY, ""); vector v1 = (vector) llList2String(g_lRelPos, llList2Integer(g_lTriangleList, g_iCounter)); vector v2 = (vector) llList2String(g_lRelPos, llList2Integer(g_lTriangleList, g_iCounter + 1)); vector v3 = (vector) llList2String(g_lRelPos, llList2Integer(g_lTriangleList, g_iCounter + 2)); rez_triangle(v1, v2, v3); } else { state rezRectangles; } // if } else { state rezRectangles; } // if } // state_entry state_exit() { llListenRemove(g_iListenDesc); } // state_exit on_rez(integer start_param) { llResetScript(); } // on_rez listen(integer channel, string name, key id, string message) { if ((llGetOwnerKey(id) != llGetOwner()) || (id == llGetKey())) { return; } // if if (message == MSG_OK) { llWhisper(CHANNEL, g_sObjectParams); } else if (message == MSG_NEXT) { g_iCounter += 3; if (g_iCounter < g_iMax) { vector v1 = (vector) llList2String(g_lRelPos, llList2Integer(g_lTriangleList, g_iCounter)); vector v2 = (vector) llList2String(g_lRelPos, llList2Integer(g_lTriangleList, g_iCounter + 1)); vector v3 = (vector) llList2String(g_lRelPos, llList2Integer(g_lTriangleList, g_iCounter + 2)); rez_triangle(v1, v2, v3); } else { state rezRectangles; } // if } // if } // listen } // rezTriangles state rezRectangles { state_entry() { if (g_fTriangleDepth > MIN_TRIANGLE_THICK) { g_iMax = llGetListLength(g_lRectangleList); g_iCounter = 0; if (g_iMax >= 4) { if (g_bVerbose == TRUE) { llOwnerSay("Rezzing Rectangles."); } // if g_iListenDesc = llListen(CHANNEL, OBJECT_TO_REZ, NULL_KEY, ""); vector v1 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter)); vector v2 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter + 1)); vector v3 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter + 2)); vector v4 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter + 3)); rez_rectangle(v1, v2, v3, v4); } else { state UserInterface; } // if } else { state UserInterface; } // if } // state_entry state_exit() { llListenRemove(g_iListenDesc); safe_posJump(g_vSavedPos); llOwnerSay("Done!"); } // state_exit on_rez(integer start_param) { llResetScript(); } // on_rez listen(integer channel, string name, key id, string message) { if ((llGetOwnerKey(id) != llGetOwner()) || (id == llGetKey())) { return; } // if if (message == MSG_OK) { llWhisper(CHANNEL, g_sObjectParams); } else if (message == MSG_NEXT) { g_iCounter += 4; if (g_iCounter < g_iMax) { vector v1 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter)); vector v2 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter + 1)); vector v3 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter + 2)); vector v4 = (vector) llList2String(g_lRelPos, llList2Integer(g_lRectangleList, g_iCounter + 3)); rez_rectangle(v1, v2, v3, v4); } else { state UserInterface; } // if } // if } // listen } // rezRectangles That's all. Now take your object to your inventory.
  6. Not sure if these guys are still active in secondlife. It is relatively common for someone close their account and not abandon or sell their land. That has changed recently, but there are still many plots of non-active avatars.
  7. It works similarly to the old network worm "ILOVEYOU". That is, using the curiosity of people to spread. In a crowded place, like a sandbox, when someone rezz one of those objects in a few minutes can be 10 or 20 or more. For those living on private islands, probably not a problem. But those who frequent sandboxes or own sandboxes is a very big problem. By the way, I publish this script. This is a modification of my anticage script. Must be put at 4000 m altitude and ban the owners of "ExDepart" objects for 6 hours. Enough time to know not to accept and rez that object. But it would be ideal if Linden Labs will ban that object float TIME = 10.0;float RADIUS = 96.0;float HOURS_BAN_TIME = 6.00; string CAGE_NAME = "..::ExDepart::.. Gift Package 2012";// List of creator of cages. I prefer no make one list of avatar UUID. Instead i use MD5.list lCreatorsMD5Key = [ "89adb4af5c4b79a155ac2fce78b35bc6" ]; key g_kOwner; // Store the owner key due the object can be deeded to land group.// Like llOverMyLand(), but it work if land is not mine. Needed when testing.integer CheckIfSameParcel(vector vPos) { key kHere = llList2Key(llGetParcelDetails(llGetPos(), [ PARCEL_DETAILS_ID ]), 0); key kWhere = llList2Key(llGetParcelDetails(vPos, [ PARCEL_DETAILS_ID ]), 0); return (kHere == kWhere); } // CheckIfSameParcelBanIfHere(key kOwnerCages) { if (llOverMyLand(kOwnerCages) == TRUE) { string sName = llKey2Name(kOwnerCages); llInstantMessage(kOwnerCages, "Sorry Mr " + sName + ". You rezzed an object named '..::ExDepart::.. Gift Package 2012'. That object is a anoyning spammer. Plase, remove from your inventory that object.."); llTeleportAgentHome(kOwnerCages); llAddToLandBanList(kOwnerCages, HOURS_BAN_TIME); llInstantMessage(g_kOwner, sName + " (" + (string) kOwnerCages + ") has been sent to its house , due to spam activity."); //llShout(0, sName + " has been sent to its house , due to spam activity."); } // if } // BanIfHeredefault { state_entry() { g_kOwner = llGetOwner(); llSensorRepeat(CAGE_NAME, NULL_KEY, PASSIVE | ACTIVE, RADIUS, PI, TIME); } // state_entry on_rez(integer start_param) { llResetScript(); } // on_rez sensor(integer total_number) { integer iCont; for (iCont = 0; iCont < total_number; iCont++) { string sObjeto = llDetectedName(iCont); key id = llDetectedKey(iCont); if (CheckIfSameParcel(llDetectedPos(iCont)) == TRUE) { list lDetails = llGetObjectDetails(id, [OBJECT_CREATOR]); key kObjectCreator = llList2Key(lDetails, 0); integer iCreatorCount; integer iLength = llGetListLength(lCreatorsMD5Key); for (iCreatorCount = 0; iCreatorCount < iLength; iCreatorCount++) { key kCreator = llList2Key(lCreatorsMD5Key, iCreatorCount); if (kCreator == llMD5String((string) kObjectCreator, 0)) { BanIfHere(llGetOwnerKey(id)); iCreatorCount = iLength; } // if } // for } // if } // for } // sensor no_sensor() { } // no_sensor } // default
  8. Hello, i no received reply inworld. I have the sound but with low quality and perhaps i can found any script for facial expression emoter and modifty it. Thx for reply.
  9. Recently, Pixar has decided to release as Open Source the software OpenSubDiv. This software implement a high performance subdivision surface. And i amazing, is it possible to enhance the quality of sculpties and mesh using this software or is indifferent because the current software does the same thing differently.?. And, it is possible to include OpenSubDiv in the SL client?. Greetings.
  10. I searching a gesture like this: http://www.youtube.com/watch?v=GEStsLJZhzo If instead of a gesture is a wearable tribal object, better. greetings.
  11. In Venufalat region stop working the SafeJumpPost() function. I tested in other regions with the same server ("Admiranda") and still working.
  12. This is just the skeleton, which can be completed to everyone's taste. One way to securing HUD is knowing in advance the UUID of the event horizon. Want a hint?: Event Horizon whispers: touch the event horizon to teleport The solution you propose I do not consider acceptable. If every time it is necessary to click, I prefer the map. at least i know in advance where I go. Postscript: The google translator works worse every day. Perhaps it is being vandalized.
  13. This is the skeleton of a HUD for use with stargates of OpenGate network, new AGA network and Alteraan network. This uses the new teleport function and do not need the map. Just cross the horizont and teleport is automatic. integer CHANNEL = -900000; string g_sRegion = ""; vector g_vLocal = ZERO_VECTOR; vector g_vLookAt = ZERO_VECTOR; default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TELEPORT); llListen(CHANNEL, "", NULL_KEY, ""); } on_rez(integer start_param) { llResetScript(); } run_time_permissions(integer perm) { if (!(perm & PERMISSION_TELEPORT)) { llOwnerSay("I need permissions to teleport you!"); llRequestPermissions(llGetOwner(), PERMISSION_TELEPORT); } } listen(integer channel, string name, key id, string message) { list lTokens = llParseString2List(message, ["|"], []); string sMap = llList2String(lTokens, 0); if (sMap != "map") { return; } // if key kKey = (key)llList2String(lTokens, 1); if (kKey != llGetOwner()) { return; } // if g_sRegion = llList2String(lTokens, 2); g_vLocal = (vector)llList2String(lTokens, 3); rotation rRot = (rotation)llList2String(lTokens, 4); g_vLookAt = g_vLocal + (llRot2Fwd(rRot) * 10.0); llRequestSimulatorData(g_sRegion, DATA_SIM_POS); //DATA_SIM_STATUS } dataserver(key query_id, string data) { vector vGlobal = (vector)data; llTeleportAgentGlobalCoords(llGetOwner(), vGlobal, g_vLocal, g_vLookAt); } } This is a minimun version and many improvements are possible. For example, sometimes the teleportation takes some time, and if you cross twice the same horizon, you can get stuck in the destination if you want you can add code to avoid duplication. Another possible improvement is to set On or Off the HUD if you click on it.
  14. There is the possibility that an object called "..::ExDepart::.. Gift Package 2012" Submit you a gift. Not accept it, or a little green dwarf will exit from the screen of your computer and will drink all your beer from the refrigerator. ummm, no, seriously. This is a small and invisible prim. when it is rezzed goes at an altitude of 4000 meters and from there sent spam to all the avatars of the simulator offering them the same gift. When many avatars have fallen into the same trap, all who are in the same region will receive a barrage of spam. This object does not send spam to its owner, so it is possible that many have that in their plot and not know they are sending spam. Just, do not accept objects from unknown objects or avatars.
  15. You are at 256697.5, 250525.4, 29.4 in Combat (sandbox) - Blue Team's HQ located at sim9117.agni.lindenlab.com (216.82.42.53:13003) Second Life RC LeTigre 12.07.03.261171 Scripts ask for permissions, but no teleport agent.
  16. You can use a NPV vehicle with offset animations, reflect and other tricks, ... In marketplace there are various diferent NPV from 0 L$.
  17. That is the security bug that i mencioned. I deduced that there are two work modes, restrictive mode and permissive mode. Rausch Combat Sandbox and Weapong Testing Sandbox are in permissive mode. Other simulators, for example my land, are in restrictive mode. My sugestion is Permissive mode if teleport is in the owner land, (anyway a land owner can teleport everyone to their house), and restrictive mode for all other cases.
  18. The first two days the function llTeleportAgent() was worked fine but with a security bug. I observed that bug was solved, but with an undesirable effect. Each avatar to be teleported has to grant permissions. If I give permission once, and another avatar teleports giving permission, then I have to grant permissions again if I want to teleport. It would be interesting, if an object is on the same land of the owner to work as it did the first day, ie, the owner gives permission only once and the teleporter works with all other avatars without having to give these permits. The cave of the image if from the game Imperium III. Armies entering a cave are teleported to another cave. Caves like this, (but not exactly equal due to IP) could exist in SL. For example, where a road ends. But if a dialog box appears, it destroys the magic.
  19. I just tested that llTeleportAgent() is working in not Magnum regions. But only if script is compiled in magnum sandbox. If script is reset or compiled in other region stop working.
  20. Si Bankia entra en bancarrota ¿qué banco puedo usar que funcione bién con secondlife?
  21. Do not make the door frame with one prim. Made it with three prims. With mesh do not think in prims, think in vertices. Every mesh primitive have the physics of one cube due the physics with the form of the mesh is very expensive in computer time. Imagine calculate the physics of one very complex statue. Perhaps will be possible in Havok 2056 running in a quantum computer. This is the reason that if anyone made one room/building/store in one uniq primitive, nobody can enter due the entire building will have the physics of one big cube. (Just as in the sculpts) However, many mesh primitives linked in one object, can have less land impact that all those primitives without link.
  22. I have the Blender 2.49 too. I just uploaded other mesh (8 cubes joined without the lines) and is one object. Probably i maded anything wronk when i tried to upload one simple building. Anyway, i uploaded one building in one prim, and i can not enter inside. Same that sculpties.
  23. Without the lines, the object is uploaded as a 8 linked primitives. Making Ctrl + J in Blender to joint primitives is not enought, if i no joint the meshes with a line, for SL are diferent priimitives linked in one object.
  24. I created in Blender 2.49b 10 cubes arranged vertically. I joined all cubes with "Ctrl + J" and one line between every two cubes (selecting two vertices of two diferent cubes and press "F"). After i assigned one diferent material to every cube and i exported as a ".dae". The idea is to make one "LED bar" of 10 LED to make one lag metter in only one prim. The surprise comes when I upload the mesh are only 8 cubes. I tried to import the .dae file. in Blender and looks great with the 10 cubes. Is it a bug or is there some limitation?.
×
×
  • Create New...