Inventory Dump (pay any amount version)

From ZenMondo Wormser, 1 Year ago, written in Linden Scripting, viewed 482 times.
URL http://flynnos.org/flynnbin/view/59e56436 Embed
Download Paste or View Raw
  1. //////////////////////
  2. //Inventory Dump (pay any amount version) by ZenMondo Wormser
  3. //
  4. // Just place in a prim, along with the inventory items to be given.
  5. // To retrieve the inventory, pay the prim.
  6. // Contents will be given in a folder named what you want by changing
  7. // a line below (default is Inventory Dump).
  8. //////////////////////
  9.  
  10. // Change "Inventory Dump"  to the name of the folder you want the object to give.(keep the quotes)
  11. string folder_name = "Inventory Dump";
  12.  
  13.  
  14.  
  15. {
  16.     state_entry()
  17.     {
  18.        
  19.         llSetPayPrice(PAY_DEFAULT, [PAY_DEFAULT, PAY_DEFAULT, PAY_DEFAULT, PAY_DEFAULT]);  
  20.     }
  21.  
  22.     touch_start(integer num_detected)
  23.     {
  24.         llSay(0, "Pay me any amount to recieve my contents");  
  25.     }
  26.    
  27.    
  28.     money(key giver, integer amount)
  29.     {
  30.        
  31.        
  32.             integer counter = 0;
  33.             integer inventory_num = llGetInventoryNumber(INVENTORY_ALL);
  34.        
  35.             list inventory_list;
  36.        
  37.             while(counter < inventory_num)
  38.             {
  39.                 inventory_list = (inventory_list=[]) + inventory_list + llGetInventoryName(INVENTORY_ALL, counter);
  40.                 counter ++;
  41.             }
  42.        
  43.             list scriptname = [llGetScriptName()];
  44.        
  45.             integer index = llListFindList(inventory_list, scriptname);
  46.        
  47.             inventory_list = llDeleteSubList(inventory_list, index, index);
  48.        
  49.        
  50.             llGiveInventoryList(giver, folder_name, inventory_list);
  51.        
  52.        
  53.        
  54.     }
  55. }
  56.  

Reply to "Inventory Dump (pay any amount version)"

Here you can reply to the paste above

captcha