Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

NoteCard Reader/Emailer

Jaydin Normandy
Registered User
Join date: 1 Apr 2006
Posts: 19
06-05-2008 08:15
I created an object so when a notecard named "summary" is dropped into the object, it reads the notecard and then emails it to me. It works something like this:

1. User drops notecard into object
2. changed inventory event is invoked
3. a method checks to see if there is a notecard named "summary" in the inventory
4. if it locates the notecard, it reads the contents of the notecard to a string
5. it emails the string to me
6. it deletes the summary notecard from the inventory

This works fine when I use it because I am the item owner. The problem is that I want anyone to be able to use it regardless of group. I tried llAllowInventoryDrop but I found out that it does not count as a changed inventory. Does anyone have any ideas on how I could solve this problem?
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
06-05-2008 09:08
Try adding a timer that frequently checks the object's inventory...

It might happen, that two Agents drop a notecard in between checks - so I'd recommend scanning the inventory for every notecard that's in there and send its contents to you...
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-05-2008 10:32
With llAllowInventoryDrop(), you'll still get a 'changed' event when someone other than the owner drops in a notecard, but instead of the CHANGED_INVENTORY flag, you'll get the CHANGED_ALLOWED_DROP flag. See http://www.lslwiki.net/lslwiki/wakka.php?wakka=changed
Jaydin Normandy
Registered User
Join date: 1 Apr 2006
Posts: 19
06-05-2008 10:32
What would be the easiest way to check for all notecards?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-05-2008 11:48
llGetInventoryNumber(INVENTORY_NOTECARD), llGetInventoryName(INVENTORY_NOTECARD, n), etc. See http://www.lslwiki.net/lslwiki/wakka.php?wakka=inventory