RuthvenWillenov

Allowed Drop, Delete Everything but Textures

Mar 9th, 2019
542
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×