// "00-MagnaMural Messager Script" // // by Apollia Pirandello // // Free, public domain, open source. May be used and modified // for any purpose, including commercial purposes. // // If you like it, or even if you don't, I welcome donations of // any size. // // MagnaMural Home Page, with manual and scripts: // http://magnamural.astroblahhh.com/ //This is the script that sends most of the messages that //are displayed to the user. vector vec; integer speak=TRUE; string manual_name="*-Astroblahhh.Com MagnaMural Manual - Public Domain"; string summary_name="*-Astroblahhh.Com MagnaMural Commands Summary - Public Domain"; //Gestures given to the user will be placed in a folder by this name in their inventory: string foldertitle="Astroblahhh.Com MagnaMural Gestures"; //These next two lists are the buttons for the blue dialog menus. list menu_buttons=["COMMANDS", "MORE", "HELP", "LOCK/UNLOCK", "RESIZE", "LIST", "MOST RECENT", "GIVE TEXTURE", "NAME/NUM"]; list settings_buttons=["HOME PAGE", "BACK", "DONATE", "FREEFORM", "TEXT COLOR", "CHANNEL", "SQUARE", "SCREENSHOT", "LONG RECTANGLE"]; string blank_string=" "; integer silent_channel; integer brief_mode; integer override_brief; //The names of all the gesture objects that should be contained in the Messager script's prim: list gestures=["MagnaMural - F3 - Move Down - Channel 9","MagnaMural - F4 - Move Up - Channel 9","MagnaMural - F5 - Reload Texture - Channel 9","MagnaMural - F7 - Backward - Channel 9","MagnaMural - F8 - Forward - Channel 9","MagnaMural - F9 - Most Recent - Channel 9","MagnaMural - F10 - Random - Channel 9"]; default { link_message(integer sender_num, integer num, string str, key id) { override_brief=FALSE; //When true, indicates that the message should //be displayed the user despite the MagnaMural being //in Brief Mode. speak=TRUE; //Sometimes messages are passed to the Messager script which //aren't intended to display anything to the user. If that's //the case, then, speak is set to FALSE. if (num==13) { str="Now in Locked Mode."; override_brief=TRUE; } else if (num==14) { str="Now in Unlocked Mode."; override_brief=TRUE; } else if (num==16) { str="Command prompt mode timed out."; override_brief=TRUE; } else if (num==17) { str="There are only "+str+" textures in this object. Please say a lower number, from 1 to "+str+"."; override_brief=TRUE; } else if (num==18) { str="Please say a number higher than 0 and lower than or equal to "+str+", the number of textures in this object."; override_brief=TRUE; } else if (num==25) { override_brief=TRUE; string increment=str; integer num_to_browse=(2-(integer)increment); str="The script was recently reset, so the Most Recent feature isn't functioning yet. Please browse "+(string)num_to_browse+" other "; if (num_to_browse==1) { str+="texture."; } else { str+="textures."; } } else if (num==26) { str="Now displaying name and number of texture above Panel 2."; } else if (num==27) { str="No longer displaying name and number of texture above Panel 2."; } else if (num==28) { str="Going back to most recent previously-displayed texture."; } else if (num==29) { llOwnerSay("You should receive the manual notecard momentarily."); llGiveInventory(id,manual_name); speak=FALSE; } else if (num==30) { str="You should receive the displayed texture momentarily."; } else if (num==33) { str="Please say how many meters wide you want the MagnaMural to be. The current size is "+str+". To exit Resize Mode, please say 'x'."; } else if (num==37) { str="You named a length higher than 20 m, the maximum length, so, automatically setting the length to 20 m."; } else if (num==38) { str="Please name a length greater than or equal to 0.04 m."; override_brief=TRUE; } else if (num==41) { vec=(vector)str; llSetScale(vec); speak=FALSE; } else if (num==42) { vec=(vector)str; llSetPos(vec); speak=FALSE; } else if (num==43) { str="Now in Square Shape."; } else if (num==44) { str="Now in Screenshot Shape."; } else if (num==45) { str="Now in Long Rectangle Shape."; } else if (num==46) { str="Now in Freeform Shape."; } else if (num==51) { override_brief=TRUE; silent_channel=(integer)str; str="Silent chat channel set to "+str+"."; } else if (num==52) { str="Please say what number you'd like the silent chat channel to use. To exit silent chat channel select mode, please say 'x'."; override_brief=TRUE; } else if (num==53) { str="Silent chat channel set to the default channel, 9."; override_brief=TRUE; } else if (num==54) { str="Please input three RGB (Red Green Blue) format color values from 0 to 255."; override_brief=TRUE; } else if (num==55) { str="Text color changed to "+str+". Say 'x' to exit Text Color Change Mode."; } if (num==56) { str="Resetting script..."; override_brief=TRUE; } else if (num==57) { str="Please say the width and height in meters you want the MagnaMural to be, in the format '3 x 4.5' or '5x8' or '8 12'. The current size is "+str+". To exit Resize Mode, please say 'x'."; } else if (num==60) { str="You input a value higher than 255, so, automatically setting it to 255."; } else if (num==61) { str="You input a value lower than 0, so, automatically setting it to 0."; } else if (num==62) { str="Resized to "+str+"."; } else if (num==64) { str="Exiting Text Color Change Mode."; } else if (num==65) { str="Exiting Resize Mode."; } else if (num==67) { str="Please name a channel other than 0 for the silent chat channel, since 0 is the audible chat channel."; override_brief=TRUE; } else if (num==68) { str="Exiting Silent Chat Channel Select Mode."; } else if (num==69) { str="A second value is required in order to resize the MagnaMural when it's in Freeform Shape."; override_brief=TRUE; } else if (num==70) { override_brief=TRUE; str="Please say what number you'd like the silent chat channel to be. Currently using channel "+str+". To exit Silent Chat Channel Select Mode, please say 'x'."; } else if (num==72) { llSetObjectName(str); speak=FALSE; } else if (num==73) { str="Please say the text color you'd like in RGB (Red Green Blue) format, three numbers from 0 to 255. '255 255 255' = white, '0 0 0' = black. The current text color is "+str+". To exit Text Color Change Mode, please say 'x'."; override_brief=TRUE; } else if (num==74) { str="No longer listening for commands."; override_brief=TRUE; } else if (num==75) { str="Current size is "+str+"."; override_brief=TRUE; } else if (num==76) { str="Already in main command prompt mode."; } else if (num==80) { str="Please name a channel from 1 to 9999 for the silent chat channel."; override_brief=TRUE; } else if (num==81) { llOwnerSay("You should receive the commands summary notecard momentarily."); llGiveInventory(id,summary_name); speak=FALSE; } else if (num==83) { str="The script was recently reset, so the texture delete function won't be available until you've browsed another texture."; override_brief=TRUE; } else if (num==84) { str="Deleted former texture #"+str+"."; override_brief=TRUE; } if (num==87) { str="Cannot delete - this is the last texture left in the MagnaMural."; override_brief=TRUE; } else if (num==88) { str="Listing all textures inside:"; override_brief=TRUE; } else if (num==90) { brief_mode=TRUE; speak=FALSE; } else if (num==91) { brief_mode=FALSE; speak=FALSE; } else if (num==92) { override_brief=TRUE; str="Now in Brief Mode."; } else if (num==93) { override_brief=TRUE; str="Now in Verbose Mode."; } else if (num==94) { override_brief=TRUE; str="Now in Invisible Mode."; } else if (num==95) { override_brief=TRUE; str="Now in Visible Mode."; } else if (num==96) { str="Now in Phantom Mode."; } else if (num==97) { str="Now in Solid Mode."; } else if (num==400) { silent_channel=(integer)str; speak=FALSE; } else if (num==500) { llDialog(id,blank_string,menu_buttons,silent_channel); speak=FALSE; } else if (num==501) { llDialog(id,blank_string,settings_buttons,silent_channel); speak=FALSE; } else if (num==777) { llOwnerSay("You should receive a folder titled "+foldertitle+" momentarily."); llGiveInventoryList(id,foldertitle,gestures); speak=FALSE; } else if (num==1000) { str="Aborted texture delete."; override_brief=TRUE; } else if (num==1001) { str="Are you sure you want to delete this texture? If so, say 'y'. If not, say anything else."; override_brief=TRUE; } else if (num==1002) { str="If you wish to delete a texture, please say 'tdel'."; } else if (num==1100) { str="Text color changed to "+str+"."; } if (speak==TRUE && brief_mode==FALSE) { llOwnerSay(str); } if (speak==TRUE && brief_mode==TRUE) { if (override_brief==TRUE) { llOwnerSay(str); } } } } //******* End of Messager script.