LlGetAgentInfo Test

[LLGetAgentInfoTest]
[VERSION] 0.1
[LENGTH] 00:30
[TESTERS] 1
[OVERVIEW] This test has been designed to test the functionality of the llGetAgentInfo LSL 
function.
[SETUP] 1 tester, Rezzable Sim with telehub, and another Sim bordering it. Also a sim to Teleport to.
[*]
[0010] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take 
Off > Detach All)
[0020] Locate youself in a Telehub Sim, on the border with another sim but don't cross 
over.
[0030] Right-click on the ground, then select CREATE and rez a default cube prim called 
agentinfo in the sim you are in.
[0040] Right-click on the Cube, then select Edit.
[0050] In the Edit Window, select the Content Tab.
[0060] In the Content Window, Click "New Script"
[0070] In the Script window, copy and paste the following script replacing any original 
script and then select "Save". Wait for it to compile and save, Then Close Script Window.
[SCRIPT] llGetAgentInfoScript
[0080] Verify "New Script" appears in the Contents List
[0090] Close the Edit Window
[*]
[0100] Press the "Home" Key (or "F" with Chat Button turned off) to Enable Flying.
[0110] Verify you hear AGENT_FLYING and AGENT_IN_AIR started.
[0120] Fly around a little bit but do Not leave the sim, approach the Prim and land close 
by it.
[0130] Verify you hear AGENT_FLYING and AGENT_IN_AIR ended.
[0140] Press the "PG UP" Key (or "E" with Chat Button turned off) to Jump.
[0150] Verify you hear AGENT_IN_AIR started only when you jump.
[0160] Verify you hear AGENT_IN_AIR ended only when you land from jump.
[0170] Right-click on the ground, then select CREATE and Rez a cube called nonscript, 
Right Click on it Select More > Attach > Left Hand
[0180] Verify you hear AGENT_ATTACHMENT started
[0190] Right-click on the ground, then select CREATE and Rez a cube, call it scriptprim.
[0200] Right-click on the Cube, then select Edit.
[0210] In the Edit Window, select the Content Tab.
[0220] In the Content Window, Click "New Script"
[0230] In the Script window select "Save". Wait for it to compile and save, Then Close 
Script Window.
[0240] Verify "New Script" appears in the Contents List
[0250] Close the Edit Window
[0260] Right Click on this scriptprim, Select More > Attach > Right Hand
[0270] Verify you hear AGENT_SCRIPTED started
[0280] Click View > Mouselook (or Press M with Chat Button turned off)
[0290] Verify you hear AGENT_MOUSELOOK started
[0300] Leave Mouselook
[0310] Verify you hear AGENT_MOUSELOOK ended
[0320] Right click on the land near to the original box and Select "Sit Here".
[0330] As soon as your sat, Verify you hear AGENT_SITTING started.
[0340] Click "Stand up" on your screen
[0350] Verify you hear AGENT_SITTING ended
[*]
[NOTE] As your Sitting on Land it should NOT say your sitting on an object too.
[*]
[0360] Right-click on the ground, then select CREATE and Rez a cube
[0370] Right-click on the cube, select "Sit Here"
[0380] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT started.
[0390] Click Stand up on your screen
[0380] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT ended.
[0390] Click World Menu and Set Away
[0400] Verify you hear AGENT_AWAY started
[0410] Bring yourself back from Away
[0420] Verify you hear AGENT_AWAY ended
[0430] Walk around the box abit but dont leave the sim or stop moving
[0440] Verify you hear AGENT_WALKING started
[0450] Stop walking
[0460] Verify you hear AGENT_WALKING ended
[0470] Type some text in the chat box (so that your avatar does the typing animation)
[0480] Verify you hear AGENT_TYPING started
[0490] And when you finish typing
[0500] Verify you hear AGENT_TYPING ended
[0510] Press and Hold the "PG Down" (or C with Chat Button turned off)
[0520] Verify you hear AGENT_CROUCHING started
[0530] Release the key
[0540] Verify you hear AGENT_CROUCHING ended
[0550] Set you Avatar to Busy, Click World, Set Busy (and acknowledge the dialog)
[0560] Verify you hear AGENT_BUSY started
[0570] Set you Avatar Not Busy
[0580] Verify you hear AGENT_BUSY ended
[0590] Click World > Always Run or Ctrl R
[0600] Verify you hear AGENT_ALWAYS_RUN started
[0610] Click World > Always Run or Ctrl R again
[0620] Verify you hear AGENT_ALWAYS_RUN ended
[*]
[NOTE] This LSL Command Should only Work with the agent in the same simulator as the 
script.
[*]
[0630] Walk a Short Distance across the sim border.
[0640] Verify you heard AGENT_WALKING started
[0650] But as soon as you left the sim and stopped walking
[0660] Verify you heard all the following, AGENT_WALKING, AGENT_SCRIPTED, 
AGENT_ATTACHMENTS stopped.
[0670] Try any method before to get a reation from the script, typing, sitting, busy, flying without crossing the sim border
[0680] Verify you couldnt get a response from the script.
[0690] Turn around and walk back towards your start point.
[0700] Verify you hear the following as you cross the sim border, AGENT_WALKING, 
AGENT_SCRIPTED, AGENT_ATTACHMENTS started.
[0710] Verify when you stop walking you also hear AGENT_WALKING stopped.
[*]
[Sit Testing]
[*]
[0720] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take 
Off > Detach All)
[0730] Right-click on the ground, then select CREATE and Rez a cube
[0740] Right-click on the cube, select "Sit Here"
[0750] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT started.
[0760] Look in your Inventory > Objects for the Two Prims you just Detatched, one is 
called nonscript the other scriptprim, Right Click on nonscript, Select Attach To, Select 
Left Hand
[0770] Verify you hear AGENT_ATTACHMENT started
[0780] Look in your Inventory > Objects for the Two Prims you just Detatched, one is 
called nonscript the other scriptprim, Right Click on scriptprim, Select Attach To, Select 
Right Hand
[0790] Verify you hear AGENT_SCRIPTED started
[0800] Click View > Mouselook (or Press M with Chat Button turned off)
[0810] Verify you hear AGENT_MOUSELOOK started
[0820] Leave Mouselook
[0830] Verify you hear AGENT_MOUSELOOK ended
[0840] Click World Menu and Set Away
[0850] Verify you hear AGENT_AWAY started
[0860] Bring yourself back from Away
[0870] Verify you hear AGENT_AWAY ended
[0880] Type some text in the chat box (so that your avatar does the typing animation)
[0890] Verify you hear AGENT_TYPING started
[0900] And when you finish typing
[0910] Verify you hear AGENT_TYPING ended
[0920] Press and Hold the "PG Down" (or C with Chat Button turned off)
[0930] Set you Avatar to Busy, Click World, Set Busy (and acknowledge the dialog)
[0940] Verify you hear AGENT_BUSY started
[0950] Set you Avatar Not Busy
[0960] Verify you hear AGENT_BUSY ended
[0970] Click World > Always Run or Ctrl R
[0980] Verify you hear AGENT_ALWAYS_RUN started
[0990] Click World > Always Run or Ctrl R again
[1000] Verify you hear AGENT_ALWAYS_RUN ended
[1010] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take 
Off > Detach All)
[1020] Verify you hear both AGENT_ATTACHMENTS and AGENT_SCRIPTED ended
[1030] Click Stand up on your screen
[1040] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT ended.
[*]
[Teleporting Out and In]
[*]
[1050] With your Attachments still Removed, Teleport Out of the Sim and then Teleport Back 
to the Originating Sim.
[1060] Position yourself in your work area, near the agentinfo prim you created at the 
start of the test.
[1070] Press the "Home" Key (or "F" with Chat Button turned off) to Enable Flying.
[1080] Verify you hear AGENT_FLYING and AGENT_IN_AIR started.
[1090] Fly around a little bit but do Not leave the sim, approach the Prim and land close 
by it.
[1100] Verify you hear AGENT_FLYING and AGENT_IN_AIR ended.
[1110] Press the "PG UP" Key (or "E" with Chat Button turned off) to Jump.
[1120] Verify you hear AGENT_IN_AIR started only when you jump.
[1130] Verify you hear AGENT_IN_AIR ended only when you land from jump.
[1140] Look in your Inventory > Objects for the Two Prims you just Detatched, one is 
called nonscript the other scriptprim, Right Click on nonscript, Select Attach To, Select 
Left Hand
[1150] Verify you hear AGENT_ATTACHMENT started
[1160] Look in your Inventory > Objects for the Two Prims you just Detatched, one is 
called nonscript the other scriptprim, Right Click on scriptprim, Select Attach To, Select 
Right Hand
[1170] Verify you hear AGENT_SCRIPTED started
[1180] Click View > Mouselook (or Press M with Chat Button turned off)
[1190] Verify you hear AGENT_MOUSELOOK started
[1200] Leave Mouselook
[1210] Verify you hear AGENT_MOUSELOOK ended
[1220] Right click on the land near to the original box and Select "Sit Here".
[1230] As soon as your sat, Verify you hear AGENT_SITTING started.
[1240] Click "Stand up" on your screen
[1250] Verify you hear AGENT_SITTING ended
[1260] Right-click on the ground, then select CREATE and Rez a cube
[1270] Right-click on the cube, select "Sit Here"
[1280] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT started.
[1290] Click Stand up on your screen
[1300] Verify you hear both, AGENT_SITTING and AGENT_ON_OBJECT ended.
[1310] Click World Menu and Set Away
[1320] Verify you hear AGENT_AWAY started
[1330] Bring yourself back from Away
[1340] Verify you hear AGENT_AWAY ended
[1350] Walk around the box abit but dont leave the sim or stop moving
[1360] Verify you hear AGENT_WALKING started
[1370] Stop walking
[1380] Verify you hear AGENT_WALKING ended
[1390] Type some text in the chat box (so that your avatar does the typing animation)
[1400] Verify you hear AGENT_TYPING started
[1410] And when you finish typing
[1420] Verify you hear AGENT_TYPING ended
[1430] Press and Hold the "PG Down" (or C with Chat Button turned off)
[1440] Verify you hear AGENT_CROUCHING started
[1450] Release the key
[1460] Verify you hear AGENT_CROUCHING ended
[1470] Set you Avatar to Busy, Click World, Set Busy (and acknowledge the dialog)
[1480] Verify you hear AGENT_BUSY started
[1490] Set you Avatar Not Busy
[1500] Verify you hear AGENT_BUSY ended
[1510] Click World > Always Run or Ctrl R
[1520] Verify you hear AGENT_ALWAYS_RUN started
[1530] Click World > Always Run or Ctrl R again
[1540] Verify you hear AGENT_ALWAYS_RUN ended
[1550] Remove all your Attachments and Scripted Attachments (Right Click Yourself > Take 
Off > Detach All)
[1560] Verify you hear both AGENT_ATTACHMENTS and AGENT_SCRIPTED ended
[1570] All Done, Clean Up your Workspace.
[END]
[llGetAgentInfoScript]
integer info; 
integer lastinfo; 
integer diffinfo; 
default 
{ 
 state_entry() 
 { 
 llSetTimerEvent(0.1); 
 } 
 timer() 
 { 
 lastinfo = info; 
 info = llGetAgentInfo(llGetOwner()); 
 diffinfo = lastinfo ^ info; 
 if (diffinfo & AGENT_ATTACHMENTS) 
 { 
 if (info & AGENT_ATTACHMENTS) 
 { 
 llSay(0,"AGENT_ATTACHMENTS started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_ATTACHMENTS ended"); 
 } 
 }
 if (diffinfo & AGENT_AWAY)
 {
 if (info & AGENT_AWAY) 
 { 
 llSay(0,"AGENT_AWAY started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_AWAY ended"); 
 } 
 } 
 if (diffinfo & AGENT_FLYING) 
 { 
 if (info & AGENT_FLYING) 
 { 
 llSay(0,"AGENT_FLYING started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_FLYING ended"); 
 } 
 } 
 if (diffinfo & AGENT_MOUSELOOK) 
 { 
 if (info & AGENT_MOUSELOOK) 
 { 
 llSay(0,"AGENT_MOUSELOOK started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_MOUSELOOK ended"); 
 } 
 } 
 if (diffinfo & AGENT_WALKING) 
 { 
 if (info & AGENT_WALKING) 
 { 
 llSay(0,"AGENT_WALKING started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_WALKING ended"); 
 } 
 } 
 if (diffinfo & AGENT_SCRIPTED) 
 { 
 if (info & AGENT_SCRIPTED) 
 { 
 llSay(0,"AGENT_SCRIPTED started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_SCRIPTED ended"); 
 } 
 } 
 if (diffinfo & AGENT_SITTING) 
 { 
 if (info & AGENT_SITTING) 
 { 
 llSay(0,"AGENT_SITTING started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_SITTING ended"); 
 } 
 } 
 if (diffinfo & AGENT_ON_OBJECT) 
 { 
 if (info & AGENT_ON_OBJECT) 
 { 
 llSay(0,"AGENT_ON_OBJECT started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_ON_OBJECT ended"); 
 } 
 } 
 if (diffinfo & AGENT_IN_AIR) 
 { 
 if (info & AGENT_IN_AIR) 
 { 
 llSay(0,"AGENT_IN_AIR started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_IN_AIR ended"); 
 } 
 } 
 if (diffinfo & AGENT_TYPING) 
 { 
 if (info & AGENT_TYPING) 
 { 
 llSay(0,"AGENT_TYPING started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_TYPING ended"); 
 } 
 } 
 if (diffinfo & AGENT_CROUCHING) 
 { 
 if (info & AGENT_CROUCHING) 
 { 
 llSay(0,"AGENT_CROUCHING started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_CROUCHING ended"); 
 } 
 } 
 if (diffinfo & AGENT_BUSY) 
 { 
 if (info & AGENT_BUSY) 
 { 
 llSay(0,"AGENT_BUSY started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_BUSY ended"); 
 } 
 } 
 if (diffinfo & AGENT_ALWAYS_RUN) 
 { 
 if (info & AGENT_ALWAYS_RUN) 
 { 
 llSay(0,"AGENT_ALWAYS_RUN started"); 
 } 
 else 
 { 
 llSay(0,"AGENT_ALWAYS_RUN ended"); 
 } 
 } 
 } 
}
Category:QA Portal
Category:Quality Assurance