Displayer Script

From Second Life Wiki
Jump to navigation Jump to search

This is a simple 7 line displayer script that is easy to use and if you ask me very useful

<lsl> //Scripting By Akinori Kimagawa feel free to change the titles and commands...enjoy this script

string title; string line1t; string line2t; string line3t; string line4t; string line5t; string line6t; string line1; string line2; string line3; string line4; string line5; string line6; update() { llSetText("["+title+"+] "+"["+line1t+":"+line1+"] "+"["+line2t+":"+line2+"] "+"["+line3t+":"+line3+"] "+"["+line4t+":"+line4+"] "+"["+line5t+":"+line5+"] "+"["+line6t+":"+line6+"]" ,<1,1,1>,50); } default {

   state_entry()
   {
       llListen(0,"","","");
       llListen(11,"","","");
       llSetTimerEvent(-0.1);
   }
   timer()
   {
       update();

}

   listen(integer chnl,string name2,key id,string msg)

{

   if(chnl == 0)
   {
   if(id == llGetOwner())
   {
    list parse = llParseString2List(msg,["."],[]);

string cmnd = llList2String(parse,0); string part = llList2String(parse,1);

if(cmnd == "stitle") {

   title = part;

} if(cmnd == "sline1") {

   line1 = part;
   llSetObjectName(part);

} if(cmnd == "sline2") {

   line2 = part;

} if(cmnd == "sline3") {

   line3 = part;

} if(cmnd == "sline4") {

   line4 = part;

} if(cmnd == "sline5") {

   line5 = part;

} if(cmnd == "sline6") {

   line6 = part;

} if(cmnd == "sline1t") {

   line1t = part;

} if(cmnd == "sline2t") {

   line2t = part;

} if(cmnd == "sline3t") {

   line3t = part;

} if(cmnd == "sline4t") {

   line4t = part;

} if(cmnd == "sline5t") {

   line5t = part;

} if(cmnd == "sline6t") {

   line6t = part;
   }
  }
 }
}

} </lsl>

Here is a help script for the displayer

<lsl> //Scripting Done By Tacusin Memo and Akinori Kimagawa default {

   state_entry()
   {
       llListen( 0 ,"",llGetOwner(),""); 
   }
   listen( integer channel, string name, key id, string message )
   {
       if (message == "d.help" )
       {
            llGiveInventory(llGetOwner(), "(notecard name)");
       }   
   }

} </lsl>

And here is the script for the help text

<lsl> //Scripting done by Akinori Kimagawa default {

   on_rez(integer start_param)
   {
       llSay(0, "Say 'd.help' For Displayer Instructions"); 
       llResetScript(); 
   }

} </lsl>