SHARE
TWEET

Untitled

a guest Mar 15th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. box(integer cstate){
  2.     if(!cstate){//closed
  3.         llSetLinkAlpha(2,1,-1);
  4.         llSetLinkAlpha(3,0,-1);
  5.     }
  6.     if(cstate){//opened
  7.         llSetLinkAlpha(2,0,-1);
  8.         llSetLinkAlpha(3,1,-1);
  9.     }
  10. }
  11. key sound_uuid = "02733e43-1ad9-237e-ce7a-8ac498fabcf0";// "af9f79fa-3b59-01f7-5eee-0dab9ef0e16c";
  12.  
  13. default{
  14.     on_rez(integer r){
  15.         llResetScript();
  16.     }state_entry(){
  17.         box(0);
  18.         llSetText("Touch me to unbox!",<0,1,0>,1);
  19.     }touch_start(integer ts){
  20.         if(llDetectedKey(0) != llGetOwner())return;
  21.         llTriggerSound(sound_uuid,1);
  22.         box(1);
  23.         integer x = 0;
  24.         integer s = llGetInventoryNumber(INVENTORY_ALL);
  25.         list given;
  26.         for(;x<s;++x){
  27.             string cn = llGetInventoryName(INVENTORY_ALL,x);
  28.             if(cn != llGetScriptName()){
  29.                 given += cn;
  30.             }
  31.         }
  32.         llGiveInventoryList(llGetOwner(),llGetObjectName(),given);
  33.         llDie();
  34.     }
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top