Gayngel

Mailbox snippet

Aug 24th, 2021 (edited)
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   if (change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
  2.            {
  3.        
  4.            
  5.  
  6.    
  7.   integer num = llGetInventoryNumber(INVENTORY_NOTECARD);
  8.  
  9.  
  10.     for (x=0; x < num; x++)
  11.   {
  12.       string itemName = llGetInventoryName(INVENTORY_NOTECARD, x);
  13.     //    inventory += llGetInventoryName(INVENTORY_NOTECARD, x);
  14.      
  15.        if (!~llListFindList(inventory, [itemName]) )
  16.        {
  17.       //  llRegionSayTo(ToucherID,0, "You mail has been accepted and sent. Thank you.");
  18. llWhisper(0, "Your mail has been accepted and sent. Thank you.");
  19.             llOwnerSay("You have new mail. \nNotecard named: " + itemName + "\n From: " + "secondlife:///app/agent/" + (string)llGetInventoryCreator(itemName) + "/about");
  20.          
  21.          llGiveInventory(llGetOwner(),itemName);
  22.          
  23.          inventory += [itemName];
  24.          
  25.          jump out;
  26.      }
  27.      
  28. }
  29.  
  30.  @out;
  31. }
Add Comment
Please, Sign In to add comment