I know its primitive.
I started out with two scripts, but I wanted to consolidate to one so the object in question would only display menus when appropriate.
Anyway here it is.
Please feel free to point out what I did wrong or even take the code and test it in an object.
//
// Sound Coonsole
//
// 10-12-2008 added new wireless function commented out all statements.
integer count = 0;
integer run = FALSE;
//This code is to wirelessly enable the jump button.
integer mchan = 7 ; // Input channel
integer fchan = 9 ; // Input channel
integer bchan = 0 ; // "Secret" channel/frequency message is sent on.
// key toucherkey;
// New Wirless function.
encryptsend(integer chan, string msg) {
msg = llStringToBase64(msg); // encode to Base64
msg = llXorBase64StringsCorrect(msg, "EvaKelly"

llRegionSay(chan, msg); // send message
}
integer channel = 9393;
integer mchannel = -9393;
string name = "Soound console";
string soundtoplay = "Soound console";
// subroutine
playsound()
{
string what_to_play = "02" + soundtoplay;
llTriggerSound(soundtoplay, 1);
llRegionSay(-10770, what_to_play);
llRegionSay(-10771, what_to_play);
llRegionSay(-10772, what_to_play);
llStopSound();
// state default;
}
string bcode = "05";
list menuchoices = ["military","civilian","allfleet","mercury","wayfarer","celtic","fields","colonial1","rebel","marines","PTP","Control"];
string msg = "Choose a Function. \n [[Select communications function:";
string attn_sound = "a0a13972-9cde-460f-f596-007c1f6e60df";
integer chan = 0;
list menu2choices = ["whipser","normal","local","infleet","shutdown","back"];
string msg2 = "Choose a Control Function. Function works by ship. \n [[Select remote function:";
list menu3choices = ["Sickbay","Ready Room","CAG Office","brig","Port Pod","STB Pod","Mess","CIC","CO Quarters","XO Quarters","back"];
string msg3 = "Choose a station. \n [[Pick an alternative point to point station:";
list menu4choices = ["Condition 1","Condition 2","Condition 3","FTL Prep","Jump","Radiological","back"];
string msg4 = "Choose a condition. \n [[Set Fleet Condition:]]";
default
{
state_entry()
{
llSay(0, "PA deactivated."

llSetText("PA Off",<1,1,0>,1);
}
touch_start(integer total_number)
{
key toucherkey = llDetectedKey(0);
llListen(mchannel,"",toucherkey,""

llSetTimerEvent(5);
llDialog(toucherkey,msg,menuchoices,mchannel);
if (llSameGroup(llDetectedKey(0)))
{
state on;
}
}
listen(integer mchannel, string name, key id, string message)
{
if(message == "Control"

{
llWhisper(0,"Eva was here...Menu control station."

// llDialog(ToucherID, msg,colourchoices, channel_dialog);
key toucherkey2 = llDetectedKey(0);
llDialog(toucherkey2,msg3,menu3choices,mchannel);
if(message == "Back"

{
llWhisper(0,"Eva was here..."

}
}
else if(message == "military"

{
bcode="06";
}
else if(message == "civilian"

{
bcode="07";
}
else if(message == "allfleet"

{
bcode="05";
}
else if(message == "mercury"

{
bcode="21";
}
else if(message == "wayfarer"

{
bcode="24";
}
else if(message == "celtic"

{
bcode="23";
}
else if(message == "fields"

{
bcode="22";
}
else if(message == "colonial1"

{
bcode="22";
}
else if(message == "rebel"

{
bcode="25";
}
else if(message == "marines"

{
bcode="26";
}
string msg_string;
msg_string = message+"code:"+bcode;
llWhisper(0,msg_string);
llSetObjectDesc(bcode);
}
} // End of default ...
state on
{
state_entry()
{
llSetText("PA On",<0,1,0>,1);
llRegionSay(-10772, "02"+attn_sound);
llSay(0, "PA activated - Speak."

llListen(chan,"","",""

llTriggerSound(attn_sound, 1);
}
listen(integer channel,string name,key id,string message)
{
string transmission = "XX";
llSay(0,transmission);
transmission = bcode+message;
llSay(0,transmission);
llRegionSay(-10772,transmission);
}
touch_start(integer total_number)
{
if (llSameGroup(llDetectedKey(0)))
{
state default;
}
}
}