integer perms; integer arrow = 1; //Link Message Actions: //-77 - Change Arrow Pos //-6 - Auto VI Toggle //-5 - Multiply Off //-4 - Destroy Instant Kill Bullets //-3 - Birth Date Toggle //-2 - Halter Toggle //-1 - Setting Action //0 - Ordering Action //50 - System Display //66 - Execute Vanish Insurance //77 - Request Action //99 - Lock System Control integer action = 1; //Action Group: //1 - Phantom //2 - Tele //3 - Bash //4 - Kill //5 - Multiply //6 - Target string get_action(integer num) { if(num == 1) { return("Phantom"); } else if(num == 2) { return("Teleport"); } else if(num == 3) { return("Bash"); } else if(num == 4) { return("Kill"); } else if(num == 5) { return("Multiply"); } else if(num == 6) { return("Target"); } else { return("None"); } } arrow_change(integer num) { arrow += num; if(arrow < 0) { arrow = 9; } else if(arrow > 9) { arrow = 0; } llMessageLinked(LINK_SET,-77,(string)arrow,NULL_KEY); } action_change(integer num) { action += num; if(action < 1) { action = 6; } else if(action > 6) { action = 1; } llMessageLinked(LINK_SET,-1,(string)action,NULL_KEY); } default { attach(key id) { llResetScript(); } state_entry() { llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS); llListen(5230,"",llGetOwner(),""); llListen(5230,"UKi Bullet",NULL_KEY,""); llSetTimerEvent(0.1); } touch_start(integer total_number) { if(llDetectedLinkNumber(0) == LINK_ROOT) { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Help System:. \n Click the button with the name of the HUD feature that you wish to learn more about.",[ //Top "ML Control","N/I","Credits", //Mid-Top "Hit Detect","Vanish I.","Auto V.I.", //Mid-Bottom "Exc. Action","Actions","Halter", //Bottom "Av Sensor","Ext. Info","Set Action" //End List ],5230); } } listen(integer channel, string name, key id, string msg) { if(msg == "Go Back") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Help System:. \n Click the button with the name of the HUD feature that you wish to learn more about.",[ //Bottom "ML Control","N/I","Credits", //Mid-Bottom "Hit Detect","Vanish I.","Auto V.I.", //Mid-Top "Exc. Action","Actions","Halter", //Top "Av Sensor","Ext. Info","Set Action" //End List ],5230); } else if(msg == "Actions") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Node-Click Action Details:. \n Click the button with the name of the Node-Click Action that you wish to learn more about.",[ //Bottom "Multiply","Target","Go Back", //Middle "Teleport","Bash","Kill", //Top "Phantom" //End List ],5230); } else if(msg == "Av Sensor") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Interactive Avatar Sensor:. \n Displays the nearest (at most) nine avatars' first names above corresponding nodes. The order is [nearest > farthest] = [orange name > blue name] = [bottom most > top most]. \n \n The color of each avatar's node represents their current status, as follows: \n > Green - AFK \n > Red - Mouselook & Flying \n > Yellow - Mouselook \n > Sky Blue - Flying \n > Blue - In Air \n > Orange - In Chat Range \n > Silver - Outside Range \n > Gray - No One",["Go Back"],5230); } else if(msg == "Ext. Info") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Extensive Avatar Information:. \n Click and hold an avatar node to receive extensive info on that avatar, including: \n > Their full name. \n > Their current status. \n > Their rez date. (Optional - Toggle with gold circle button.) \n > Their distance from you. \n > Their height relative to you. \n \n You may also have their unique key chatted to you by clicking the 'Get Key #' button in the extensive info dialog box.",["Go Back"],5230); } else if(msg == "Set Action") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Setting The Node-Click Action:. \n The array of multi-colored HUD buttons near the Talk tab are the action-set buttons. Clicking these will accordingly change the action which the HUD performs upon clicking an active avatar node. The buttons are as follows: \n > Violet - Phantom \n > Aqua - Teleport \n > Orange - Bash \n > Red - Kill \n > Green - Multiply \n > Silver - Target \n \n Note: These are explained under the 'Actions' category of the help system.",["Go Back"],5230); } else if(msg == "Exc. Action") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Executing The Node-Click Action:. \n Quickly clicking any active avatar node (as opposed to clicking and holding for extensive info) will execute the currently selected node-click action on the corresponding avatar.",["Go Back"],5230); } else if(msg == "Phantom") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Node-Click Action - Phantom:. \n Swiftly moves you behind the corresponding avatar. May or may not be hindered by walls or ceilings, depending on your distance from the avatar. (more distance = less likely)",["Actions"],5230); } else if(msg == "Teleport") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Node-Click Action - Teleport:. \n Moves you up, then down quickly to behind the corresponding avatar. May or may not be hindered by walls or ceilings, depending on your distance from the avatar. (more distance = less likely)",["Actions"],5230); } else if(msg == "Bash") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Node-Click Action - Bash:. \n Uses your body as a push 'bullet' to push-attack the avatar of choice. Useful in no-rez zones, but be careful when using it in damage zones. May or may not be hindered by walls or ceilings, depending on your distance from the avatar. (more distance = less likely)",["Actions"],5230); } else if(msg == "Kill") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Node-Click Action - Kill:. \n Instantly to semi-instantly kills the corresponding avatar regardless of obstacles. (only applies in damage-zones, of course) If the avatar is motionless, it will cause them to slowly be pushed in a random direction, and kills them as soon as they move.",["Actions"],5230); } else if(msg == "Multiply") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Node-Click Action - Multiply:. \n Causes you to follow the corresponding avatar by moving around their head in circles. This is mostly a just-for-fun feature. To disable Multiply, click the circular green button beside the multiply button.",["Actions"],5230); } else if(msg == "Halter") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Halter:. \n The Halter function can be described as an 'auto-lock' that keeps you from unexpectedly being blown away by push. To toggle Halter off and on, click the smoke-gray button on the innermost part of the HUD.",["Go Back"],5230); } else if(msg == "Credits") { llDialog(llGetOwner(),"[[Tripwire HUD : Build 1.0]] \n .:Credits:. \n All models and all scripts in/of the HUD and in any objects that the HUD rezzes created from scratch by Vance Sodwind. \n \n Special thanks: \n > Kaede Elytis, for inspiration and motivation, as well as getting me to join Second Life. \n > Ice Cydrome, for motivating me to create this group, and for help deciding the group's name. \n > Detoxin Dwi, for giving me projects to do when I was bored and thus helping me to further develop my scripting skills.",["Go Back"],5230); } if(name == "UKi Bullet") { llMessageLinked(LINK_SET,50,msg,NULL_KEY); } } link_message(integer sender, integer num, string msg, key id) { if(num == 0) { llMessageLinked(LINK_SET,action,"",id); llMessageLinked(LINK_SET,50,get_action(action)+" executed on "+llKey2Name(id)+".",NULL_KEY); } if(num == -1) { action = (integer)msg; llMessageLinked(LINK_SET,50,"Action set to "+get_action(action)+".",NULL_KEY); } } timer() { integer info = llGetAgentInfo(llGetOwner()); if((info & AGENT_MOUSELOOK) && !perms) { perms = 1; llTakeControls(CONTROL_DOWN | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_BACK | CONTROL_FWD | CONTROL_ML_LBUTTON,1,1); llMessageLinked(LINK_SET,-77,(string)arrow,NULL_KEY); llMessageLinked(LINK_SET,50,"Mouselook shortcut controls activated.",NULL_KEY); } if(!(info & AGENT_MOUSELOOK) && perms) { perms = 0; llReleaseControls(); llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS); llMessageLinked(LINK_SET,-77,"10",NULL_KEY); llMessageLinked(LINK_SET,50,"Mouselook shortcut controls de-activated.",NULL_KEY); } } control(key id, integer level, integer edge) { if(CONTROL_DOWN & level) { if((CONTROL_LEFT & edge) && (CONTROL_LEFT & level)) { action_change(-1); } else if((CONTROL_RIGHT & edge) && (CONTROL_RIGHT & level)) { action_change(1); } else if((CONTROL_BACK & edge) && (CONTROL_BACK & level)) { arrow_change(-1); } else if((CONTROL_FWD & edge) && (CONTROL_FWD & level)) { arrow_change(1); } } else if((CONTROL_FWD & edge) && (CONTROL_FWD & level) && (CONTROL_BACK & edge) && (CONTROL_BACK & level)) { llMessageLinked(LINK_SET,77,(string)arrow,NULL_KEY); } } }