Advertisement
CidJacobs

Sample Q&A

Dec 7th, 2024 (edited)
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer test = TRUE;
  2. integer debug = TRUE;
  3. list mail;
  4. give()
  5. {
  6.    integer count = llGetInventoryNumber( INVENTORY_NOTECARD );
  7.    integer i = 0;
  8.    if(debug)llOwnerSay("card count = "+(string)count);
  9.    for(i=0; i < count; i++)
  10.    {
  11.        string this = llGetInventoryName(INVENTORY_NOTECARD, i);
  12.         if(debug)
  13.         {
  14.             llOwnerSay("notecard "+(string) i+" is - "+this);
  15.         if(this != "suggestion")
  16.         {
  17.             mail += this;
  18.         }
  19.     }
  20.     llGiveInventoryList( llDetectedKey(0), "suggestion", mail );
  21. }
  22. default
  23. {
  24.     state_entry()
  25.     {
  26.         llAllowInventoryDrop(TRUE);
  27.     }
  28.     touch_start(integer total_number)
  29.     {
  30.         if(llDetectedKey(0) == llGetOwner() && test = FALSE)
  31.         {
  32.             give();
  33.             if(debug)
  34.             {
  35.                 llOwnerSay("hi");
  36. //            llGiveInventoryList( llDetectedKey(0), "MyMail", ["suggestion 1"] );
  37.             }
  38.         }
  39.         else
  40.         {
  41.             if(debug)llOwnerSay("nope");
  42.             llGiveInventory( llDetectedKey(0), "suggestion" );
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement