daily pastebin goal
33%
SHARE
TWEET

Allowed Drop, Delete Everything but Textures

RuthvenWillenov Mar 9th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. default
  2. {
  3.     state_entry()
  4.     {
  5.         llSetText("Drop ONLY TEXTURES here.\n \n All other items will be deleted \nautomatically, and will not be returned",<0.0,1.0,0.0>,1.0);
  6.         llAllowInventoryDrop(TRUE);
  7.     }
  8.  
  9.     changed(integer change)
  10.     {
  11.         if(change &(CHANGED_ALLOWED_DROP|CHANGED_INVENTORY))
  12.         {
  13.             integer num = llGetInventoryNumber(INVENTORY_ALL)-1;
  14.             string myname = llGetScriptName();
  15.             while(num >=0)
  16.             {
  17.                 string name = llGetInventoryName(INVENTORY_ALL,num);
  18.                 integer type = llGetInventoryType(name);
  19.                 if(name != myname && type != INVENTORY_TEXTURE)
  20.                 {
  21.                     llRemoveInventory(name);
  22.                 }
  23.                 num--;
  24.             }
  25.         }
  26.     }
  27. }
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
 
Top