Difference between revisions of "User:Talia Tokugawa/scripts"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
*Dialog menu example [https://wiki.secondlife.com/wiki/User:Talia_Tokugawa/scripts/DialogMenu Link]
*Dialog menu example [https://wiki.secondlife.com/wiki/User:Talia_Tokugawa/scripts/DialogMenu Link]


Line 8: Line 7:
<lsl> text=llDumpList2String(llParseString2List(text, ["\\\""],[]), "\""); </lsl>
<lsl> text=llDumpList2String(llParseString2List(text, ["\\\""],[]), "\""); </lsl>
<lsl> text=llDumpList2String(llParseString2List(text, ["\\\'"],[]), "\'"); </lsl>
<lsl> text=llDumpList2String(llParseString2List(text, ["\\\'"],[]), "\'"); </lsl>
*"Loading..." balance showing wordaround
** I finally got too annoyed with having to have some one around to give my balance a jump start...
<lsl>default
{
    state_entry()
    {
        llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
    }
   
  run_time_permissions(integer perms)
  {
      if (perms & PERMISSION_DEBIT)
        state run;
  }
}
state run
{
  on_rez(integer p)
  {
      llResetScript();
  }
    touch_start(integer total_number)
    {
        llGiveMoney(llGetOwner(),1);
    }
}
</lsl>

Revision as of 03:59, 17 June 2008

  • Dialog menu example Link


Code Snippets:

  • character replacement.
    • These two are for replacing escape characters in a string that is a not compiled with the script

<lsl> text=llDumpList2String(llParseString2List(text, ["\\\""],[]), "\""); </lsl> <lsl> text=llDumpList2String(llParseString2List(text, ["\\\'"],[]), "\'"); </lsl>

  • "Loading..." balance showing wordaround
    • I finally got too annoyed with having to have some one around to give my balance a jump start...

<lsl>default {

   state_entry()
   {
       llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
   }
   
  run_time_permissions(integer perms)
  {
     if (perms & PERMISSION_DEBIT)
        state run;
  }

}

state run {

  on_rez(integer p)
  {
      llResetScript();
  }
   touch_start(integer total_number)
   {
       llGiveMoney(llGetOwner(),1);
   }

} </lsl>