Created
July 20, 2016 10:21
-
-
Save antonyfairport/c418eaa23a0d1a70d6a8d5fcb7dda216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default | |
{ | |
state_entry() | |
{ | |
llAllowInventoryDrop( TRUE ); | |
} | |
changed( integer change ) | |
{ | |
if ( ( change & CHANGED_INVENTORY ) || ( change & CHANGED_ALLOWED_DROP ) ) | |
{ | |
integer iMax = llGetInventoryNumber( INVENTORY_NOTECARD ); | |
integer i; | |
for ( i = ( iMax - 1 ); i >= 0; i-- ) | |
{ | |
llRemoveInventory( llGetInventoryName( INVENTORY_NOTECARD, i ) ); | |
} | |
if ( iMax > 0 ) | |
{ | |
llSay( 0, "Thank you for your notecard!" ); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment