// osTeleportAgent Function Availability Tester // string FunctionName = "osTeleportAgent"; // to tell us which function we're probing string FunctionPermitted = "No"; integer checked = 0; // The default state uses the timer to call the OSSL function. If the function call fails, // the timer event handler will abend, but the script doesn't crash. default { state_entry() { llOwnerSay( "Checking to see if osTeleportAgent is available" ); llSetTimerEvent( 0.25 ); } timer() { if (checked == 1) { llSetTimerEvent( 0.0 ); state Running; } checked = 1; string BogusKey = "12345678-1234-1234-1234-123456789abc"; // it doesn't need to be valid osTeleportAgent( BogusKey, ZERO_VECTOR, ZERO_VECTOR ); // If we got here, then the timer() handler didn't crash, which means the function it checked for // was actually permitted. FunctionPermitted = "Yes"; llSetTimerEvent( 0.0 ); // stop the timer state Running; // } } state Running { state_entry() { llOwnerSay( "Results: "+ FunctionPermitted); } }