LlGiveInventory Test

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

[LLGiveInventoryTest]

[VERSION] 0.1

[LENGTH] 00:30

[TESTERS] 2

[OVERVIEW] This test has been designed to test a Scripted give from an object using llGiveInventory.

[SETUP] This test requires 2 users, Tester 1: and Tester 2: and rezzable land

[*]

[NOTE] if receiving object is no-mod it shouldn't accept items from other users (unless allowInventoryDrop is on)

[*]

[0010.0010] Tester 1: Right-click on the ground and Select "Create" from the Pie Menu and Rez a Cube

[0010.0020] Tester 2: Open your Inventory, find and object that is transfer and copy

[0010.0030] Tester 2: Hold Left-click on the object and Hold Ctrl, and Drag the mouse over Tester 1:'s Cube and try and Drop the item onto the box.

[0010.0040] Tester 2: Verify you are blocked and you see the Cube Highlighted in Red with a Padlock

[0010.0050] Tester 1: Right-click on the Cube and Select Edit, Click "More >>" if necessary

[0010.0060] Tester 1: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] llAllowinventorydrop

[0010.0070] Tester 1: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0010.0080] Tester 2: Open your Inventory, find and object that is transfer and copy

[0010.0090] Tester 2: Hold Left-click on the object and Hold Ctrl, and Drag the mouse over Tester 1:'s Cube and try and Drop the item onto the box.

[0010.0100] Tester 2: Verify you are successful in dropping the item into Tester 1:'s Cube (the object will be highlighted red as you mouse over it but there should be no padlock)

[*]

[0020.0010] Tester 2: Right-click on the ground and Select "Create" from the Pie Menu and Rez a Cube

[0020.0020] Tester 1: Open your Inventory, find and object that is transfer but (no copy) if you don't have such an object have Tester 2: Create and object with such Permissions and Send it to you

[0020.0030] Tester 1: Hold Left-click on the object and Hold Ctrl, and Drag the mouse over Tester 2:'s Cube and try and Drop the item onto the box.

[0020.0040] Tester 1: Verify you are blocked and you see the Cube Highlighted in Red with a Padlock

[0020.0050] Tester 2: Right-click on the Cube and Select Edit, Click "More >>" if necessary

[0020.0060] Tester 2: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] llAllowinventorydrop

[0020.0070] Tester 2: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0020.0080] Tester 1: Open your Inventory, find and object that is transfer and copy

[0020.0090] Tester 1: Hold Left-click on the object and Hold Ctrl, and Drag the mouse over Tester 2:'s Cube and try and Drop the item onto the box.

[0020.0100] Tester 1: Verify you are successful in dropping the item into Tester 2:'s Cube (the object will be highlighted red as you mouse over it but there should be no padlock)

[*]

[0030.0010] Tester 1: Right-click on the Ground and Select "Create" from the Pie Menu and Rez 2 Cubes, call them "Sender" and "Receiver"

[0030.0020] Tester 1: Right-click on the "Receiver" cube and Select Edit, Click "More >>" if necessary

[0030.0030] Tester 1: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] Changedscript

[0030.0040] Tester 1: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0030.0050] Tester 1: Right-click on the "Sender" cube and Select Edit, Click "More >>" if necessary

[0030.0060] Tester 1: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] llGiveinventoryscript

[0030.0070] Tester 1: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0030.0080] Tester 1: Left-click on the Receiver Cube and Copy the Key is Chats

[0030.0090] Tester 1: Right-click on the "Sender" cube and Select Edit, Click "More >>" if necessary

[0030.0100] Tester 1: Click the Content Tab, and Open the Script, Replace the Key in the Script with the one you just copied

[0030.0110] Tester 1: Click "Save" then, Close the Script window.

[0030.0120] Tester 2: Right-click on the ground and "Create" a prim with no copy perms, "Take" it and send it to Tester 1:

[0030.0130] Tester 1: Look in your Inventory for the (no copy) Object from Tester 2:

[0030.0140] Tester 1: Left-click-ctrl drag it onto the "Sender" Prim or you can Drag it into the Content Folder

[0030.0150] Tester 1: Close any open Edit Windows

[0030.0160] Tester 1: Left-click the "Sender" Cube, you should hear a message from the "Receiver" prim

[0030.0170] Tester 1: Verify the no-copy object was removed from the Sender object and sent to the Receiver

[*]

[0040.0010] Tester 1: Right-click on the "Receiver" Prim and Select "Edit", Click the Contents Tab and Delete the "Object"

[0040.0020] Tester 1: Right-click on the "Receiver" Prim and Select "More > Attach > Left Hand"

[0040.0030] Tester 2: Send Tester 1: another Copy of the (no copy) "Object"

[0040.0040] Tester 1: Right-click and "Edit" the Sender Prim and Drag the (no copy) Object to the Contents

[0040.0050] Tester 1: Close the Edit window, then Left-click on the "Sender" Prim

[0040.0060] Tester 1: Verify you hear a message similar to "Unable to give inventory: Blocked by permissions"

[*]

[0050.0010] Tester 2: Right-click on the ground and "Create" a prim with no transfer perms, "Take" it and send it to Tester 1: (in next owner can tick copy and untick resell)

[0050.0020] Tester 1: Right-click and "Edit" the Sender Prim and Drag the (no transfer) Object to the Contents

[0050.0030] Tester 1: Close the Edit window, then Left-click on the "Sender" Prim

[0050.0040] Tester 1: Verify the "Sender" object cannot give a no-transfer object to the "Receiver" object attached to Tester 1: (but it did, then read the note)

[*]

[NOTE] You can give a no-transfer object to your attachment. You can then detach the attachment, and your attachment will continue to be transferable. If you give the attachment to another person, the no-transfer object will be stripped from the attachment, thus this isn't an exploit, merely unexpected behavior.

[*]

[0060.0010] Tester 2: Right-click on the Ground and Select "Create" from the Pie Menu and Rez a Cube, call it "Receiver"

[0060.0020] Tester 2: Right-click on the "Receiver" cube and Select Edit, Click "More >>" if necessary

[0060.0030] Tester 2: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] Changedscript

[0060.0040] Tester 2: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0060.0050] Tester 2: Left-click on the Receiver Cube and Copy the Key is Chats and pass it onto Tester 1:

[0060.0060] Tester 1: Right-click on the "Sender" cube and Select Edit, Click "More >>" if necessary

[0060.0070] Tester 1: Click the Content Tab, and Open the Script, Replace the Key in the Script with the one you just copied

[0060.0080] Tester 1: Click "Save" then, Close the Script window. Remove any objects in the contents.

[0060.0090] Tester 2: Right-click on the ground and "Create" a prim with no copy perms, "Take" it and send it to Tester 1:

[0060.0100] Tester 1: Look in your Inventory for the (no copy) Object from Tester 2:

[0060.0110] Tester 1: Left-click-ctrl drag it onto the "Sender" Prim or you can Drag it into the Content Folder

[0060.0120] Tester 1: Close any open Edit Windows

[0060.0130] Tester 1: Left-click the "Sender" Cube, you should hear a message from the "Receiver" prim

[0060.0140] Tester 1: Verify the no-copy object was removed from the Tester 1:'s Sender object and sent to the Tester 2:'s Receiver

[*]

[0070.0010] Tester 2: Right-click on the "Receiver" Prim and Select "Edit", Click the Contents Tab and Delete the "Object"

[0070.0020] Tester 2: Right-click on the "Receiver" Prim and Select "More > Attach > Left Hand"

[0070.0030] Tester 2: Send Tester 1: another Copy of the (no copy) "Object"

[0070.0040] Tester 1: Right-click and "Edit" the "Sender" Prim and Drag the (no copy) Object to the Contents

[0070.0050] Tester 1: Close the Edit window, then Left-click on the "Sender" Prim

[0070.0060] Tester 2: Verify you hear a message similar to "Unable to give inventory: Blocked by permissions"

[*]

[0080.0010] Tester 2: Right-click on the Attached "Receiver" prim and Select "Drop" from the Pie Menu

[0080.0020] Tester 2: Right-click on the ground and "Create" a prim with no transfer perms, "Take" it and send it to Tester 1: (in next owner can tick copy and untick resell)

[0080.0030] Tester 1: Right-click and "Edit" the Sender Prim and click the Contents Tab, Delete Any Objects

[0080.0040] Tester 1: Drag the (no transfer) Object to the Contents from your Inventory

[0080.0050] Tester 1: Close the Edit window, then Left-click on the "Sender" Prim

[0080.0060] Tester 2: Verify you hear a message similar to "Unable to give inventory: Blocked by permissions"

[*]

[0090.0010] Tester 2: Right-click on the "Receiver" Prim and Select "More > Attach > Left Hand"

[0090.0020] Tester 1: Left-click the "Sender" Cube, you should hear a message from the "Receiver" prim

[0090.0030] Tester 2: Verify you hear a message similar to "Unable to give inventory: Blocked by permissions"

[*]

[Object to Agent Transfer while Online and Offline]

[*]

[0100.0010] Tester 1: Right-click on the Ground and Select "Create" from the Pie Menu, Rez a prim Cube

[0100.0020] Tester 1: Right-click on the cube and Select Edit, Click "More >>" if necessary

[0100.0030] Tester 1: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] llGiveinventory

[0100.0040] Tester 1: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0100.0050] Tester 2: Right-click on the Ground and Select "Create" from the Pie Menu, Rez a prim Cube

[0100.0060] Tester 2: Right-click on the cube and Select Edit, Click "More >>" if necessary

