<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Crymysyn+Moonbeam</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Crymysyn+Moonbeam"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Crymysyn_Moonbeam"/>
	<updated>2026-06-22T05:49:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlDialog&amp;diff=1189596</id>
		<title>LlDialog</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlDialog&amp;diff=1189596"/>
		<updated>2014-04-19T22:33:40Z</updated>

		<summary type="html">&lt;p&gt;Crymysyn Moonbeam: added haiku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func=llDialog&lt;br /&gt;
|sort=Dialog&lt;br /&gt;
|func_id=247|func_sleep=1.0|func_energy=10.0&lt;br /&gt;
|inject-2=&lt;br /&gt;
{{Issues/VWR-17064}}&lt;br /&gt;
{{Issues/VWR-14537}}&lt;br /&gt;
{{Issues/SVC-1815}}&lt;br /&gt;
{{Issues/SCR-43}}&lt;br /&gt;
{{LSL_Function/avatar|avatar|sim=*}}&lt;br /&gt;
{{LSL_Function/chat|channel|message|dialog=dialog box}}&lt;br /&gt;
|p1_type=key|p1_name=avatar|p1_desc&lt;br /&gt;
|p2_type=string|p2_name=message|p2_desc&lt;br /&gt;
|p3_type=list|p3_name=buttons|p3_desc=button labels&lt;br /&gt;
|p4_type=integer|p4_name=channel|p4_desc&lt;br /&gt;
|func_desc=Shows a dialog box in the lower right corner of the {{LSLP|avatar}}&#039;s screen (upper right in Viewer 1.x) with a {{LSLP|message}} and choice {{LSLP|buttons}}, as well as an ignore button. This has many uses ranging from simple message delivery to complex menu systems.&lt;br /&gt;
|func_footnote=When a button is pressed, the {{LSLP|avatar}} says the text of the button label on {{LSLP|channel}}.&amp;lt;br/&amp;gt;The position where the chat is generated is where the root prim of the dialog generating object was when the dialog button was pressed.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*This function &#039;&#039;&#039;only&#039;&#039;&#039; opens a dialog box. The script must then also register a listener on the same &#039;&#039;channel&#039;&#039; using [[llListen]] and have a [[listen]] event handler to receive the response.&lt;br /&gt;
*There is no way by script to kill a dialog box.&lt;br /&gt;
*There is no way for the script to detect if the user clicked the small &amp;lt;code&amp;gt;[&amp;quot;Ignore&amp;quot;]&amp;lt;/code&amp;gt; button (no chat is generated as a result of pressing this button).&lt;br /&gt;
*There is no way to distinguish the input from a dialog box and regular chat made by the same user.&lt;br /&gt;
**It is important to expect that the response may not be one of the buttons.&lt;br /&gt;
*In most cases, the listener will be in the same script as the llDialog, however if not, the distance between the root prim of the [[listen]]ing object and the dialog generating prim becomes a factor. If this distance is greater than 20 meters when a button is pressed, the response will not be heard. See [[#Limits]].&lt;br /&gt;
**This limitation affects attachments too if the wearer moves more than 20 meters from where the listener is located. See [[#Limits]].&lt;br /&gt;
**If the [[listen]]er resides in the same script that created the dialog, then the dialog button is heard sim-wide.&lt;br /&gt;
----&lt;br /&gt;
*The &#039;&#039;&#039;dialog response&#039;&#039;&#039; (the generated chat) has its in world location at the &#039;&#039;&#039;root prim&#039;s global position&#039;&#039;&#039;.&lt;br /&gt;
: It can generate a listen event within 20 meters from that position.&lt;br /&gt;
*The listening location for a child prim in the object is either at the child prim&#039;s location or at the root prim&#039;s location&lt;br /&gt;
: see bugtrace JIRA [https://jira.secondlife.com/browse/SCR-43 SCR-43]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;tt&amp;gt;message&amp;lt;/tt&amp;gt; limits===&lt;br /&gt;
*{{LSLP|message}} must be fewer than 512 bytes in length and be not empty. If it is empty, [[llDialog]] will shout &amp;lt;code&amp;gt;&amp;quot;[[llDialog]]: must supply a message&amp;quot;&amp;lt;/code&amp;gt; on the [[DEBUG_CHANNEL]]. If you want to create an empty message, however, you can do it legally by using a line feed as your message, as in  &amp;lt;lsl&amp;gt;llDialog(avatar_key,&amp;quot; \n&amp;quot;,button_list,dialog_channel);&amp;lt;/lsl&amp;gt; If the message length is greater than or equal to 512 bytes, it shouts (again on the [[DEBUG_CHANNEL|debug channel]]): &amp;lt;code&amp;gt;&amp;quot;[[llDialog]]: message too long, must be less than 512 characters&amp;quot;&amp;lt;/code&amp;gt;; in both instances, the dialog box will not be created for {{LSLP|avatar}}.&lt;br /&gt;
*The client only displays 8 lines of {{LSLP|message}}. If it is longer, the dialog has a scroll bar. See [[#Appearance]].&lt;br /&gt;
Note: this should be 7 lines in message; one of the 8 lines is the owner and name of the object.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;tt&amp;gt;buttons&amp;lt;/tt&amp;gt; limits===&lt;br /&gt;
*If {{LSLP|buttons}} is an empty list, it will default to as if it were &amp;lt;code&amp;gt;[&amp;quot;OK&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
*If a button is named &amp;lt;code&amp;gt;[&amp;quot;Ignore&amp;quot;]&amp;lt;/code&amp;gt;, it will behave like the small &amp;lt;code&amp;gt;[&amp;quot;Ignore&amp;quot;]&amp;lt;/code&amp;gt; button of the menu (i.e. pressing it will &#039;&#039;&#039;not&#039;&#039;&#039; get &amp;lt;code&amp;gt;[&amp;quot;Ignore&amp;quot;]&amp;lt;/code&amp;gt; sent to the menu channel). If you need an &amp;lt;code&amp;gt;[&amp;quot;Ignore&amp;quot;]&amp;lt;/code&amp;gt; button in your menu and wish to have its name sent back to the script when you press it, then use spaces in the button name (e.g. &amp;lt;code&amp;gt;[&amp;quot; Ignore &amp;quot;]&amp;lt;/code&amp;gt;).&lt;br /&gt;
*An error will be shouted on [[DEBUG_CHANNEL]], if...&lt;br /&gt;
**there are more than 12 buttons.&lt;br /&gt;
**any list item is not a string.&lt;br /&gt;
**any list item string length (measured in bytes, using UTF-8 encoding) is zero or greater than 24.&lt;br /&gt;
***In other words, a button&#039;s text when encoded as UTF-8 cannot be longer than 24 bytes or a empty string.&lt;br /&gt;
***This snippet can be used to truncate the string without giving an error: &amp;lt;code&amp;gt;[[llBase64ToString]]([[llGetSubString]]([[llStringToBase64]](theString), 0, 31))&amp;lt;/code&amp;gt;&lt;br /&gt;
*The client will not display all the characters of a button if the text is wider than the text space of the button. See [[#Appearance]].&lt;br /&gt;
*If the script generates button labels from outside sources like inventory or object names, take care to avoid the special string &amp;lt;code&amp;gt;&amp;quot;!!llTextBox!!&amp;quot;&amp;lt;/code&amp;gt;. This text, in button 0, will cause [[llDialog]] to behave as [[llTextBox]] instead.&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// When the prim is touched, give the toucher the option of killing the prim.&lt;br /&gt;
&lt;br /&gt;
integer gListener;     // Identity of the listener associated with the dialog, so we can clean up when not needed&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        // Kill off any outstanding listener, to avoid any chance of multiple listeners being active&lt;br /&gt;
        llListenRemove(gListener);&lt;br /&gt;
        // get the UUID of the person touching this prim&lt;br /&gt;
        key user = llDetectedKey(0);&lt;br /&gt;
        // Listen to any reply from that user only, and only on the same channel to be used by llDialog&lt;br /&gt;
        // It&#039;s best to set up the listener before issuing the dialog&lt;br /&gt;
        gListener = llListen(-99, &amp;quot;&amp;quot;, user, &amp;quot;&amp;quot;);&lt;br /&gt;
        // Send a dialog to that person. We&#039;ll use a fixed negative channel number for simplicity&lt;br /&gt;
        llDialog(user, &amp;quot;\nDo you wish this prim to die?&amp;quot;, [&amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot; ] , -99);&lt;br /&gt;
        // Start a one-minute timer, after which we will stop listening for responses&lt;br /&gt;
        llSetTimerEvent(60.0);&lt;br /&gt;
    }&lt;br /&gt;
    listen(integer chan, string name, key id, string msg)&lt;br /&gt;
    {&lt;br /&gt;
        // If the user clicked the &amp;quot;Yes&amp;quot; button, kill this prim.&lt;br /&gt;
        if (msg == &amp;quot;Yes&amp;quot;)&lt;br /&gt;
            llDie();&lt;br /&gt;
        // The user did not click &amp;quot;Yes&amp;quot; ...&lt;br /&gt;
        // Make the timer fire immediately, to do clean-up actions&lt;br /&gt;
        llSetTimerEvent(0.1);        &lt;br /&gt;
    }&lt;br /&gt;
    timer()&lt;br /&gt;
    {&lt;br /&gt;
        // Stop listening. It&#039;s wise to do this to reduce lag&lt;br /&gt;
        llListenRemove(gListener);&lt;br /&gt;
        // Stop the timer now that its job is done&lt;br /&gt;
        llSetTimerEvent(0.0);// you can use 0 as well to save memory&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
{{LSL Tip|Please make sure that you close open listeners where possible. You&#039;ll make the Second Life experience so much better when paying attention to details here.}}&lt;br /&gt;
{{LSL Tip|There are no built-in submenus nor pagination (like in a list with &amp;quot;previous&amp;quot; and &amp;quot;next&amp;quot;) when using [[llDialog]]. You simply get one page with a max of 12 buttons, that&#039;s it. If you want a different dialog menu layout (other info and/or other buttons), you&#039;ll have to build that functionality into your script as the example below demonstrates. }}&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string mainMenuDialog = &amp;quot;\nWhich settings would you like to access?\nClick \&amp;quot;Close\&amp;quot; to close the menu.\n\nYou are here:\nMainmenu&amp;quot;;&lt;br /&gt;
list mainMenuButtons = [&amp;quot;sub 01&amp;quot;, &amp;quot;sub 02&amp;quot;, &amp;quot;Close&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string subMenu_01_Dialog = &amp;quot;\nClick \&amp;quot;Close\&amp;quot; to close the menu.\nClick \&amp;quot;-Main-\&amp;quot; to return to the main menu.\n\nYou are here:\nMainmenu &amp;gt; sub 01&amp;quot;;&lt;br /&gt;
list subMenu_01_Buttons = [&amp;quot;action 01a&amp;quot;, &amp;quot;action 01b&amp;quot;, &amp;quot;Close&amp;quot;, &amp;quot;-Main-&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string subMenu_02_Dialog = &amp;quot;\nClick \&amp;quot;Close\&amp;quot; to close the menu.\nClick \&amp;quot;-Main-\&amp;quot; to return to the main menu.\n\nYou are here:\nMainmenu &amp;gt; sub 02&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
list subMenu_02_Buttons = [&amp;quot;action 02a&amp;quot;, &amp;quot;action 02b&amp;quot;, &amp;quot;Close&amp;quot;, &amp;quot;-Main-&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
integer dialogChannel;&lt;br /&gt;
integer dialogHandle;&lt;br /&gt;
&lt;br /&gt;
open_menu(key inputKey, string inputString, list inputList)&lt;br /&gt;
{&lt;br /&gt;
    dialogChannel = (integer)llFrand(DEBUG_CHANNEL)*-1;&lt;br /&gt;
    dialogHandle = llListen(dialogChannel, &amp;quot;&amp;quot;, inputKey, &amp;quot;&amp;quot;);&lt;br /&gt;
    llDialog(inputKey, inputString, inputList, dialogChannel);&lt;br /&gt;
    llSetTimerEvent(30.0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
close_menu()&lt;br /&gt;
{&lt;br /&gt;
    llSetTimerEvent(0.0);// you can use 0 as well to save memory&lt;br /&gt;
    llListenRemove(dialogHandle);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    on_rez(integer start_param)&lt;br /&gt;
    {&lt;br /&gt;
        llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        key id = llDetectedKey(0);&lt;br /&gt;
        // Ensure any outstanding listener is removed before creating a new one&lt;br /&gt;
        close_menu();&lt;br /&gt;
        open_menu(id, mainMenuDialog, mainMenuButtons);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    listen(integer channel, string name, key id, string message)&lt;br /&gt;
    {&lt;br /&gt;
        if(channel != dialogChannel)&lt;br /&gt;
            return;&lt;br /&gt;
&lt;br /&gt;
        close_menu();&lt;br /&gt;
&lt;br /&gt;
        if(message == &amp;quot;-Main-&amp;quot;)&lt;br /&gt;
            open_menu(id, mainMenuDialog, mainMenuButtons);&lt;br /&gt;
&lt;br /&gt;
        else if(message == &amp;quot;sub 01&amp;quot;)&lt;br /&gt;
            open_menu(id, subMenu_01_Dialog, subMenu_01_Buttons);&lt;br /&gt;
&lt;br /&gt;
        else if(message == &amp;quot;sub 02&amp;quot;)&lt;br /&gt;
            open_menu(id, subMenu_02_Dialog, subMenu_02_Buttons);&lt;br /&gt;
&lt;br /&gt;
        else if (message == &amp;quot;action 01a&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            //do something&lt;br /&gt;
            open_menu(id, subMenu_01_Dialog, subMenu_01_Buttons);&lt;br /&gt;
        }&lt;br /&gt;
        else if (message == &amp;quot;action 01b&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            //do something else&lt;br /&gt;
&lt;br /&gt;
            //maybe not re-open the menu for this option?&lt;br /&gt;
            //open_menu(id, subMenu_01_Dialog, subMenu_01_Buttons);&lt;br /&gt;
        }&lt;br /&gt;
        else if (message == &amp;quot;action 02a&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            //do something&lt;br /&gt;
            open_menu(id, subMenu_02_Dialog, subMenu_02_Buttons);&lt;br /&gt;
        }&lt;br /&gt;
        else if (message == &amp;quot;action 02b&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            //do something else&lt;br /&gt;
            open_menu(id, subMenu_02_Dialog, subMenu_02_Buttons);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    timer()&lt;br /&gt;
    {&lt;br /&gt;
        close_menu();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers=&amp;lt;lsl&amp;gt;//Compact function to put buttons in &amp;quot;correct&amp;quot; human-readable order&lt;br /&gt;
integer channel;&lt;br /&gt;
&lt;br /&gt;
list order_buttons(list buttons)&lt;br /&gt;
{&lt;br /&gt;
    return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4)&lt;br /&gt;
         + llList2List(buttons, -9, -7) + llList2List(buttons, -12, -10);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {   // Create random channel within range [-1000000000,-2000000000]&lt;br /&gt;
	channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);&lt;br /&gt;
&lt;br /&gt;
	llListen(channel,&amp;quot;&amp;quot;, &amp;quot;&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
	&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        llDialog(llDetectedKey(0),&amp;quot;\nPlease choose an option:\n&amp;quot;,&lt;br /&gt;
	    order_buttons([&amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot;, &amp;quot;4&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;6&amp;quot;, &amp;quot;7&amp;quot;, &amp;quot;8&amp;quot;, &amp;quot;9&amp;quot;, &amp;quot;10&amp;quot;]),channel);&lt;br /&gt;
    }&lt;br /&gt;
	&lt;br /&gt;
    listen(integer _chan, string _name, key _id, string _option)&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, _name + &amp;quot; selected option &amp;quot; + _option);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
list make_ordered_buttons(integer input)&lt;br /&gt;
{&lt;br /&gt;
    string output;&lt;br /&gt;
&lt;br /&gt;
    if      (input == 12) output = &amp;quot;10, 11, 12, 7, 8, 9, 4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 11) output = &amp;quot;10, 11, 7, 8, 9, 4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 10) output = &amp;quot;10, 7, 8, 9, 4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 9)  output = &amp;quot;7, 8, 9, 4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 8)  output = &amp;quot;7, 8, 4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 7)  output = &amp;quot;7, 4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 6)  output = &amp;quot;4, 5, 6, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 5)  output = &amp;quot;4, 5, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 4)  output = &amp;quot;4, 1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 3)  output = &amp;quot;1, 2, 3&amp;quot;;&lt;br /&gt;
    else if (input == 2)  output = &amp;quot;1, 2&amp;quot;;&lt;br /&gt;
    else if (input == 1)  output = &amp;quot;1&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
//  when we want to return [] avoid returning [&amp;quot;&amp;quot;] here&lt;br /&gt;
&lt;br /&gt;
    if (output == &amp;quot;&amp;quot;) return [];&lt;br /&gt;
/*  else convert output */      return llCSV2List(output);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//  Usage:&lt;br /&gt;
&lt;br /&gt;
llDialog(id, &amp;quot;dialog message&amp;quot;, make_ordered_buttons(5), -37812);&lt;br /&gt;
&lt;br /&gt;
//  Output:&lt;br /&gt;
&lt;br /&gt;
//    -     -     -&lt;br /&gt;
//    -     -     -&lt;br /&gt;
//    -   [ 4 ] [ 5 ]&lt;br /&gt;
//  [ 1 ] [ 2 ] [ 3 ]&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Helper Functions ===&lt;br /&gt;
{{{!}}&lt;br /&gt;
{{LSL DefineRow||[[User:Void_Singer/Functions#uDlgBtnPagList|uDlgBtnPagList]]|Compact Pagination for [[llDialog]] lists, remenu, and multi-user support}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
|constants={{#vardefine:constants_nb}}&lt;br /&gt;
{{{!}}&lt;br /&gt;
{{!}}- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
{{!}}&lt;br /&gt;
{{{!}}{{Prettytable|style=margin-top:0;}}&lt;br /&gt;
{{!}}-{{Hl2}}&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; {{!}} Button Order&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}9&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
{{!}}10&lt;br /&gt;
{{!}}11&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}6&lt;br /&gt;
{{!}}7&lt;br /&gt;
{{!}}8&amp;amp;nbsp;&amp;amp;nbsp;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}3&lt;br /&gt;
{{!}}4&lt;br /&gt;
{{!}}5&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}0&lt;br /&gt;
{{!}}1&lt;br /&gt;
{{!}}2&lt;br /&gt;
{{!}}}&lt;br /&gt;
{{!}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
|related&lt;br /&gt;
|notes=&lt;br /&gt;
To use dialog boxes to make menu systems, see [[Dialog Menus|Dialog Menus: A step by step guide]] (aimed at learners).&lt;br /&gt;
&lt;br /&gt;
===Tips===&lt;br /&gt;
It is a good idea to use a very negative channel (if never more negative than the most negative 32-bit integer that is -2,147,483,648), &#039;&#039;e.g.&#039;&#039;,&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Create random channel within range [-1000000000,-2000000000]&lt;br /&gt;
integer channel = (integer)(llFrand(-1000000000.0) - 1000000000.0);&lt;br /&gt;
&lt;br /&gt;
llDialog(llDetectedKey(0), &amp;quot;Please choose one of the below options:&amp;quot;,&lt;br /&gt;
    [&amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;], channel);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
Negative channels are popular for script communications because the standard SL client is unable to chat directly on those channels. The only way to do so prior to [[llTextBox]] was to use [[llDialog]] which was limited to 24 bytes. (Several third party viewers can access them from the chat bar.)&lt;br /&gt;
&lt;br /&gt;
You can be reasonably confident that all of your scripted objects have a unique chat channel with this small function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer dialog_channel; // top of script in variables&lt;br /&gt;
&lt;br /&gt;
integer channel() { // top of script in functions&lt;br /&gt;
    return (integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)llGetKey(),-8,-1));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
dialog_channel = channel(); // somewhere in actual script execution, such as state_entry()&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Since this function uses public information to generate the channel number it should by no means considered secret.&lt;br /&gt;
&lt;br /&gt;
The preceding code can produce both positive and negative channels, depending on the 8th to last character of the key.&lt;br /&gt;
The following examples will always produce negative channels:-&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
    gChannel = 0x80000000 | (integer)(&amp;quot;0x&amp;quot;+(string)llGetKey());&lt;br /&gt;
    gChannel = 0x80000000 | (integer)(&amp;quot;0x&amp;quot;+(string)llGetOwner());&lt;br /&gt;
&amp;lt;/lsl&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This next version returns a channel number between -1073741823 (0xBFFFFFFF) and -2147483648 (0x80000000).  It is also only one line of code.&lt;br /&gt;
&amp;lt;lsl&amp;gt;privchan = ((integer)(&amp;quot;0x&amp;quot;+llGetSubString((string)llGetKey(),-8,-1)) &amp;amp; 0x3FFFFFFF) ^ 0xBFFFFFFF;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Appearance===&lt;br /&gt;
&lt;br /&gt;
If {{LSLP|message}} requires more than 8 lines, a vertical scroll bar will appear in the dialog.&lt;br /&gt;
: In viewer 3 there is no scroll bar, only the 512 chars message limit is effective, so you may show more than 40 short lines in the message&lt;br /&gt;
: Too many lines will hide some of the buttons or all of them outside the window though&lt;br /&gt;
&lt;br /&gt;
The message text can be formatted somewhat using &amp;quot;\n&amp;quot; (for newline) and &amp;quot;\t&amp;quot; (for tab). If URLs are in the text, they will appear as clickable links, and some [[Viewer URI Name Space|viewer application URLs]] will receive special formatting. (Clickable links were not available before Viewer 2.) You can do nothing though to influence the font face, size or weight.&lt;br /&gt;
&lt;br /&gt;
There is no way to change the actual size of the dialog, nor change its color.&lt;br /&gt;
&lt;br /&gt;
The average number of characters that can be displayed on a dialog line is about 35 characters per line in ASCII7 characters. It depends upon the width of the characters, the viewer version, and font settings.&lt;br /&gt;
&lt;br /&gt;
The number of characters that can be displayed in a button depends upon the width of the characters. You should expect around 10 chars, give or take, not the full 24 in the button definition. The full button definition IS said, up to 24 chars, into the chat channel even though fewer characters may be displayed in the button itself.&lt;br /&gt;
&lt;br /&gt;
===Limits===&lt;br /&gt;
&lt;br /&gt;
My testing shows the a Dialog box now works anywhere in the same Region as the object OR any region it hands you off to (e.g. the region you teleport to). It will not work for any subsequent hand offs. I have tested this with teleport only, I haven&#039;t tested it walking between regions.  &lt;br /&gt;
&lt;br /&gt;
I&#039;ve tested from the next SIM with an Alt, and from 2 SIMs away myself. Both worked without restriction apart from some lag on the messages. (OQ).&lt;br /&gt;
&lt;br /&gt;
|also_events=&lt;br /&gt;
{{LSL DefineRow||[[listen]]|}}&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llListen]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llTextBox]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llRegionSay]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llWhisper]]|Sends chat limited to 10 meters}}&lt;br /&gt;
{{LSL DefineRow||[[llSay]]|Sends chat limited to 20 meters}}&lt;br /&gt;
{{LSL DefineRow||[[llShout]]|Sends chat limited to 100 meters}}&lt;br /&gt;
{{LSL DefineRow||[[llInstantMessage]]|Sends chat to the specified user}}&lt;br /&gt;
{{LSL DefineRow||[[llOwnerSay]]|Sends chat to the owner only}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||[[Dialog Menus|Dialog Menus: A step by step guide]]|A walk through of the entire dialog menu process (aimed at learners).}}&lt;br /&gt;
|cat1=Chat&lt;br /&gt;
|cat2=Communications&lt;br /&gt;
|cat3=Dialog&lt;br /&gt;
|cat4&lt;br /&gt;
|haiku={{Haiku|click here click there. But,|read the options carefully|you might get a shock.}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Crymysyn Moonbeam</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetOwner&amp;diff=1189594</id>
		<title>LlGetOwner</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetOwner&amp;diff=1189594"/>
		<updated>2014-04-19T20:28:24Z</updated>

		<summary type="html">&lt;p&gt;Crymysyn Moonbeam: added haiku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=117|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetOwner|sort=GetOwner&lt;br /&gt;
|return_type=key&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the object owner&#039;s [[UUID]].&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*When the owner of an object changes, code that depends on this function&#039;s return value will not automatically update for the new owner or be automatically re-evaluated.&lt;br /&gt;
**This requires the reregistration of [[llListen|listens]] and  [[llRequestPermissions|requesting of permissions]] from the new owner as needed.&lt;br /&gt;
***This is not limited to listens and permissions but anything that caches the return value, it is up to the programmer to work around this limitation.&lt;br /&gt;
**Detection of owner change can be achieved with the [[changed]] event in conjunction with the [[CHANGED_OWNER]] flag (see the second example) or by storing the old value and periodically (e.g. in [[on_rez]]) checking if it has changed. Both techniques are valid though the latter will not detect the sale of the object if it is sold with &amp;quot;sell original&amp;quot; in-world and not picked up.&lt;br /&gt;
*When the object is deeded to a group, the UUID returned is that of the group.&lt;br /&gt;
*When the owner is offline the region can lose the owner uuid and return NULL_KEY or (Loading)... in some rare cases.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
llOwnerSay( (string)llGetOwner()); // speaks in chat the &amp;quot;key&amp;quot; (UUID code) of the avatar.&lt;br /&gt;
llOwnerSay( llKey2Name(llGetOwner())); // speaks in chat the name of the owner if in the sim.&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    changed(integer change)&lt;br /&gt;
    {&lt;br /&gt;
        if (change &amp;amp; CHANGED_OWNER)&lt;br /&gt;
            llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        key owner = llGetOwner();&lt;br /&gt;
        llInstantMessage(owner, &amp;quot;Only you can hear me. Isn&#039;t that eerie.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers=To determine the owner of an object that might be group-deeded you can use the following code snippet. Setting the &amp;lt;code&amp;gt;groupAdmin&amp;lt;/code&amp;gt; parameter to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; can be used to specify that group members should &#039;&#039;always&#039;&#039; count as owners, even if the object isn&#039;t deeded to that group.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer isOwner(key id, integer groupAdmin) {&lt;br /&gt;
    integer result = FALSE;&lt;br /&gt;
    {&lt;br /&gt;
        key owner = llGetOwner();&lt;br /&gt;
        if (id == owner) result = TRUE;&lt;br /&gt;
        else { // If object is group owned, avatar need only belong to same group&lt;br /&gt;
            integer sameGroup = llSameGroup(id);&lt;br /&gt;
            if (groupAdmin) result = sameGroup;&lt;br /&gt;
            else {&lt;br /&gt;
                key group = (key)((string)llGetObjectDetails(llGetKey(), [OBJECT_GROUP]));&lt;br /&gt;
                if (group == owner) result = sameGroup;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetCreator]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llGetOwnerKey]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llDetectedOwner]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes=&lt;br /&gt;
To retrieve the owners name while the owner is in the region use [[llKey2Name]], [[llGetUsername]] or [[llGetDisplayName]]. Respectively [[llRequestAgentData]], [[llRequestUsername]] or [[llRequestDisplayName]] should be used when the owner is not in the region.&lt;br /&gt;
&lt;br /&gt;
The one problem many coders come up against is that previously-activated events referring to the owner don&#039;t automatically change when the owner changes.  The most often-seen result is a listen registered to owner will continue to listen to the PREVIOUS owner rather than the CURRENT owner.  It is often confused as a bug in [[llGetOwner]] or [[llListen]] it is not in fact a bug but part of the design.  There are several ways of working around this problem.  The easy solution is to reset the script when owner changes or it is rezzed. The easy solution is not always the right solution.&lt;br /&gt;
&lt;br /&gt;
There are two ways to detect if the owner has changed, the most reliable is to use the [[changed]] event.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
changed(integer change)&lt;br /&gt;
{&lt;br /&gt;
    if (change &amp;amp; CHANGED_OWNER)//if owner changes, reset the script.&lt;br /&gt;
        llResetScript();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In many applications resetting the script when the object is rezzed is an adequate and easy solution.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
on_rez(integer start_param)&lt;br /&gt;
{ //when the object is rezzed, reset the script.&lt;br /&gt;
    llResetScript();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resetting the script is not appropriate if the script needs to keep it&#039;s data when it&#039;s ownership is transfered or if script startup is slow, in these situations listens will need to be re-keyed to the new owner along with any other owner specific code, like who the script is supposed to be animating.&lt;br /&gt;
&lt;br /&gt;
The [[on_rez]] and [[changed]] events can be harnessed to reinitialize owner specific code every time the object is rezzed or changes owner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer listen_handle;&lt;br /&gt;
&lt;br /&gt;
init()&lt;br /&gt;
{&lt;br /&gt;
    key owner = llGetOwner();&lt;br /&gt;
    llListenRemove(listen_handle);&lt;br /&gt;
    // PUBLIC_CHANNEL has the integer value 0&lt;br /&gt;
    listen_handle = llListen(PUBLIC_CHANNEL, &amp;quot;&amp;quot;, owner, &amp;quot;&amp;quot;);&lt;br /&gt;
    llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
        //insert additional startup code here that doesn&#039;t need to run each rez/owner change&lt;br /&gt;
        //for example, reading settings from a notecard&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    on_rez(integer start)&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    changed(integer change)&lt;br /&gt;
    {&lt;br /&gt;
        if (change &amp;amp; CHANGED_OWNER)&lt;br /&gt;
            init();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer perm)&lt;br /&gt;
    {//always use the run_time_permissions event with llRequestPermissions, never assume&lt;br /&gt;
        if(perm &amp;amp; PERMISSION_TRIGGER_ANIMATION)&lt;br /&gt;
        {&lt;br /&gt;
            //setup your animation code here, start your timers, etc.&lt;br /&gt;
            llOwnerSay(&amp;quot;I have animation permissions&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|cat1=Owner&lt;br /&gt;
|cat2=Object&lt;br /&gt;
|cat3=Key&lt;br /&gt;
|cat4&lt;br /&gt;
|haiku={{Haiku|Pass me my coat please|it is not always easy|whose coat is it now?}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Crymysyn Moonbeam</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlApplyImpulse&amp;diff=1189593</id>
		<title>LlApplyImpulse</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlApplyImpulse&amp;diff=1189593"/>
		<updated>2014-04-19T19:55:10Z</updated>

		<summary type="html">&lt;p&gt;Crymysyn Moonbeam: added haiku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{Issues/SVC-8227}}{{LSL_Function/force|force|local=local}}{{LSL_Function/physical}}&lt;br /&gt;
|func=llApplyImpulse&lt;br /&gt;
|sort=ApplyImpulse&lt;br /&gt;
|func_id=72|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|p1_type=vector|p1_name=force&lt;br /&gt;
|p2_type=integer|p2_subtype=boolean|p2_name=local&lt;br /&gt;
|func_footnote=Instantaneous impulse. [[llSetForce]] has continuous push. &amp;quot;Instantaneous&amp;quot; seems to mean a one second impulse, as an application of a force (in newtons) equal to the object&#039;s mass (in kg) for one second will accelerate it to a velocity of 1 (in meters per second), which appears to be what happens with this function.&lt;br /&gt;
|func_desc=Applies impulse to object&lt;br /&gt;
|return_text|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*The [[llVecMag|magnitude]] of {{LSLP|force}} may be scaled back by the object&#039;s available energy.&lt;br /&gt;
*The maximum magnitude of {{LSLP|force}} is 20.0 and if it exceeds that it will be scaled back.&lt;br /&gt;
*Silently fails when not called from inside the root prim.&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//  Rez an object, and drop this script in it.&lt;br /&gt;
//  This will launch it at the owner.&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        key ownerKey = llGetOwner();&lt;br /&gt;
        vector ownerPosition = llList2Vector(llGetObjectDetails(ownerKey, [OBJECT_POS]), 0);&lt;br /&gt;
&lt;br /&gt;
//  if the owner is not in the sim, stop fooling around&lt;br /&gt;
        if (llGetAgentSize(ownerKey) == ZERO_VECTOR)&lt;br /&gt;
            return;&lt;br /&gt;
&lt;br /&gt;
//  else&lt;br /&gt;
        llSetStatus(STATUS_PHYSICS, TRUE);&lt;br /&gt;
&lt;br /&gt;
        vector objectPosition = llGetPos();&lt;br /&gt;
        vector direction = llVecNorm(ownerPosition - objectPosition);&lt;br /&gt;
&lt;br /&gt;
        llApplyImpulse(direction * 100, 0);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
Make yourself a beer can, drop this script into it, and have some target practice.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector gHome;&lt;br /&gt;
integer gHit;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    collision_start(integer num)&lt;br /&gt;
    {&lt;br /&gt;
        if (!gHit)&lt;br /&gt;
        {&lt;br /&gt;
            llSetTimerEvent(15.0);&lt;br /&gt;
            gHome = llGetPos();&lt;br /&gt;
            gHit = TRUE;&lt;br /&gt;
        }&lt;br /&gt;
        llSetStatus(STATUS_PHYSICS, TRUE);&lt;br /&gt;
        llTriggerSound(&amp;quot;b90ed62a-2737-b911-bb53-6b9228bbc933&amp;quot;,1.0);&lt;br /&gt;
        llApplyImpulse(llGetMass()*&amp;lt;0,0,5.0&amp;gt;,TRUE);&lt;br /&gt;
        llApplyRotationalImpulse(llGetMass()*&amp;lt;llFrand(1.0),llFrand(1.0),llFrand(1.0)&amp;gt;,TRUE);&lt;br /&gt;
        llResetTime();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    land_collision(vector where)&lt;br /&gt;
    {&lt;br /&gt;
        if (llGetTime() &amp;lt; 0.5)&lt;br /&gt;
        {&lt;br /&gt;
            llResetTime();&lt;br /&gt;
            llApplyImpulse(llGetMass()*&amp;lt;0,0,llFrand(1.0)&amp;gt;,TRUE);&lt;br /&gt;
            llApplyRotationalImpulse(llGetMass()*&amp;lt;llFrand(1.0),llFrand(1.0),llFrand(1.0)&amp;gt;,TRUE);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    timer()&lt;br /&gt;
    {&lt;br /&gt;
        llSetStatus(STATUS_PHYSICS,FALSE);&lt;br /&gt;
        gHit = FALSE;&lt;br /&gt;
        llSetRegionPos(gHome);  // Send the can home, even if more than 10m away&lt;br /&gt;
        llSetRot(ZERO_ROTATION);&lt;br /&gt;
        llSetTimerEvent(0.0);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llApplyRotationalImpulse]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llSetForce]]|Set continuous force}}&lt;br /&gt;
|notes&lt;br /&gt;
|deepnotes=&lt;br /&gt;
==== Unpredictability ====&lt;br /&gt;
Taken from [[Simulator User Group/Transcripts/2012.10.05]]&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
[16:24] &amp;lt;font color=#440044&amp;gt;&amp;lt;b&amp;gt;Andrew Linden&amp;lt;/b&amp;gt;&amp;lt;nowiki&amp;gt;: the llApplyImpulse() is even more unpredictable&amp;lt;/nowiki&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[16:24] &amp;lt;font color=#440044&amp;gt;&amp;lt;b&amp;gt;Andrew Linden&amp;lt;/b&amp;gt;&amp;lt;nowiki&amp;gt;: because it uses the legacy script &amp;quot;energy budget&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[16:25] &amp;lt;font color=#440044&amp;gt;&amp;lt;b&amp;gt;Andrew Linden&amp;lt;/b&amp;gt;&amp;lt;nowiki&amp;gt;: which will attenuate the results if the scripted object doesn&#039;t have enough &amp;quot;energy&amp;quot; to execute the impulse that it wants&amp;lt;/nowiki&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[16:25] &amp;lt;font color=#440044&amp;gt;&amp;lt;b&amp;gt;Andrew Linden&amp;lt;/b&amp;gt;&amp;lt;nowiki&amp;gt;: also, that llApplyImpulse() has great griefing potential&amp;lt;/nowiki&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[16:25] &amp;lt;font color=#440044&amp;gt;&amp;lt;b&amp;gt;Andrew Linden&amp;lt;/b&amp;gt;&amp;lt;nowiki&amp;gt;: so we hobbled it a long time ago with a very high energy consumption rate&amp;lt;/nowiki&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
|cat1=Physics&lt;br /&gt;
|cat2=Movement&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
|haiku={{Haiku|In this crazy world,|Force, momentum, energy|cease to be conserved}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Crymysyn Moonbeam</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlAddToLandBanList&amp;diff=1189590</id>
		<title>LlAddToLandBanList</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlAddToLandBanList&amp;diff=1189590"/>
		<updated>2014-04-19T19:02:10Z</updated>

		<summary type="html">&lt;p&gt;Crymysyn Moonbeam: added haiku&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{Issues/SVC-1911}}{{LSL_Function/avatar|avatar}}&lt;br /&gt;
|func_id=310|func_sleep=0.1|func_energy=10.0&lt;br /&gt;
|func=llAddToLandBanList|sort=AddToLandBanList&lt;br /&gt;
|p1_type=key|p1_name=avatar|p2_type=float|p2_name=hours&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Add {{LSLP|avatar}} to the land ban list for {{LSLP|hours}}, or indefinitely if {{LSLP|hours}} is zero.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
* Must be owned by the land owner.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;// This is not a complete solution, requires full avatar names to work - even for unbanning someone!&lt;br /&gt;
// This is meant only as an example of the land ban and pass management functions.&lt;br /&gt;
// free to copy, use, modify, distribute - just don&#039;t ask me to debug your modified code. ;-)&lt;br /&gt;
// &lt;br /&gt;
// Commands are:&lt;br /&gt;
//   /5 ban:full_avatar_name&lt;br /&gt;
//   /5 tempban:full_avatar_name&lt;br /&gt;
//   /5 unban:full_avatar_name&lt;br /&gt;
//   /5 pass:full_avatar_name&lt;br /&gt;
//   /5 unpass:full_avatar_name&lt;br /&gt;
//   /5 clearban&lt;br /&gt;
//   /5 clearpass&lt;br /&gt;
&lt;br /&gt;
string command;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llListen(5, &amp;quot;&amp;quot;, llGetOwner(), &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer param)&lt;br /&gt;
    {&lt;br /&gt;
        llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    listen(integer chan, string name, key id, string message)&lt;br /&gt;
    {&lt;br /&gt;
        if (command != &amp;quot;&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Sorry, still processing last command, try again in a second.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        list args = llParseString2List(message,[&amp;quot;:&amp;quot;],[]);&lt;br /&gt;
        command = llToLower(llList2String(args,0));&lt;br /&gt;
        &lt;br /&gt;
        if (command == &amp;quot;clearbans&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            llResetLandBanList();&lt;br /&gt;
        }&lt;br /&gt;
        if (command == &amp;quot;clearpass&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            llResetLandPassList();&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    no_sensor()&lt;br /&gt;
    {&lt;br /&gt;
        command = &amp;quot;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    sensor(integer num)&lt;br /&gt;
    {&lt;br /&gt;
        integer i = 0;&lt;br /&gt;
        for (; i &amp;lt; num; ++i)&lt;br /&gt;
        {&lt;br /&gt;
            if (command == &amp;quot;ban&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                // Ban indefinetely &lt;br /&gt;
                llAddToLandBanList(llDetectedKey(i),0.0);&lt;br /&gt;
            }&lt;br /&gt;
            if (command == &amp;quot;tempban&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                // Ban for 1 hour.&lt;br /&gt;
                llAddToLandBanList(llDetectedKey(i),1.0);&lt;br /&gt;
            }&lt;br /&gt;
            if (command == &amp;quot;unban&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                llRemoveFromLandBanList(llDetectedKey(i));&lt;br /&gt;
            }&lt;br /&gt;
            if (command == &amp;quot;pass&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                // Add to land pass list for 1 hour&lt;br /&gt;
                llAddToLandPassList(llDetectedKey(i),1.0);&lt;br /&gt;
            }&lt;br /&gt;
            if (command == &amp;quot;unpass&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                llRemoveFromLandPassList(llDetectedKey(i));&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        command = &amp;quot;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llAddToLandPassList]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llRemoveFromLandBanList]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llRemoveFromLandPassList]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llResetLandBanList]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llResetLandPassList]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|issues&lt;br /&gt;
|haiku=&lt;br /&gt;
 {{Haiku|All are welcome here|except for the following|who have annoyed me}}&lt;br /&gt;
|cat1=Security&lt;br /&gt;
|cat2=Parcel&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Crymysyn Moonbeam</name></author>
	</entry>
</feed>