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

From Second Life Wiki
Jump to navigation Jump to search
Line 5: Line 5:
*character replacement.
*character replacement.
**These two are for replacing escape characters in a string that is a not compiled with the script
**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>  
<lsl> text=llDumpList2String(llParseString2List(text, ["\\\'"],[]), "\'"); </lsl>
text=llDumpList2String(llParseString2List(text, ["\\\""],[]), "\"");  
</lsl>
<lsl>  
text=llDumpList2String(llParseString2List(text, ["\\\'"],[]), "\'");  
</lsl>


*"Loading..." balance showing wordaround
*"Loading..." balance showing workaround
** I finally got too annoyed with having to have some one around to give my balance a jump start...
** I finally got too annoyed with having to have some one around to give my balance a jump start...
<lsl>default
<lsl>
{
default {
     state_entry()
     state_entry() {
    {
         llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
         llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
     }
     }
      
      
  run_time_permissions(integer perms)
    run_time_permissions(integer perms) {
  {
       if (perms & PERMISSION_DEBIT) state run;
       if (perms & PERMISSION_DEBIT)
    }
        state run;
}
  }
state run {
}
   on_rez(integer p) {
 
state run
{
   on_rez(integer p)
  {
       llResetScript();
       llResetScript();
   }
   }


     touch_start(integer total_number)
     touch_start(integer total_number) {
    {
         llGiveMoney(llGetOwner(),1);
         llGiveMoney(llGetOwner(),1);
     }
     }
}
}
 
</lsl>
</lsl>

Revision as of 13:40, 23 August 2023

  • Dialog menu example Link
  • MapURL example Link
  • Visitor Owner Informer 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 workaround
    • 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>