[0100.0070] Tester 2: Click the Contents Tab, and Press the "New Script" Button, Copy and Paste the following script over the default script.

[SCRIPT] llDetectedkeyscript

[0100.0080] Tester 2: Once copied and Pasted, Click "Save" and Close the Script and Edit Windows.

[0100.0090] Tester 2: Right-click on the Ground and Select "Create" from the Pie Menu, Rez a prim Cube

[0100.0100] Tester 2: Right-click on the Cube and Select "Take" from the Pie Menu

[0100.0110] Tester 2: From your Inventory find the Object Taken and Pass 2 copies of it to Tester 1:

[0100.0120] Tester 1: Accept the Items.

[0100.0130] Tester 2: Touch your remaining Cube displaying "Touch to view your key..."

[0100.0140] Tester 1: Copy the Key that has been chatted by Tester 2:'s Cube

[0100.0150] Tester 1: Right-click on your cube and Select Edit, Click "More >>" if necessary

[0100.0160] Tester 1: Click the Contents Tab, double click on the Script to open it, locate the key in the script and paste the once that was chatted by Tester 2:'s box over it.

[0100.0170] Tester 1: Once Pasted, Click "Save" and Close the Script

[0100.0180] Tester 1: Open your Inventory, and Locate the cube "Object" sent by Tester 2:

[0100.0190] Tester 1: Copy 1 of them to the Contents of your Cube then Close the Edit Window.

[0100.0200] Tester 1: Left-click on your Cube.

[0100.0210] Tester 2: Verify you are offered an "Object", press "Keep"

[0100.0220] Tester 2: Open you Inventory, Locate the Object

[0100.0230] Tester 2: Verify the "Object" is listed as (no copy) (no modify)

[0100.0240] Tester 1: Right-click on your cube and Select Edit, Click "More >>" if necessary, Click the Content Tab

[0100.0250] Tester 1: Verify the Object placed previously has been Transferred and Removed

[0100.0260] Tester 1: Open your Inventory, and Locate the cube "Object" sent by Tester 2:

[0100.0270] Tester 1: Copy the other to the Contents of your Cube then Close the Edit Window.

[0100.0280] Tester 2: Logoff, wait 2 minutes and Logon again.

[0100.0290] Tester 1: When Tester 2: has logged off Left-click on the Cube again

[0100.0300] Tester 2: When you log back in Verify you are offered an "Object", Press Keep

[0100.0310] Tester 2: Open you Inventory, Locate the Object

[0100.0320] Tester 2: Verify the "Object" is listed as (no copy) (no modify)

[0100.0330] Tester 1: Right-click on your cube and Select Edit, Click "More >>" if necessary, Click the Content Tab

[0100.0340] Tester 1: Verify the Object placed previously has been Transferred and Removed

[0100.0350] Tester 1 & B: Delete any Prims.

[END]


[llAllowinventorydrop]

default 
{ 
state_entry() 
{ 
llAllowInventoryDrop(TRUE); 
} 
}


[llGiveinventoryscript]

//llGiveInventory 
default 
{ 
state_entry() 
{ 
llSay(0, "Hello, Avatar!"); 
integer allowdrop = TRUE; 
llAllowInventoryDrop(allowdrop); 
llSay(0, "llAllowInventoryDrop is "+(string)allowdrop); 
} 
touch_start(integer total_number) 
{ 
key destination = "c7a62f0f-b2f9-dc5e-6f6d-682df139c0f4"; 
llGiveInventory(destination, "Object"); 
} 
changed(integer change) 
{ 
if (change == CHANGED_INVENTORY) 
{ 
llSay(0, "CHANGED_INVENTORY"); 
} 
else if (change == CHANGED_ALLOWED_DROP) 
{ 
llSay(0, "CHANGED_ALLOWED_DROP"); 
} 
} 
}


[Changedscript]

// changed 
default 
{ 
state_entry() 
{ 
llSay(0, "Hello, Avatar!"); 
integer allowdrop = TRUE; 
llAllowInventoryDrop(allowdrop); 
llSay(0, "llAllowInventoryDrop is "+(string)allowdrop); 
} 
touch_start(integer total_number) 
{ 
llSay(0, "key is "+(string)llGetKey()); 
} 
changed(integer change) 
{ 
if (change == CHANGED_INVENTORY) 
{ 
llSay(0, "CHANGED_INVENTORY"); 
} 
else if (change == CHANGED_ALLOWED_DROP) 
{ 
llSay(0, "CHANGED_ALLOWED_DROP"); 
} 
} 
}


[llDetectedkeyscript]

default
{
    state_entry()
    {
        llSetText("Touch to view your key...", <1,1,1>, 1);
    }

    touch_start(integer total_number)
    {
        integer x;
        
        for (x = 0;x < total_number;x += 1)
        {
            llSay(0, "The key for " + llDetectedName(x) + " is "  + (string)llDetectedKey(x));
        }
    }
}