Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list previousItems = [
- "Name1","Name2","Name3"
- ];
- list currentItems = [
- "Name1","Name3","Name4", "Name5"
- ];
- default
- {
- touch_start(integer total_number)
- {
- list addedItems;
- list removedItems;
- integer index;
- for (; index < llGetListLength(currentItems); ++index){
- if (!~llListFindList(previousItems, (list)llList2String(currentItems, index))){
- addedItems += llList2String(currentItems, index);
- }
- }
- llOwnerSay("Items added: " + llDumpList2String(addedItems, ","));
- index = 0;
- for (; index < llGetListLength(previousItems); ++index){
- if (!~llListFindList(currentItems, (list)llList2String(previousItems, index))){
- removedItems += llList2String(previousItems, index);
- }
- }
- llOwnerSay("Items removed: " + llDumpList2String(removedItems, ","));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement