Difference between revisions of "LSL Protocol/RestrainedLoveAPI/ja"

From Second Life Wiki
Jump to navigation Jump to search
(synced with original edition. simply filled with original text for now)
Line 1: Line 1:
{{LSL Header/ja|ml=*}}
{{LSL Header/ja|ml=*}}
=Restrained Love viewer v1.23 の仕様=
=Restrained Love viewer v2.3 の仕様=


著者 [[User:Marine Kelley|Marine Kelley]]
著者 [[User:Marine Kelley|Marine Kelley]]
Line 8: Line 8:


このドキュメントは、[http://realrestraint.blogspot.com RestrainedLove viewer]の機能を使用して独自の[[LSL]]スクリプトを作成したい方へ向けて書かれたものです。メッセージやイベントといった[[LSL]]の概念については説明していません。また、[[UUID]]などの普遍的な概念についても説明していません。
このドキュメントは、[http://realrestraint.blogspot.com RestrainedLove viewer]の機能を使用して独自の[[LSL]]スクリプトを作成したい方へ向けて書かれたものです。メッセージやイベントといった[[LSL]]の概念については説明していません。また、[[UUID]]などの普遍的な概念についても説明していません。
This document contains the specification for RestrainedLove viewer itself. If you need information about the RestrainedLove viewer relay(RLV relay), please see the [[LSL_Protocol/Restrained_Love_Relay/Specification|RLV relay specification]]


==はじめに==
==はじめに==
Line 35: Line 37:
==コマンド一覧==
==コマンド一覧==


''注意: これらのコマンドは大文字小文字を区別しませんが、スペースは区別します。言い換えると、"@detach = n" は動作 '''しません''' 。''
注意: これらのコマンドは大文字小文字を区別しませんが、スペースは区別します。言い換えると、"@detach = n" は動作 '''しません''' 。
 
'''Notation convention:''' Parameters in [square brackets] are optional parameters that can be omitted. The pipe | and slash / signs separate options from which one must be used. <angle brackets> enclose parameters that are mandatory.


* '''''自動バージョンチェック''''' : "@version=<channel_number>"
* '''''自動バージョンチェック''''' : "@version=<channel_number>"
''実装 v1.0b''
''実装 v1.0b''
ビューアにバージョンを <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。
搭載している RLV のバージョンをビューアに <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。


'''警告''' : ログインすると、全てのアタッチメントの [[on_rez]] イベントはアバターが実質的にチャットメッセージを送ることができるようになる前に発生します (だいたいログインのプログレスバーが半分までいったぐらいの時点です) 。このため、ビューアから自動返答を受け取るために、タイムアウトは 30 秒から 1 分ぐらいの充分に長い時間にしなければなりません。
'''警告''' : ログインすると、全てのアタッチメントの [[on_rez]] イベントはアバターが実質的にチャットメッセージを送ることができるようになる前に発生します (だいたいログインのプログレスバーが半分までいったぐらいの時点です) 。このため、ビューアから自動返答を受け取るために、タイムアウトは 30 秒から 1 分ぐらいの充分に長い時間にしなければなりません。
Line 48: Line 52:
* '''''自動バージョンチェック''''' : "@versionnew=<channel_number>"
* '''''自動バージョンチェック''''' : "@versionnew=<channel_number>"
''実装 v1.23''
''実装 v1.23''
ビューアにバージョンを <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。
搭載している RLV のバージョンをビューアに <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。


このコマンドは @version の後継で取って代わるものです。それでも、 @version は下位互換性のために維持されています。これは "RestrainedLove viewer v... (SL ...)" と返します("RestrainedLove" は 1 語です)。
このコマンドは @version の後継で取って代わるものです。それでも、 @version は下位互換性のために維持されています。これは "RestrainedLove viewer v... (SL ...)" と返します("RestrainedLove" は 1 語です)。
Line 99: Line 103:




* '''''プライベートチャネルでの通知を開始/停止する''''' : "@notify:<channel_number>[;word]=add/rem"
* '''''プライベートチャネルでの通知を開始/停止する''''' : "@notify:<channel_number>[;word]=<rem/add>"
''実装 v1.20''
''実装 v1.20, improved in v2.2 (and v1.24)''
全ての制約、もしくはセミコロン (";") の後に指定された単語を含んだ名称をもつ制約の追加削除を、ビューアに特定のチャネルで自動的に復唱させます。<channel_number> のプライベートチャネルに返される内容は、他のスクリプトに意図しないコマンドを送ってしまわないように、先頭にスラッシュ ("/") がついています。そして、等号 ("=") の後に、 "n" か "y" がついており、それぞれ制約の追加と削除を示しています。"@clear" コマンドは等号を付加しません。他のスクリプトについての情報が無防備に開示されるのを避けるため、どのオブジェクトが制約を付加したのか撤廃したのかを知ることはできません。one-shot コマンド (force コマンド) も復唱しません。例えば、"@notify:2222;detach=add" はオブジェクトがロックされるたびに "/detach=n" を送信し、オブジェクトのロックが解除されるたびに "/detach=y" を送信します。チャネル 2222 でスクリプトがこれらを受信することになります。
全ての制約、もしくはセミコロン (";") の後に指定された単語を含んだ名称をもつ制約の追加削除を、ビューアに特定のチャネルで自動的に復唱させます。<channel_number> のプライベートチャネルに返される内容は、他のスクリプトに意図しないコマンドを送ってしまわないように、先頭にスラッシュ ("/") がついています。そして、等号 ("=") の後に、 "n" か "y" がついており、それぞれ制約の追加と削除を示しています。"@clear" コマンドは等号を付加しません。他のスクリプトについての情報が無防備に開示されるのを避けるため、どのオブジェクトが制約を付加したのか撤廃したのかを知ることはできません。one-shot コマンド (force コマンド) も復唱しません。例えば、"@notify:2222;detach=add" はオブジェクトがロックされるたびに "/detach=n" を送信し、オブジェクトのロックが解除されるたびに "/detach=y" を送信します。チャネル 2222 でスクリプトがこれらを受信することになります。


Note : Since v2.2 (and v1.24) you can also set a notification for inventory offers. When your object gives an item or a folder, the avatar using a RLV v2.2 (and v1.24) or higher will respond automatically on the given channel one of the following :
- /accepted_in_rlv inv_offer <folder> : The folder has been accepted and is now available under #RLV (don't forget that the viewer renames it, removing the "#RLV/" prefix).
- /accepted_in_inv inv_offer <folder> : The folder has been accepted but is not shared.
- /declined inv_offer <folder> : The folder has been declined and/or the user has pressed "Block" (formerly "Mute").
Where <folder> is the full path of the folder or item given. For example, #RLV/~MyCuffs. There is a space before "inv_offer", which is a token chosen in a way that it is easy to set a notification for it. If you just want to know whether your folder named #RLV/~MyCuffs has been accepted in the #RLV folder, issue a "@notify:2222;accepted_in_rlv inv_offer #RLV/~MyCuffs=add" command. If you just want to know whether the avatar has received something, issue a simple "@notify:2222;inv_offer=add" command.


* '''''チャットを許可/禁止する''''' : "@sendchat=<y/n>"
* '''''チャットを許可/禁止する''''' : "@sendchat=<y/n>"
Line 132: Line 142:
''実装 v1.16''
''実装 v1.16''
有効になると、この制約はパブリックチャネル ("/0") で話した内容を全てオプションで指定されたプライベートチャネルにリダイレクトします。複数の制約がかかると、チャットのメッセージはそれぞれのチャネルにリダイレクトされるようになります。これは emote には適用されず、話している時にアニメーション (タイプ開始、終了、うなずき) が実行されなくなります。この制約は @sendchannel に取って代わるものではありません。
有効になると、この制約はパブリックチャネル ("/0") で話した内容を全てオプションで指定されたプライベートチャネルにリダイレクトします。複数の制約がかかると、チャットのメッセージはそれぞれのチャネルにリダイレクトされるようになります。これは emote には適用されず、話している時にアニメーション (タイプ開始、終了、うなずき) が実行されなくなります。この制約は @sendchannel に取って代わるものではありません。
'''NOTE:''' As of RLV v1.22.1 / RLVa 1.1.0 @redirchat also truncates emotes on channel 0. It's not clear if this is a bug or a missing note in the API. An additional @emote=add works around this side-effect. '''Addendum by {{User|Henri Beauchamp}}''': as someone who worked together with Marine on the reference implementation, this is '''clearly''' a bug and plain unintended. It appeared during some code refactoring, but as always specified before in the API, @redirchat should *not* affect emotes at all. If you want to affect emotes as well, please use @rediremote. This bug was fixed in the [http://sldev.free.fr/ Cool VL Viewer].




Line 152: Line 164:
''Implemented in v1.01''
''Implemented in v1.01''
When adding an exception, the user can send IMs to the receiver whose [[UUID]] is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.
When adding an exception, the user can send IMs to the receiver whose [[UUID]] is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.
* '''''Allow/prevent sending instant messages to someone in particular''''' : "@sendimto:<UUID>=<y/n>"
''Implemented in v2.3 and v1.25''
When prevented, everything typed in IM to the specified avatar will be discarded and a bogus message will be sent instead.




Line 167: Line 184:
''Implemented in v1.01''
''Implemented in v1.01''
When adding an exception, the user can hear chat messages from the sender whose [[UUID]] is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.
When adding an exception, the user can hear chat messages from the sender whose [[UUID]] is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.
* '''''Allow/prevent receiving chat messages''''' : "@recvchatfrom:<UUID>=<y/n>"
''Implemented in v2.3 and v1.25''
When prevented, everything heard in public chat from the specified avatar will be discarded except emotes.




Line 194: Line 216:




* '''''Remove/add exceptions to the chat message receiving prevention''''' : "@recvim:<UUID>=<rem/add>"
* '''''Remove/add exceptions to the instant message receiving prevention''''' : "@recvim:<UUID>=<rem/add>"
''Implemented in v1.01''
''Implemented in v1.01''
When adding an exception, the user can read instant messages from the sender whose [[UUID]] is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.
When adding an exception, the user can read instant messages from the sender whose [[UUID]] is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.
* '''''Allow/prevent receiving instant messages''''' : "@recvimfrom:<UUID>=<y/n>"
''Implemented in v2.3 and v1.25''
When prevented, every IM received from the the specified avatar will be discarded and the sender will be notified that the user cannot read them.




Line 227: Line 254:
''Implemented in v1.0''
''Implemented in v1.0''
When limited, the avatar cannot sit on a [[prim]] unless it is closer than 1.5 m. This allows cages to be secure, preventing the avatar from warping its position through the walls (unless the prim is too close).
When limited, the avatar cannot sit on a [[prim]] unless it is closer than 1.5 m. This allows cages to be secure, preventing the avatar from warping its position through the walls (unless the prim is too close).
* '''''Allow/prevent standing up at a different location than where we sat down''''' : @standtp=<y/n>
''Implemented in v2.1.2 and v1.24''
When this restriction is active and the avatar stands up, it is automatically teleported back to the location where it initially sat down. Please note that the "last standing location" is also stored when the restriction is issued, so this won't be a problem for grabbers and the like, that sit the victim, then move them inside a cell, which issues its restrictions, and then unsits them. In this case the avatar will stay in the cell.




Line 256: Line 288:
''Implemented in v1.03''
''Implemented in v1.03''
When prevented from editing and opening objects, the Build & Edit window will refuse to open.
When prevented from editing and opening objects, the Build & Edit window will refuse to open.
* '''''Remove/add exceptions to the edit prevention''''' : "@edit:<UUID>=<rem/add>"
''Implemented in v2.3 and v1.25''
When adding an exception, the user can edit or open this object in particular.




Line 261: Line 298:
''Implemented in v1.03''
''Implemented in v1.03''
When prevented from [[rez]]zing stuff, creating and deleting objects, drag-dropping from inventory and dropping attachments will fail.
When prevented from [[rez]]zing stuff, creating and deleting objects, drag-dropping from inventory and dropping attachments will fail.
* '''''Allow/prevent editing objects''''' : "@editobj:<UUID>=<y/n>"
'Implemented in v2.3 and v1.25''
When prevented, the Build & Edit window will refuse to open when trying to edit or open the specified object.




Line 266: Line 308:
''Implemented in v1.10, added skin hair and eyes in v1.10.1''
''Implemented in v1.10, added skin hair and eyes in v1.10.1''
Where part is :
Where part is :
  gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape
  gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape|alpha|tattoo
If part is not specified, prevents from wearing anything beyond what the avatar is already wearing.
If part is not specified, prevents from wearing anything beyond what the avatar is already wearing.
'''Note:''' Since the release of Viewer 2.0 there are two new avatar skin layers: Tattoo and Avatar Transparency Mask. The alpha and tattoo layers will only be supported by RLV compliant viewers that implement the new Viewer 2.0 features.




Line 273: Line 317:
''Implemented in v1.10, added skin hair and eyes in v1.10.1''
''Implemented in v1.10, added skin hair and eyes in v1.10.1''
Where part is :
Where part is :
  gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape
  gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape|alpha|tattoo
If part is not specified, prevents from removing anything in what the avatar is wearing.
If part is not specified, prevents from removing anything in what the avatar is wearing.
'''Note:''' Since the release of Viewer 2.0 there are two new avatar skin layers: Tattoo and Avatar Transparency Mask. The alpha and tattoo layers will only be supported by RLV compliant viewers that implement the new Viewer 2.0 features.




Line 280: Line 326:
''Implemented in v1.10''
''Implemented in v1.10''
Where part is :
Where part is :
  gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape
  gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|alpha|tattoo
If part is not specified, removes everything.
If part is not specified, removes everything.
'''Note:''' Since the release of Viewer 2.0 there are two new avatar skin layers: Tattoo and Avatar Transparency Mask. The alpha and tattoo layers will only be supported by RLV compliant viewers that implement the new Viewer 2.0 features.
'''Note:''' skin, shape, eyes and hair cannot be removed since they are body parts (and removing any would result in an unrezzed avatar).




Line 310: Line 360:
  Ex 1 : @getoutfit=2222 => "0011000111" => avatar is wearing pants, shirt, underpants and undershirt, and of course a skin.
  Ex 1 : @getoutfit=2222 => "0011000111" => avatar is wearing pants, shirt, underpants and undershirt, and of course a skin.
  Ex 2 : @getoutfit:socks=2222 => "0" => the avatar is not wearing socks.
  Ex 2 : @getoutfit:socks=2222 => "0" => the avatar is not wearing socks.
'''Note:''' For viewers that implement the new Viewer 2.0 features, the list is:
gloves,jacket,pants,shirt,shoes,skirt,socks,underpants,undershirt,skin,eyes,hair,shape,alpha,tattoo




Line 383: Line 437:
* '''''Allow/prevent using any chat channel but certain channels''''' : @sendchannel[:<channel>]=<y/n>
* '''''Allow/prevent using any chat channel but certain channels''''' : @sendchannel[:<channel>]=<y/n>
''Implemented in v1.10''
''Implemented in v1.10''
Complimentary of @sendchat, this command prevents the user from sending messages on non-public [[channel]]s. If channel is specified, it becomes an exception to the aforementioned restriction. It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc.   
Complimentary of @sendchat, this command prevents the user from sending messages on non-public [[channel]]s. If channel is specified, it becomes an exception to the aforementioned restriction (then it is better to use "rem" or "add" instead of "y" or "n" respectively). It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc.   




* '''''Allow/prevent using any chat channel but certain channels, secure way''''' : @sendchannel_sec[:<channel>]=<y/n>
* '''''Allow/prevent using any chat channel but certain channels, secure way''''' : @sendchannel_sec[:<channel>]=<y/n>
''Implemented in v1.10''
''Implemented in v1.10''
Complimentary of @sendchat, this command prevents the user from sending messages on non-public [[channel]]s. If channel is specified, it becomes an exception to the aforementioned restriction. It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc. This particular command only accepts exceptions issued from the same object, opposed to its non-secure version which accepts exceptions from any other object.
Complimentary of @sendchat, this command prevents the user from sending messages on non-public [[channel]]s. If channel is specified, it becomes an exception to the aforementioned restriction (then it is better to use "rem" or "add" instead of "y" or "n" respectively). It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc. This particular command only accepts exceptions issued from the same object, opposed to its non-secure version which accepts exceptions from any other object.




Line 400: Line 454:


  Example : If the avatar is under tploc, tplure, tplm and sittp, here is what the script would get :
  Example : If the avatar is under tploc, tplure, tplm and sittp, here is what the script would get :
  @getstatus=2222  =>  tploc/tplure/tplm/sittp
  @getstatus=2222  =>  /tploc/tplure/tplm/sittp
  @getstatus:sittp=2222  =>  sittp
  @getstatus:sittp=2222  =>  /sittp
  @getstatus:tpl=2222  =>  tploc/tplure/tplm  (because "tpl" is part of "tploc", "tplure" and "tplm" but not "sittp")
  @getstatus:tpl=2222  =>  /tploc/tplure/tplm  (because "tpl" is part of "tploc", "tplure" and "tplm" but not "sittp")




Line 442: Line 496:
* '''''Get the path to a shared folder by giving a search criterion''''' : @findfolder:part1[&&...&&partN]=<channel_number>
* '''''Get the path to a shared folder by giving a search criterion''''' : @findfolder:part1[&&...&&partN]=<channel_number>
''Implemented in v1.13.1''
''Implemented in v1.13.1''
Makes the viewer automatically answer the path to the first shared folder which name contains <part1> and <part2> and ... and <partN>, immediately on the chat channel number <channel_number> that the script can listen to. The search is in depth first, notice the separator which is "&&" like "and". Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."). The answer is a list of folders, separated by slashes ('/').
Makes the viewer automatically answer the path to the first shared folder which name contains <part1> and <part2> and ... and <partN>, immediately on the chat channel number <channel_number> that the script can listen to. The search is in depth first, notice the separator which is "&&" like "and". Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."), nor folders which name begins with a tilde ("~"). The answer is a list of folders, separated by slashes ('/').




Line 451: Line 505:
装着ポイントの名前は、「装着先」サブメニューにある名前と同じものです。"skull", "chest", "l forearm" などなど。
装着ポイントの名前は、「装着先」サブメニューにある名前と同じものです。"skull", "chest", "l forearm" などなど。


注意:フォルダの名前にスラッシュを含めることは '''可能''' です。そのときには、その名前がフォルダ名となっているものがあれば優先して選択されます。 (例えば、"@attach:Restraints/cuffs=force" が発行されると、"Restraints/cuffs" フォルダが選択され、その後に "Restraints" という親フォルダの中の "cuffs" フォルダが選択されることになります)
注意 1:フォルダの名前にスラッシュを含めることは '''可能''' です。そのときには、その名前がフォルダ名となっているものがあれば優先して選択されます。 (例えば、"@attach:Restraints/cuffs=force" が発行されると、"Restraints/cuffs" フォルダが選択され、その後に "Restraints" という親フォルダの中の "cuffs" フォルダが選択されることになります)
 
Note 2 : If the name of a folder begins with a plus sign ("+"), then this command will act exactly like @attachover. This rule can be changed through the use of the "RestrainedLoveStackWhenFolderBeginsWith" debug setting.
 
 
* '''''Force attach items contained inside a shared folder, without replacing what is already being worn''''' : @attachover:<folder1/.../folderN>=force (*)
''Implemented in v2.1.2 and v1.24''
This command works exactly like @attach described hereabove, except that it won't kick objects and pieces of clothing that are already being worn.




Line 457: Line 518:
''実装 v1.15''
''実装 v1.15''
このコマンドは先ほどの @attach と全く同じように動作しますが、子フォルダの中にあるものも全て装着します。
このコマンドは先ほどの @attach と全く同じように動作しますが、子フォルダの中にあるものも全て装着します。
* '''''Force attach items contained inside a shared folder, without replacing what is already being worn''''' : @attachallover:<folder1/.../folderN>=force (*)
''Implemented in v2.1.2 and v1.24''
This command works exactly like @attachall described hereabove, except that it won't kick objects and pieces of clothing that are already being worn.




Line 476: Line 542:
** is worn on the clothing layer provided in the option field, ex : @getpath:pants=2222 => "Casual/Jeans/Tight"
** is worn on the clothing layer provided in the option field, ex : @getpath:pants=2222 => "Casual/Jeans/Tight"
Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."). The answer is a list of folders, separated by slashes ('/').
Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."). The answer is a list of folders, separated by slashes ('/').
Please note : As version 1.40.4 is now live on the main grid, wearing several objects on the same attachment point is now possible. Therefore this command does not make much sense anymore since it can only respond with one folder, while the several objects could belong to several folders. Therefore it is better to use @getpathnew, since @getpath will slowly become deprecated as more and more users switch to 2.1 and beyond.
* '''''Get the paths to the shared folders containing the objects/clothing worn on a point''''' : @getpathnew[:<attachpt> or <clothing_layer>]=<channel_number>
''Implemented in v2.1 and v1.24''
Makes the viewer automatically answer the paths to the shared folders containing the item(s) that :
** issues this command if no option is set
** are attached on the attach point provided in the option field, ex : @getpath:spine=2222 => "Restraints/Collar,Jewelry/Cute necklace"
** is worn on the clothing layer provided in the option field, ex : @getpath:pants=2222 => "Casual/Jeans/Tight"
Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."). The answer is a list of folders, separated by slashes ('/'), if several paths must be returned because several outfits are concerned, they are organized in a list of strings separated by commas (',').
This command has been added to replace @getpath, since in 2.1 several objects can be worn on the same attachment point.




Line 481: Line 560:
''Implemented in v1.16''
''Implemented in v1.16''
This command is a shortcut for a @getpath followed with an @attach command (this saves a listener and a timeout).
This command is a shortcut for a @getpath followed with an @attach command (this saves a listener and a timeout).
* '''''Force attach items contained inside a shared folder, without replacing what is already being worn''''' : @attachthisover[:<attachpt> or <clothing_layer>]=force (*)
''Implemented in v2.1.2 and v1.24''
This command works exactly like @attachthis described hereabove, except that it won't kick objects and pieces of clothing that are already being worn.




Line 501: Line 585:
''Implemented in v1.16.2''
''Implemented in v1.16.2''
This command forces the object that issues it to detach itself from the avatar. It is there as a convenience to avoid a race condition when calling @clear then llDetachFromAvatar(), sometimes the object could detach itself before clearing its restrictions, making it reattach automatically after a while. With this command one can issue a @clear,detachme=force to be sure @clear is executed first.
This command forces the object that issues it to detach itself from the avatar. It is there as a convenience to avoid a race condition when calling @clear then llDetachFromAvatar(), sometimes the object could detach itself before clearing its restrictions, making it reattach automatically after a while. With this command one can issue a @clear,detachme=force to be sure @clear is executed first.
* '''''Allow/prevent removing some folders''''' : @detachthis[:<layer>|<attachpt>|<path_to_folder>]=<y/n>
''Implemented in v2.3 and v1.25''
When prevented, the user is unable to remove a folder if either of these conditions is filled :
- no option is specified and the folder contains the object that issues this restriction
- the "layer" option is set (shirt, pants...) and the folder contains a piece of clothing that is worn on this layer
- the "attachpt" option is set (l forearm, spine...) and the folder contains an attachment that is worn on this point
- the "path_to_folder" option is set and the folder corresponds to this location
Moreso, this folder or these folders cannot be renamed, moved, deleted or modified.
* '''''Allow/prevent removing some folders and their children''''' : @detachallthis[:<layer>|<attachpt>|<path_to_folder>]=<y/n>
''Implemented in v2.3 and v1.25''
These commands do exactly like @detachthis, but also apply to their children folders recursively.
* '''''Allow/prevent wearing some folders''''' : @attachthis:<layer>|<attachpt>|<path_to_folder>=<y/n>
''Implemented in v2.3 and v1.25''
When prevented, the user is unable to attach a folder if either of these conditions is filled :
- the "layer" option is set (shirt, pants...) and the folder contains a piece of clothing that is meant to be worn on this layer
- the "attachpt" option is set (l forearm, spine...) and the folder contains an attachment that is meant to be worn on this point
- the "path_to_folder" option is set and the folder corresponds to this location
Moreso, this folder or these folders cannot be renamed, moved, deleted or modified.
* '''''Allow/prevent removing some folders and their children''''' : @attachallthis[:<layer>|<attachpt>|<path_to_folder>]=<y/n>
''Implemented in v2.3 and v1.25''
These commands do exactly like @attachthis, but also apply to their children folders recursively.




Line 523: Line 638:




* '''''ユーザを強制テレポートさせる''''' : @tpto:X/Y/Z=force (*)
* '''''ユーザを強制テレポートさせる''''' : @tpto:<X>/<Y>/<Z>=force (*)
''実装 v1.12''
''実装 v1.12''
このコマンドはアバターを指定した座標にテレポートさせます。ここで注意しておきたいのは、座標は常に '''グローバル''' なので、コマンドの呼び出しを簡単に考えてはいけないということです。もっと言うと、テレポート先がテレハブやテレポート・ルートを含む場合、指定された場所ではなくそちらに飛んでしまいます。これは SL の制約です。また、@tpto は @tploc=n によって打ち消され、v1.15 以上では、@unsit によっても打ち消されることを覚えておいてください。
このコマンドはアバターを指定した座標にテレポートさせます。ここで注意しておきたいのは、座標は常に '''グローバル''' なので、コマンドの呼び出しを簡単に考えてはいけないということです。もっと言うと、テレポート先がテレハブやテレポート・ルートを含む場合、指定された場所ではなくそちらに飛んでしまいます。これは SL の制約です。また、@tpto は @tploc=n によって打ち消され、v1.15 以上では、@unsit によっても打ち消されることを覚えておいてください。
Line 804: Line 919:
バージョン 1.11 から、ビューアはインワールドのスクリプトと一部のアイテムを「共有」し、強制的に着脱させたり、共有しているものをリストで表示したりすることができるようになりました。
バージョン 1.11 から、ビューアはインワールドのスクリプトと一部のアイテムを「共有」し、強制的に着脱させたり、共有しているものをリストで表示したりすることができるようになりました。


「共有」というのは、他の人が欲しいときにそのアイテムを持っていくという意味ではなく(譲渡不能のアイテムもあるわけですから)、単に、他の人が自由自在に、アイテムを持つ本人に対する制約が含まれたスクリプトを通じて、それらの着脱を強制させることができるという意味です。これらのアイテムはインベントリに残ります。
「共有」というのは、他の人が欲しいときにそのアイテムを持っていくという意味ではなく(譲渡不能のアイテムもあるわけですから)、単に、他の人が自由自在に、アイテムを持つ本人に対する制約が含まれたスクリプトを通じて、それらの着脱を強制させることができるという意味です。これらのアイテムはインベントリに残ります。In fact, this feature would be best named "Exposed folder".


やり方:
やり方:
Line 878: Line 993:


* コマンドには 2 種類あります。'''one-shot''' コマンド (Param が "force" であり、Param が "version" 呼び出しのチャネル番号のような番号であるもの) と、 '''rules''' コマンド (Param が "y"、"n"、"add"、"rem" のいずれか) 。 "clear" は特別ですが、one-shot コマンドとして捉えることができます。
* コマンドには 2 種類あります。'''one-shot''' コマンド (Param が "force" であり、Param が "version" 呼び出しのチャネル番号のような番号であるもの) と、 '''rules''' コマンド (Param が "y"、"n"、"add"、"rem" のいずれか) 。 "clear" は特別ですが、one-shot コマンドとして捉えることができます。
* When the command takes a channel number, this number may be either strictly positive or (for RestrainedLove v1.23a (@versionnum = 1230001) and above) strictly negative. Using channel 0 is not allowed. Note that RestrainedLove can send a maximum of 255 characters on negative channels, while it can send up to 1023 characters on positive channels. Negative channels are useful to prevent the user from cheating, for example when asking for the @versionnum (since the user could use a non-RestrainedLove viewer and make the RestrainedLove devices believe they run within a RestrainedLove viewer by spoofing the reply to the version command on a positive channel, which they can't do on negative channels). Positive channels are best used for commands that may return large reply strings (@getpath, for example).


* "n" と "add" は '''まったく同じ''' で、'''まったく同じように''' 扱われます。これらは単なる '''シノニム''' です。同じようなことが "y" と "rem" にも言えます。ルール ("sendchannel=n") と例外 ("sendchannel:8=add") をスクリプトの中ではっきり区別するためだけのものです。
* "n" と "add" は '''まったく同じ''' で、'''まったく同じように''' 扱われます。これらは単なる '''シノニム''' です。同じようなことが "y" と "rem" にも言えます。ルール ("sendchannel=n") と例外 ("sendchannel:8=add") をスクリプトの中ではっきり区別するためだけのものです。
Line 903: Line 1,020:


[[Category:Third Party Client]]
[[Category:Third Party Client]]
[[Category:RestrainedLove]]

Revision as of 03:23, 31 December 2010

Restrained Love viewer v2.3 の仕様

著者 Marine Kelley


みなさまへ

このドキュメントは、RestrainedLove viewerの機能を使用して独自のLSLスクリプトを作成したい方へ向けて書かれたものです。メッセージやイベントといったLSLの概念については説明していません。また、UUIDなどの普遍的な概念についても説明していません。

This document contains the specification for RestrainedLove viewer itself. If you need information about the RestrainedLove viewer relay(RLV relay), please see the RLV relay specification

はじめに

RestrainedLove viewerは、インワールドのスクリプトから特定のメッセージを受け取ったときに、対応した動作をするものです。これらのメッセージは、ほとんどがllOwnerSay()と呼ばれるLSLの関数の呼び出しによって作成されます。

仕組み

RestrainedLove viewerは、ビューアに送信された全てのllOwnerSay メッセージを傍受します。アットマーク('@')で始まる行は、RLV のコマンドとして解釈されます。他の行は、通常通り、ローカルチャットに転送され、ユーザが見ることができます。例えば、llOwnerSay ("@detach=n") と呼び出すと、スクリプトを実行するオブジェクトが引数 ndetach コマンドをビューアに送信することと同じことになります。

メッセージの書式は次のようになります。

@<command1>[:option1]=<param1>,<command2>[:option2]=<param2>,...,<commandN>[:optionN]=<paramN>

'@'は、メッセージの先頭にただ一つだけ存在するようにしてください。ビューアはこれを「この llOwnerSay() メッセージの全文が、1つ以上の実行命令を含んでいる」と解釈します。記載上の都合により、コマンドは常に先頭に'@'がついた形で示されています。しかし、複数のコマンドを含むメッセージのそれぞれのコマンドの先頭に'@'をつけるのは誤りで、2個目以降のコマンドは正常に実行されません。

歴史的な注釈: 1.10 より前のバージョンでは、RLV は1つのメッセージにつきただ1つのコマンドだけを書くことができました。1.10 のバージョンで、RLV に対応していないビューアを使用しているユーザにメッセージをスパムすることにならないように、1つのメッセージに複数のコマンドを書くことができるようになりました。

少なくとも1つのコマンドの実行に失敗すると(例えばタイプミス)、ビューアは"... fails command : ... "というメッセージを出力し、全てのメッセージを表示します。しかし、正しいコマンドは解析と実行が行われ、誤っているものだけが無視されます。

コマンドの多くが、オブジェクトやアバターの次の「挙動」を規定します。例えば、@detach=n というコマンドは特定のオブジェクトにロックをかけ、取り外しできないようにします。コマンドの送信元オブジェクトに限定しない「グローバルな挙動」を規定するコマンドもあります。例えば、@sendchat=n というコマンドは、ユーザがローカルチャットで発言できないようにします。

注意 例外があるコマンド、例えば @sendim や @sendchannel などですが…。 @(rule):(exception)=n は正確には(かつ、単刀直入に言うと)既にあるルールに 例外を追加します 。例えば、@sendchannel:1=n はチャネル1での発言を 許可します。これは、スクリプターが陥る少なくとも2つの混乱の元となっていました。 =add (=n と同義) と =rem (=y と同義) は、それぞれ、例外の追加と削除のために存在します。こちらを使ってください。


Emblem-important-red.png Warning!

これらの挙動はセション間で引き継がれることは ありません 。オブジェクトの UUIDrez のたびに変わるため、オブジェクトの状態(取り外し不能、IM禁止など...)が変化したときにそうするように、オブジェクトは on_rez() イベントの中で状態を再送信 しなければなりません

コマンド一覧

注意: これらのコマンドは大文字小文字を区別しませんが、スペースは区別します。言い換えると、"@detach = n" は動作 しません 。

Notation convention: Parameters in [square brackets] are optional parameters that can be omitted. The pipe | and slash / signs separate options from which one must be used. <angle brackets> enclose parameters that are mandatory.

  • 自動バージョンチェック : "@version=<channel_number>"

実装 v1.0b 搭載している RLV のバージョンをビューアに <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。

警告 : ログインすると、全てのアタッチメントの on_rez イベントはアバターが実質的にチャットメッセージを送ることができるようになる前に発生します (だいたいログインのプログレスバーが半分までいったぐらいの時点です) 。このため、ビューアから自動返答を受け取るために、タイムアウトは 30 秒から 1 分ぐらいの充分に長い時間にしなければなりません。

警告2 : 2010年2月22日、Linden Lab はサードパーティ・ビューアの指針を発表し、サードパーティ・ビューアの名前の中に "Life" という文字を使用することを禁止しました。このため "Restrained Life" は"Restrained Love" に名前を変えざるをえませんでした。しかし、互換性維持の観点から、この @version コマンドは動作しますし、今後も動作します。しかし、新しく書くスクリプトではこれを 使用せず 、ユーザに "Restrained Life" という文字をどこにも 見せない ようにすることを推奨します。新しく書くスクリプトには、 代わりに @versionnew を使用してくださるようお願いします。


  • 自動バージョンチェック : "@versionnew=<channel_number>"

実装 v1.23 搭載している RLV のバージョンをビューアに <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。

このコマンドは @version の後継で取って代わるものです。それでも、 @version は下位互換性のために維持されています。これは "RestrainedLove viewer v... (SL ...)" と返します("RestrainedLove" は 1 語です)。

警告 : ログインすると、全てのアタッチメントの on_rez イベントはアバターが実質的にチャットメッセージを送ることができるようになる前に発生します (だいたいログインのプログレスバーが半分までいったぐらいの時点です) 。このため、ビューアから自動返答を受け取るために、タイムアウトは 30 秒から 1 分ぐらいの充分に長い時間にしなければなりません。


  • 自動バージョン番号チェック : "@versionnum=<channel_number>"

実装 v1.21 ビューアにバージョンを <channel_number> のチャネルで直ちに発言させ、スクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。このコマンドは @version よりは扱いやすいです。スクリプトがレスポンスを解析することがない分、番号をすぐに取得します。

バージョン番号は純粋な integer で、ビューアのバージョンを表しています。バージョンが X.Y.Z.P ならば、番号は X.10^6 + Y.10^4 + Z.10^2 + P になります。例えば、.21.1 は 1210100 になります。


  • 自動バージョンチェック、第二の方法 : llGetAgentLanguage (key id) 廃止: 使用しないでください!

実装 v1.16 この LSL 関数を呼び出すと、結果がすぐに返ります (リスナーやタイマーを使用する必要はありません)。これは、"@version" を送信した場合とまったく同じで、ユーザによって隠されることがありません。通常の SL ビューアから返される言語表記、"en-us", "fr", "ko" などはこの文字列で上書きされます。もしくはユーザが言語設定を隠すようにしている場合、何も返りません。通常のビューアではオプションとなっているため、スクリプトはこれを信用して使っていません。なので、この特性を RLV のバージョンチェックのより便利な代替手段になるように「ハイジャックする」のが理にかなっています。重要な注意点:この機能は RestrainedLove が v1.16 であっても、v1.21 以前のバージョンには実装できないため、llGetAgentLanguage() が空文字列で返ってきた場合は常に @version をあてにするようにしてください。これも注意点: RestrainedLove 1.16 では、llGetAgentLanguage() は、ログイン中に on_rez で呼ばれた場合、呼び出しが何秒か (何秒かは決まってません) 遅れることがなければ、空文字列を返します。最後の注意点: この機能はv1.16.1(とv1.16b、 Cool SL Viewerの場合) で削除されました。


  • 手動バージョンチェック : "@version"

実装 v1.0a このコマンドはアバターからユーザに IM で送信されなければなりません (オブジェクトからはうまくいきません)。ビューアは送信者に自動的にバージョンを返答しますが、ユーザの IM 窓にはメッセージも回答も表示されないため、すごくこそこそしています。


  • オブジェクトを取り外し可能/不可能にする : "@detach=<y/n>"

実装 v1.0a "n" オプションで呼ばれると、メッセージを送信したオブジェクト (アタッチメントである必要があります) は取り外し不可能となります。"y" オプションで呼ばれると、取り外し可能に戻ります。


  • 装着ポイントをロック解除/ロックする : "@detach:<attach_point_name>=<y/n>"

実装 v1.20 "n" オプションで呼ばれると、<attach_point_name> で示された装着ポイントは、full (その時点でオブジェクトが装着されている) でも empty (装着されていない) でもロックされます。制約がかかった時点でそのポイントに装着されているオブジェクトは、取り外し不能とされます。これは、"@detach=n" コマンド自体が発行されたのとちょうど同じような感じです。装着ポイントが空であればその状態のままとなり、いかなるアイテムもそこに装着することができなくなり、llAttachToAvatar() が呼び出されると失敗するようになります (オブジェクトは装着されますが、すぐに取り外されます) 。


  • 装着ポイントを empty でロック解除/ロックする : "@addattach[:<attach_point_name>]=<y/n>"

実装 v1.22 "n" オプションで呼ばれると、<attach_point_name> で示された装着ポイントは empty でロックされます。制約がかかった時点で装着ポイントに装着されているオブジェクトは取り外し可能ですが、そこに何も装着することができません。装着ポイントが空であればその状態のままとなり、いかなるアイテムもそこに装着することができなくなり、llAttachToAvatar() が呼び出されると失敗するようになります (オブジェクトは装着されますが、すぐに取り外されます) 。<attach_point_name> の指定がない場合、全ての装着ポイントに対して作用します。このコマンドは @addoutfit の片割れで、アタッチメントに対するものです。


  • 装着ポイントを full でロック解除/ロックする : "@remattach[:<attach_point_name>]=<y/n>"

実装 v1.22 "n" オプションで呼ばれると、<attach_point_name> で示された装着ポイントは full でロックされます。制約がかかった時点でそのポイントに装着されているオブジェクトは、取り外し不能とされます。装着ポイントが空であればユーザは何かを装着することができますが、そのオブジェクトは取り外し不能となり、いかなるアイテムに取り替えることもできなくなり、llAttachToAvatar() が呼び出されると失敗するようになります (オブジェクトは装着されますが、すぐに取り外されます) 。<attach_point_name> の指定がない場合、全ての装着ポイントに対して作用します。このコマンドは @remoutfit の片割れで、アタッチメントに対するものです。


  • コンテキストメニューからの「装着」を許可/禁止する : "@defaultwear=<y/n>

実装 v1.21 許可すると、ユーザはいつでもインベントリのコンテキストメニューから「装着」メニューを選ぶことができます。オブジェクトがアバター上でロックされていてもです。これはロックされているオブジェクトをないがしろにするリスクがありますが、5 秒以内に自動的に再装着されます (他に同じようにロックされているオブジェクトがあったら、再装着すべきものがなくなるまで、 1 秒おきに順次行われます) 。しかしながら、デタッチの際に制約を解除するようにスクリプトが組まれたオブジェクト、言い換えると、RLV を使用していればロックされているオブジェクトもデタッチされる可能性があるという事実を考慮していないものもあります。

そのため、このコマンドを "n" オプションで呼び出せばこのメニューは抑制されるものの、名前かフォルダ名に装着先ポイント名称が含まれているオブジェクトは装着できるようになっています。1.21 以前の RLV とちょうど同じように。これはユーザにはちょっと扱いにくい仕様ですが、ロックされているオブジェクトがうっかりデタッチされてしまうことのないようにしなければならないことを考えると、こちらのほうが安全です。


  • プライベートチャネルでの通知を開始/停止する : "@notify:<channel_number>[;word]=<rem/add>"

実装 v1.20, improved in v2.2 (and v1.24) 全ての制約、もしくはセミコロン (";") の後に指定された単語を含んだ名称をもつ制約の追加削除を、ビューアに特定のチャネルで自動的に復唱させます。<channel_number> のプライベートチャネルに返される内容は、他のスクリプトに意図しないコマンドを送ってしまわないように、先頭にスラッシュ ("/") がついています。そして、等号 ("=") の後に、 "n" か "y" がついており、それぞれ制約の追加と削除を示しています。"@clear" コマンドは等号を付加しません。他のスクリプトについての情報が無防備に開示されるのを避けるため、どのオブジェクトが制約を付加したのか撤廃したのかを知ることはできません。one-shot コマンド (force コマンド) も復唱しません。例えば、"@notify:2222;detach=add" はオブジェクトがロックされるたびに "/detach=n" を送信し、オブジェクトのロックが解除されるたびに "/detach=y" を送信します。チャネル 2222 でスクリプトがこれらを受信することになります。

Note : Since v2.2 (and v1.24) you can also set a notification for inventory offers. When your object gives an item or a folder, the avatar using a RLV v2.2 (and v1.24) or higher will respond automatically on the given channel one of the following :

- /accepted_in_rlv inv_offer <folder> : The folder has been accepted and is now available under #RLV (don't forget that the viewer renames it, removing the "#RLV/" prefix).
- /accepted_in_inv inv_offer <folder> : The folder has been accepted but is not shared.
- /declined inv_offer <folder> : The folder has been declined and/or the user has pressed "Block" (formerly "Mute").

Where <folder> is the full path of the folder or item given. For example, #RLV/~MyCuffs. There is a space before "inv_offer", which is a token chosen in a way that it is easy to set a notification for it. If you just want to know whether your folder named #RLV/~MyCuffs has been accepted in the #RLV folder, issue a "@notify:2222;accepted_in_rlv inv_offer #RLV/~MyCuffs=add" command. If you just want to know whether the avatar has received something, issue a simple "@notify:2222;inv_offer=add" command.

  • チャットを許可/禁止する : "@sendchat=<y/n>"

実装 v1.0b 禁止されると、channel 0 でタイプされたものは全て無視されます。しかし、スラッシュ ('/') で始まる emote やメッセージは、それぞれ 30 文字と 15 文字に丸められて通過します (以後変更になる可能性があります) 。()"-*=_^ のような特殊文字が入るメッセージは送信できず、読み捨てられます。ピリオド ('.') が現れると、以降のメッセージは切り捨てられます。


  • emote の丸めを行わない/行う : "@emote=<rem/add>"

実装 v1.01 この例外が追加されると、emote は丸められなくなります (しかし、特殊文字が読み捨てられることには変わりありません) 。


  • shout を許可する/しない : "@chatshout=<y/n>"

実装 v1.15 禁止されると、アバターが shout したときでも、通常の範囲のチャットとなります。メッセージを変更することは全くなく、範囲だけを変更します。


  • 普通の声の大きさで話すことを許可する/しない : "@chatnormal=<y/n>"

実装 v1.15 禁止されると、アバターが普通にチャットしたときでも、whisper となります。メッセージを変更することは全くなく、範囲だけを変更します。


  • whisper を許可する/しない : "@chatwhisper=<y/n>"

実装 v1.15 禁止されると、アバターが whisper したときでも、通常の範囲のチャットとなります。メッセージを変更することは全くなく、範囲だけを変更します。


  • パブリックなチャットをプライベートチャネルにリダイレクトする : "@redirchat:<channel_number>=<rem/add>"

実装 v1.16 有効になると、この制約はパブリックチャネル ("/0") で話した内容を全てオプションで指定されたプライベートチャネルにリダイレクトします。複数の制約がかかると、チャットのメッセージはそれぞれのチャネルにリダイレクトされるようになります。これは emote には適用されず、話している時にアニメーション (タイプ開始、終了、うなずき) が実行されなくなります。この制約は @sendchannel に取って代わるものではありません。

NOTE: As of RLV v1.22.1 / RLVa 1.1.0 @redirchat also truncates emotes on channel 0. It's not clear if this is a bug or a missing note in the API. An additional @emote=add works around this side-effect. Addendum by Henri Beauchamp: as someone who worked together with Marine on the reference implementation, this is clearly a bug and plain unintended. It appeared during some code refactoring, but as always specified before in the API, @redirchat should *not* affect emotes at all. If you want to affect emotes as well, please use @rediremote. This bug was fixed in the Cool VL Viewer.


  • オープンな emote をプライベートチャネルにリダイレクトする : "@rediremote:<channel_number>=<rem/add>"

実装 v1.19 有効になると、この制約はブリックチャネル ("/0") で話した emote を全てオプションで指定されたプライベートチャネルにリダイレクトします。複数の制約がかかると、emote はそれぞれのチャネルにリダイレクトされるようになります。


  • Allow/prevent sending instant messages : "@sendim=<y/n>"

Implemented in v1.0b When prevented, everything typed in IM will be discarded and a bogus message will be sent to the receiver instead.


  • Allow/prevent sending instant messages, secure way : "@sendim_sec=<y/n>"

Implemented in v1.21 When prevented, everything typed in IM will be discarded and a bogus message will be sent to the receiver instead. This particular command accepts exceptions issued from the same object only, opposed to the non-secure way that accepts exceptions from any object.


  • Remove/add exceptions to the instant message sending prevention : "@sendim:<UUID>=<rem/add>"

Implemented in v1.01 When adding an exception, the user can send IMs to the receiver whose UUID is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.


  • Allow/prevent sending instant messages to someone in particular : "@sendimto:<UUID>=<y/n>"

Implemented in v2.3 and v1.25 When prevented, everything typed in IM to the specified avatar will be discarded and a bogus message will be sent instead.


  • Allow/prevent receiving chat messages : "@recvchat=<y/n>"

Implemented in v1.0b When prevented, everything heard in public chat will be discarded except emotes.


  • Allow/prevent receiving chat messages, secure way : "@recvchat_sec=<y/n>"

Implemented in v1.21 When prevented, everything heard in public chat will be discarded except emotes. This particular command accepts exceptions issued from the same object only, opposed to the non-secure way that accepts exceptions from any object.


  • Remove/add exceptions to the chat message receiving prevention : "@recvchat:<UUID>=<rem/add>"

Implemented in v1.01 When adding an exception, the user can hear chat messages from the sender whose UUID is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.


  • Allow/prevent receiving chat messages : "@recvchatfrom:<UUID>=<y/n>"

Implemented in v2.3 and v1.25 When prevented, everything heard in public chat from the specified avatar will be discarded except emotes.


  • Allow/prevent seeing emotes : "@recvemote=<y/n>"

Implemented in v1.19 When prevented, every emote seen in public chat will be discarded.


  • Allow/prevent seeing emotes, secure way : "@recvemote_sec=<y/n>"

Implemented in v1.21 When prevented, every emote seen in public chat will be discarded. This particular command accepts exceptions issued from the same object only, opposed to the non-secure way that accepts exceptions from any object.


  • Remove/add exceptions to the emote seeing prevention : "@recvemote:<UUID>=<rem/add>"

Implemented in v1.19 When adding an exception, the user can see emotes from the sender whose UUID is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.


  • Allow/prevent receiving instant messages : "@recvim=<y/n>"

Implemented in v1.0b When prevented, every incoming IM will be discarded and the sender will be notified that the user cannot read them.


  • Allow/prevent receiving instant messages, secure way : "@recvim_sec=<y/n>"

Implemented in v1.21 When prevented, every incoming IM will be discarded and the sender will be notified that the user cannot read them. This particular command accepts exceptions issued from the same object only, opposed to the non-secure way that accepts exceptions from any object.


  • Remove/add exceptions to the instant message receiving prevention : "@recvim:<UUID>=<rem/add>"

Implemented in v1.01 When adding an exception, the user can read instant messages from the sender whose UUID is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.


  • Allow/prevent receiving instant messages : "@recvimfrom:<UUID>=<y/n>"

Implemented in v2.3 and v1.25 When prevented, every IM received from the the specified avatar will be discarded and the sender will be notified that the user cannot read them.


  • Allow/prevent teleporting to a landmark : "@tplm=<y/n>"

Implemented in v1.0 When prevented, the user cannot use a landmark, pick or any other preset location to teleport there.


  • Allow/prevent teleporting to a location : "@tploc=<y/n>"

Implemented in v1.0 When prevented, the user cannot use teleport to a coordinate by using the map and such.


  • Allow/prevent teleporting by a friend : "@tplure=<y/n>"

Implemented in v1.0 When prevented, the user automatically discards any teleport offer, and the avatar who initiated the offer is notified.


  • Allow/prevent teleporting by a friend, secure way : "@tplure_sec=<y/n>"

Implemented in v1.21 When prevented, the user automatically discards any teleport offer, and the avatar who initiated the offer is notified. This particular command accepts exceptions issued from the same object only, opposed to the non-secure way that accepts exceptions from any object.


  • Remove/add exceptions to the friend teleport prevention : "@tplure:<UUID>=<rem/add>"

Implemented in v1.0 When adding an exception, the user can be teleported by the avatar whose UUID is specified in the command. This overrides the prevention for this avatar only (there is no limit to the number of exceptions), don't forget to remove it when it becomes obsolete.


  • Unlimit/limit sit-tp : "@sittp=<y/n>"

Implemented in v1.0 When limited, the avatar cannot sit on a prim unless it is closer than 1.5 m. This allows cages to be secure, preventing the avatar from warping its position through the walls (unless the prim is too close).


  • Allow/prevent standing up at a different location than where we sat down : @standtp=<y/n>

Implemented in v2.1.2 and v1.24 When this restriction is active and the avatar stands up, it is automatically teleported back to the location where it initially sat down. Please note that the "last standing location" is also stored when the restriction is issued, so this won't be a problem for grabbers and the like, that sit the victim, then move them inside a cell, which issues its restrictions, and then unsits them. In this case the avatar will stay in the cell.


  • Allow/deny permissive exceptions : "@permissive=<y/n>"

Implemented in v1.21 When denied, all restrictions turn into their "secure" counterparts (if any). This means an exception to a restriction will be ignored if it is not issued by the same object that issued the restriction. Using non-secure restrictions (the original ones, like @sendim, @recvim etc) and not using @permissive allow the avatar to benefit from exceptions issued by different objects.

Warning : Using this command (or any secure version of the original commands) may silently discard exceptions issued by different objects (it is even its primary purpose), hence some products may appear to cease working while this restriction is in effect. For example, a product that allows the avatar to always be able to send IMs a particular friend will not be able to overcome a @sendim_sec or a @permissive command sent by another object, and will look like it is broken. Therefore, use with caution and make the user aware of how secure your own product is !


  • オブジェクトに紐づいた全てのルールを消去する : "@clear"

実装 v1.0a、ただし動作するのは v1.04a から このコマンド特定の UUID に紐づいた、全ての制約や例外を消去します。

警告 : デフォルトでデタッチの際に発動することになっていると、@defaultwear が有効の場合に自動的に再装着がされないことがあります。@clear は @detach=n 制約も解除してしまうので、そのアイテムが default-wear-action によってたまたまデタッチされてしまったとビューアが思い込み、再装着しなくなるからです。

考えられる回避方法:

  • @clear=<pattern> で、追加した制約だけを解除する
  • アタッチメントがロックされていないと確信できる場合にだけ、デタッチの際に @clear を発動させる
  • @clear はどんな場合も発動させず、ビューアが制約を回収するまで待つ


  • オブジェクトに紐づいた一部のルールを消去する : "@clear=<string>"

実装 v1.0a、ただし動作するのは v1.04a から このコマンド特定の UUID に紐づいた、<string> という名前をもつ制約や例外を消去します。良い例として、"@clear=tp" があります。これはオブジェクトに紐づいた全ての teleport 制約と例外を消去します。一方で、"@clear=tplure" は友人によるテレポートを許可しない制約のみを消去します。


  • Allow/prevent editing objects : "@edit=<y/n>"

Implemented in v1.03 When prevented from editing and opening objects, the Build & Edit window will refuse to open.


  • Remove/add exceptions to the edit prevention : "@edit:<UUID>=<rem/add>"

Implemented in v2.3 and v1.25 When adding an exception, the user can edit or open this object in particular.


  • Allow/prevent rezzing inventory : "@rez=<y/n>"

Implemented in v1.03 When prevented from rezzing stuff, creating and deleting objects, drag-dropping from inventory and dropping attachments will fail.


  • Allow/prevent editing objects : "@editobj:<UUID>=<y/n>"

'Implemented in v2.3 and v1.25 When prevented, the Build & Edit window will refuse to open when trying to edit or open the specified object.


  • Allow/prevent wearing clothes : @addoutfit[:<part>]=<y/n>

Implemented in v1.10, added skin hair and eyes in v1.10.1 Where part is :

gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape|alpha|tattoo

If part is not specified, prevents from wearing anything beyond what the avatar is already wearing.

Note: Since the release of Viewer 2.0 there are two new avatar skin layers: Tattoo and Avatar Transparency Mask. The alpha and tattoo layers will only be supported by RLV compliant viewers that implement the new Viewer 2.0 features.


  • Allow/prevent removing clothes : @remoutfit[:<part>]=<y/n> (underpants and undershirt are kept for teens)

Implemented in v1.10, added skin hair and eyes in v1.10.1 Where part is :

gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|skin|eyes|hair|shape|alpha|tattoo

If part is not specified, prevents from removing anything in what the avatar is wearing.

Note: Since the release of Viewer 2.0 there are two new avatar skin layers: Tattoo and Avatar Transparency Mask. The alpha and tattoo layers will only be supported by RLV compliant viewers that implement the new Viewer 2.0 features.


  • Force removing clothes : @remoutfit[:<part>]=force (*) (teens can't be forced to remove underpants and undershirt)

Implemented in v1.10 Where part is :

gloves|jacket|pants|shirt|shoes|skirt|socks|underpants|undershirt|alpha|tattoo

If part is not specified, removes everything.

Note: Since the release of Viewer 2.0 there are two new avatar skin layers: Tattoo and Avatar Transparency Mask. The alpha and tattoo layers will only be supported by RLV compliant viewers that implement the new Viewer 2.0 features.

Note: skin, shape, eyes and hair cannot be removed since they are body parts (and removing any would result in an unrezzed avatar).


  • Force removing attachments : @detach[:attachpt]=force (*)

Implemented in v1.10 Where part is :

chest|skull|left shoulder|right shoulder|left hand|right hand|left foot|right foot|spine|
pelvis|mouth|chin|left ear|right ear|left eyeball|right eyeball|nose|r upper arm|r forearm|
l upper arm|l forearm|right hip|r upper leg|r lower leg|left hip|l upper leg|l lower leg|stomach|left pec|
right pec|center 2|top right|top|top left|center|bottom left|bottom|bottom right

If part is not specified, removes everything.


  • Force removing attachments (alias) : @remattach[:attachpt]=force (*)

Implemented in v1.22 This command is an alias to @detach[:attachpt]=force (to keep things consistent).


  • Get the list of worn clothes : @getoutfit[:part]=<channel_number>

Implemented in v1.10, added skin hair and eyes in v1.10.1 Makes the viewer automatically answer the current occupation of clothes layers as a list of 0s (empty) and 1s (occupied) immediately on the chat channel number <channel_number> that the script can listen to. Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout.

The list of 0s and 1s corresponds to :

gloves,jacket,pants,shirt,shoes,skirt,socks,underpants,undershirt,skin,eyes,hair,shape

in that order.

If a part is specified, answers a single 0 (empty) or 1 (occupied) corresponding to the part.

Ex 1 : @getoutfit=2222 => "0011000111" => avatar is wearing pants, shirt, underpants and undershirt, and of course a skin.
Ex 2 : @getoutfit:socks=2222 => "0" => the avatar is not wearing socks.

Note: For viewers that implement the new Viewer 2.0 features, the list is:

gloves,jacket,pants,shirt,shoes,skirt,socks,underpants,undershirt,skin,eyes,hair,shape,alpha,tattoo


  • Get the list of worn attachments : @getattach[:attachpt]=<channel_number>

Implemented in v1.10 Makes the viewer automatically answer the current occupation of attachment points as a list of 0s (empty) and 1s (occupied) immediately on the chat channel number <channel_number> that the script can listen to. Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout.

The list of 0s and 1s corresponds to :

none,chest,skull,left shoulder,right shoulder,left hand,right hand,left foot,right foot,spine,
pelvis,mouth,chin,left ear,right ear,left eyeball,right eyeball,nose,r upper arm,r forearm,
l upper arm,l forearm,right hip,r upper leg,r lower leg,left hip,l upper leg,l lower leg,stomach,left pec,
right pec,center 2,top right,top,top left,center,bottom left,bottom,bottom right

in that order.

If an attachment point is specified, answers a single 0 (empty) or 1 (occupied) corresponding to the point.

Ex 1 : @getattach=2222 => "011000011010000000000000100100000000101" => avatar is wearing attachments on 
chest, skull, left and right foot, pelvis, l and r lower leg, HUD bottom left and HUD bottom right.
Ex 2 : @getattach:chest=2222 => "1" => avatar is wearing something on the chest.

Note : The first character ("none") is always '0', so the index of each attach point in the string is exactly equal to the corresponding ATTACH_* macro in LSL. For instance, the index 9 in the string is ATTACH_BACK (which means "spine"). Remember the indices start at zero.


  • Force the viewer to automatically accept attach and take control permission requests : @acceptpermission=<rem/add>

Implemented in v1.16 Forces the avatar to automatically accept attach and take control permission requests. The dialog box doesn't even show up. This command does not supercede @denypermission, of course.


  • Allow/prevent accepting attach and take control permissions : @denypermission=<rem/add>

Implemented in v1.16, DEPRECATED in v1.16.2 When prevented, all attach and take control permission requests are automatically declined, without even showing the dialog box. Due to the extreme annoyance it was making, and because locked objects automatically reattach themselves since v1.16.1, this command is NOW DEPRECATED, DON'T USE IT !


  • Allow/prevent using inventory : @showinv=<y/n>

Implemented in v1.10 Forces the inventory windows to close and stay closed.


  • Allow/prevent reading notecards : @viewnote=<y/n>

Implemented in v1.10 Prevents from opening notecards but does not close the ones already open.


  • Allow/prevent opening scripts : @viewscript=<y/n>

Implemented in v1.22 Prevents from opening scripts but does not close the ones already open.


  • Allow/prevent opening textures : @viewtexture=<y/n>

Implemented in v1.22 Prevents from opening textures (and snapshots) but does not close the ones already open.


  • Allow/prevent standing up : @unsit=<y/n>

Implemented in v1.10, modified in v1.15 to prevent teleporting as well Hides the Stand up button. From v1.15 it also prevents teleporting, which was a way to stand up.


  • Force sit on an object : @sit:<UUID>=force (*)

Implemented in v1.10 Does not work if the user is prevented from sit-tping and further than 1.5 meters away, or when prevented from unsitting.


  • Force unsit : @unsit=force (*)

Implemented in v1.10 Self-explanatory but for some reason it randomly fails, so don't rely on it for now. Further testing is needed.


  • Allow/prevent sitting down : @sit=<y/n>

Implemented in v1.16.2 Prevents the user from sitting on anything, including with @sit:UUID=force.


  • Allow/prevent using any chat channel but certain channels : @sendchannel[:<channel>]=<y/n>

Implemented in v1.10 Complimentary of @sendchat, this command prevents the user from sending messages on non-public channels. If channel is specified, it becomes an exception to the aforementioned restriction (then it is better to use "rem" or "add" instead of "y" or "n" respectively). It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc.


  • Allow/prevent using any chat channel but certain channels, secure way : @sendchannel_sec[:<channel>]=<y/n>

Implemented in v1.10 Complimentary of @sendchat, this command prevents the user from sending messages on non-public channels. If channel is specified, it becomes an exception to the aforementioned restriction (then it is better to use "rem" or "add" instead of "y" or "n" respectively). It does not prevent the viewer automatic replies like @version=nnnn, @getstatus=nnnn etc. This particular command only accepts exceptions issued from the same object, opposed to its non-secure version which accepts exceptions from any other object.


  • Get the list of restrictions the avatar is currently submitted to : @getstatus[:<part_of_rule>]=<channel>

Implemented in v1.10, slightly tweaked in v1.16 Makes the viewer automatically answer the list of rules the avatar is currently under, only for the object containing the script issuing that command, immediately on the chat channel number <channel_number> that the script can listen to. Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. The answer is a list of rules, separated by slashes ('/'). Attention : since v1.16 a slash is prepended at the beginning of the string. This does not confuse llParseString2List() calls, but does confuse llParseStringKeepNulls() calls !

This command is useful for people who write scripts that may conflict with other scripts in the same object (for instance : third-party plugins). Conflicts do not occur in different objects, that's why this command only applies to the object calling it.

<part_of_rule> is the name of a rule, or a part of it, useful if the script only needs to know about a certain restriction.

Example : If the avatar is under tploc, tplure, tplm and sittp, here is what the script would get :
@getstatus=2222  =>  /tploc/tplure/tplm/sittp
@getstatus:sittp=2222  =>  /sittp
@getstatus:tpl=2222  =>  /tploc/tplure/tplm  (because "tpl" is part of "tploc", "tplure" and "tplm" but not "sittp")


  • Get the list of all the restrictions the avatar is currently submitted to : @getstatusall[:<part_of_rule>]=<channel>

Implemented in v1.15, slightly tweaked in v1.16 Makes the viewer automatically answer the list of rules the avatar is currently under, for all the objects regardless of their UUID, contrary to @getstatus, immediately on the chat channel number <channel_number> that the script can listen to. Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. The answer is a list of rules, separated by slashes ('/'). Attention : since v1.16 a slash is prepended at the beginning of the string. This does not confuse llParseString2List() calls, but does confuse llParseStringKeepNulls() calls !


  • Get the list of shared folders in the avatar's inventory : @getinv[:folder1/.../folderN]=<channel_number>

Implemented in v1.11, added sub-folders in v1.13 Makes the viewer automatically answer the list of folders contained into the folder named "#RLV" (if it exists), immediately on the chat channel number <channel_number> that the script can listen to. If folders are specified, it will give the list of sub-folders contained into the folder located at that path instead of the shared root (example : "@getinv:Restraints/Leather cuffs/Arms=2222"). Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout.

The answer is a list of names, separated by commas (","). Folders which names begin with a dot (".") will be ignored.


  • Get the list of shared folders in the avatar's inventory, with information about worn items : @getinvworn[:folder1/.../folderN]=<channel_number>

Implemented in v1.15 Makes the viewer automatically answer the list of folders contained into the folder named "#RLV" (if it exists), immediately on the chat channel number <channel_number> that the script can listen to. If folders are specified, it will give the list of sub-folders contained into the folder located at that path instead of the shared root (example : "@getinvworn:Restraints/Leather cuffs/Arms=2222"). Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout.

The answer is a comma-separated list of names, each one followed with a pipe ("|") and two digits. The current folder is put in first position (as opposed to @getinv which does not show the current folder, obviously), but without a name, only the pipe and the two digits.

Object : "@getinvworn:Restraints/Leather cuffs=2222"
Viewer : "|02,Arms|30,Legs|10"

Folders which names begin with a dot (".") will be ignored. The two digits are calculated as follows :

First digit : Proportion of items worn in the corresponding folder (including no-mod items). In this example, the "3" of "30" means "all the items in the "Arms" folder are currently worn, while the "1" of "10" means "no item in the Legs folder is currently worn, but there are items to wear".

Second digit : Proportion of items globally worn in all the folders contained inside the corresponding folder. In this example, the "2" of "02" means "some items are worn in some of the folders contained into "Leather cuffs".

The digits, comprised between 0 and 3 included, have the following meaning :

  • 0 : No item is present in that folder
  • 1 : Some items are present in that folder, but none of them is worn
  • 2 : Some items are present in that folder, and some of them are worn
  • 3 : Some items are present in that folder, and all of them are worn


  • Get the path to a shared folder by giving a search criterion : @findfolder:part1[&&...&&partN]=<channel_number>

Implemented in v1.13.1 Makes the viewer automatically answer the path to the first shared folder which name contains <part1> and <part2> and ... and <partN>, immediately on the chat channel number <channel_number> that the script can listen to. The search is in depth first, notice the separator which is "&&" like "and". Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."), nor folders which name begins with a tilde ("~"). The answer is a list of folders, separated by slashes ('/').


  • 共有フォルダ内のアイテムを強制装着させる : @attach:<folder1/.../folderN>=force (*)

実装 v1.11、編集不可能なアイテムについては v1.12 で対応、サブフォルダは v1.13 で対応 ビューアに指定されたパス (#RLV の配下にある必要があります) にあるフォルダの中にある全てのオブジェクトと服を装着させます。オブジェクトの名前は 必ず 装着先ポイント名を含んでいなければならず、含んでいないと装着されません。編集不可能なオブジェクトは、名称変更ができないため、 必ず それぞれ名称に装着ポイントの名称を含むフォルダの中に入っていなければなりません( 1 つのフォルダに 1 個のオブジェクト) 。名称の先頭にドット (".") があってはなりません。そのようなフォルダはスクリプトからは見えないからです。

装着ポイントの名前は、「装着先」サブメニューにある名前と同じものです。"skull", "chest", "l forearm" などなど。

注意 1:フォルダの名前にスラッシュを含めることは 可能 です。そのときには、その名前がフォルダ名となっているものがあれば優先して選択されます。 (例えば、"@attach:Restraints/cuffs=force" が発行されると、"Restraints/cuffs" フォルダが選択され、その後に "Restraints" という親フォルダの中の "cuffs" フォルダが選択されることになります)

Note 2 : If the name of a folder begins with a plus sign ("+"), then this command will act exactly like @attachover. This rule can be changed through the use of the "RestrainedLoveStackWhenFolderBeginsWith" debug setting.


  • Force attach items contained inside a shared folder, without replacing what is already being worn : @attachover:<folder1/.../folderN>=force (*)

Implemented in v2.1.2 and v1.24 This command works exactly like @attach described hereabove, except that it won't kick objects and pieces of clothing that are already being worn.


  • 共有フォルダ内のアイテムを子フォルダも再帰的に強制装着させる : @attachall:<folder1/.../folderN>=force (*)

実装 v1.15 このコマンドは先ほどの @attach と全く同じように動作しますが、子フォルダの中にあるものも全て装着します。


  • Force attach items contained inside a shared folder, without replacing what is already being worn : @attachallover:<folder1/.../folderN>=force (*)

Implemented in v2.1.2 and v1.24 This command works exactly like @attachall described hereabove, except that it won't kick objects and pieces of clothing that are already being worn.


  • 共有フォルダ内のアイテムを強制デタッチさせる : @detach:<folder_name>=force (*)

実装 v1.11 ビューアに <folder_name> (#RLV の配下にある必要があります) の中にあるオブジェクトを取り外し、服を脱ぐようにさせます。"@detach" が装着ポイントの名称 (skull, pelvis... 上記参照のこと) と一緒に使われていると、同じコマンドのため、そちらがこの方法より優先します。


  • 共有フォルダ内のアイテムを子フォルダも再帰的に強制デタッチさせる : @detachall:<folder1/.../folderN>=force (*)

実装 v1.15 このコマンドは先ほどの @detach と全く同じように動作しますが、子フォルダの中にあるものも全てデタッチします。


  • Get the path to the shared folder containing a particular object/clothing : @getpath[:<attachpt> or <clothing_layer>]=<channel_number>

Implemented in v1.16 Makes the viewer automatically answer the path to the shared folder containing the item that :

    • issues this command if no option is set
    • is attached on the attach point provided in the option field, ex : @getpath:spine=2222 => "Restraints/Collar"
    • is worn on the clothing layer provided in the option field, ex : @getpath:pants=2222 => "Casual/Jeans/Tight"

Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."). The answer is a list of folders, separated by slashes ('/').

Please note : As version 1.40.4 is now live on the main grid, wearing several objects on the same attachment point is now possible. Therefore this command does not make much sense anymore since it can only respond with one folder, while the several objects could belong to several folders. Therefore it is better to use @getpathnew, since @getpath will slowly become deprecated as more and more users switch to 2.1 and beyond.


  • Get the paths to the shared folders containing the objects/clothing worn on a point : @getpathnew[:<attachpt> or <clothing_layer>]=<channel_number>

Implemented in v2.1 and v1.24 Makes the viewer automatically answer the paths to the shared folders containing the item(s) that :

    • issues this command if no option is set
    • are attached on the attach point provided in the option field, ex : @getpath:spine=2222 => "Restraints/Collar,Jewelry/Cute necklace"
    • is worn on the clothing layer provided in the option field, ex : @getpath:pants=2222 => "Casual/Jeans/Tight"

Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. It does not take disabled folders into account (folders which name begins with a dot "."). The answer is a list of folders, separated by slashes ('/'), if several paths must be returned because several outfits are concerned, they are organized in a list of strings separated by commas (',').

This command has been added to replace @getpath, since in 2.1 several objects can be worn on the same attachment point.


  • Force attach items contained into a shared folder that contains a particular object/clothing : @attachthis[:<attachpt> or <clothing_layer>]=force (*)

Implemented in v1.16 This command is a shortcut for a @getpath followed with an @attach command (this saves a listener and a timeout).


  • Force attach items contained inside a shared folder, without replacing what is already being worn : @attachthisover[:<attachpt> or <clothing_layer>]=force (*)

Implemented in v2.1.2 and v1.24 This command works exactly like @attachthis described hereabove, except that it won't kick objects and pieces of clothing that are already being worn.


  • Force attach items contained into a shared folder that contains a particular object/clothing, and its children folders : @attachallthis[:<attachpt> or <clothing_layer>]=force (*)

Implemented in v1.16 This command is a shortcut for a @getpath followed with an @attachall command (this saves a listener and a timeout).


  • Force detach items contained into a shared folder that contains a particular object/clothing : @detachthis[:<attachpt> or <clothing_layer>]=force (*)

Implemented in v1.16 This command is a shortcut for a @getpath followed with a @detach command (this saves a listener and a timeout).


  • Force detach items contained into a shared folder that contains a particular object/clothing, and its children folders : @detachallthis[:<attachpt> or <clothing_layer>]=force (*)

Implemented in v1.16 This command is a shortcut for a @getpath followed with a @detachall command (this saves a listener and a timeout).


  • Force detach an item : @detachme=force (*)

Implemented in v1.16.2 This command forces the object that issues it to detach itself from the avatar. It is there as a convenience to avoid a race condition when calling @clear then llDetachFromAvatar(), sometimes the object could detach itself before clearing its restrictions, making it reattach automatically after a while. With this command one can issue a @clear,detachme=force to be sure @clear is executed first.


  • Allow/prevent removing some folders : @detachthis[:<layer>|<attachpt>|<path_to_folder>]=<y/n>

Implemented in v2.3 and v1.25 When prevented, the user is unable to remove a folder if either of these conditions is filled : - no option is specified and the folder contains the object that issues this restriction - the "layer" option is set (shirt, pants...) and the folder contains a piece of clothing that is worn on this layer - the "attachpt" option is set (l forearm, spine...) and the folder contains an attachment that is worn on this point - the "path_to_folder" option is set and the folder corresponds to this location

Moreso, this folder or these folders cannot be renamed, moved, deleted or modified.


  • Allow/prevent removing some folders and their children : @detachallthis[:<layer>|<attachpt>|<path_to_folder>]=<y/n>

Implemented in v2.3 and v1.25 These commands do exactly like @detachthis, but also apply to their children folders recursively.


  • Allow/prevent wearing some folders : @attachthis:<layer>|<attachpt>|<path_to_folder>=<y/n>

Implemented in v2.3 and v1.25 When prevented, the user is unable to attach a folder if either of these conditions is filled : - the "layer" option is set (shirt, pants...) and the folder contains a piece of clothing that is meant to be worn on this layer - the "attachpt" option is set (l forearm, spine...) and the folder contains an attachment that is meant to be worn on this point - the "path_to_folder" option is set and the folder corresponds to this location

Moreso, this folder or these folders cannot be renamed, moved, deleted or modified.


  • Allow/prevent removing some folders and their children : @attachallthis[:<layer>|<attachpt>|<path_to_folder>]=<y/n>

Implemented in v2.3 and v1.25 These commands do exactly like @attachthis, but also apply to their children folders recursively.


  • Allow/prevent touching objects located further than 1.5 meters away from the avatar : @fartouch=<y/n>

Implemented in v1.11 When prevented, the avatar is unable to touch/grab objects from more than 1.5 m away, this command makes restraints more realistic since the avatar litterally has to press against the object in order to click on it.


  • Allow/prevent viewing the world map : @showworldmap=<y/n>

Implemented in v1.11 When prevented, the avatar is unable to view the world map, and it closes if it is open when the restriction becomes active.


  • Allow/prevent viewing the mini map : @showminimap=<y/n>

Implemented in v1.11 When prevented, the avatar is unable to view the mini map, and it closes if it is open when the restriction becomes active.


  • Allow/prevent knowing the current location : @showloc=<y/n>

Implemented in v1.12 When prevented, the user is unable to know where they are : the world map is hidden, the parcel and region name on the top menubar are hidden, they can't create landmarks, nor buy the land, nor see what land they have just left after a teleport, nor see the location in the About box, and even system and object messages are obfuscated if they contain the name of the region and/or the name of the parcel. However, llOwnerSay calls are not obfuscated so radars will still work (and RL commands as well).


  • ユーザを強制テレポートさせる : @tpto:<X>/<Y>/<Z>=force (*)

実装 v1.12 このコマンドはアバターを指定した座標にテレポートさせます。ここで注意しておきたいのは、座標は常に グローバル なので、コマンドの呼び出しを簡単に考えてはいけないということです。もっと言うと、テレポート先がテレハブやテレポート・ルートを含む場合、指定された場所ではなくそちらに飛んでしまいます。これは SL の制約です。また、@tpto は @tploc=n によって打ち消され、v1.15 以上では、@unsit によっても打ち消されることを覚えておいてください。

このコマンドを正しく呼び出している例を示します。

<lsl>

// 強制テレポートのサンプル // チャネル 4 で ローカル座標と SIM 名を取得し、 // ビューアにそこにテレポートするように指示します // // 作者 Marine Kelley 2008-08-26 // 動作する RLV のバージョン : 1.12 以上 // // 使い方 : // * 箱の中にスクリプトを作成します // * スクリプトの中身をこれに書き換えます // * 箱を装着します。 // * テレポート先をチャネル 4 で 地域/X/Y/Z のように言います // 例: /4 Help Island Public/128/128/50

key kRequestHandle; // dataserver へのリクエストの UUID vector vLocalPos; // 取得した ローカル座標

Init () {

 kRequestHandle = NULL_KEY;
 llListen (4, "", llGetOwner (), "");

}


default {

 state_entry () {
   Init ();
 }
 
 on_rez(integer start_param) {
   Init ();
 }
 
 listen(integer channel, string name, key id, string message) {
   list tokens = llParseString2List (message, ["/"], []);
   integer L = llGetListLength (tokens);
   if (L==4) {
     // ローカルの X, Y, Z 座標を取得します
     vLocalPos.x = llList2Float (tokens, 1);
     vLocalPos.y = llList2Float (tokens, 2);
     vLocalPos.z = llList2Float (tokens, 3);
     // SIM 情報を取得します
     kRequestHandle=llRequestSimulatorData (llList2String (tokens, 0), DATA_SIM_POS);
   }
 }
 
 dataserver(key queryid, string data) {
   if (queryid == kRequestHandle) {
     // dataserver の返答を解析します (vector を string にキャストします)
     list tokens = llParseString2List (data, ["<", ",", ">"], []);
     string pos_str = "";
     vector global_pos;
     // dataserver から取得した座標は、この SIM の南西端の座標です
     // => 指定された ローカル座標で補正します
     global_pos.x = llList2Float (tokens, 0);
     global_pos.y = llList2Float (tokens, 1);
     global_pos.z = llList2Float (tokens, 2);
     global_pos += vLocalPos;
     // コマンドを構成します。
     pos_str =      (string)((integer)global_pos.x)
               +"/"+(string)((integer)global_pos.y)
               +"/"+(string)((integer)global_pos.z);
     llOwnerSay ("Global position : "+(string)pos_str); // デバッグ用
     // ちゅどーん!
     llOwnerSay ("@tpto:"+pos_str+"=force");
   }
 }
 

}

</lsl>


  • Remove/add auto-accept teleport offers from a particular avatar : "@accepttp[:<UUID>]=<rem/add>"

Implemented in v1.15, slightly improved in v1.16 Adding this rule will make the user automatically accept any teleport offer from the avatar which key is <UUID>, exactly like if that avatar was a Linden (no confirmation box, no message, no Cancel button). This rule does not supercede nor deprecate @tpto because the former teleports to someone, while the latter teleports to an arbitrary location. Attention : in v1.16 the UUID becomes optional, which means that @accepttp=add will force the user to accept teleport offers from anyone ! Use with caution !


  • Allow/prevent seeing the names of the people around : @shownames=<y/n>

Implemented in v1.12.2, added more dummy names in v1.16 When prevented, the user is unable to know who is around. The names don't show on the screen, the names on the chat are replaced by "dummy" names such as "Someone", "A resident", the tooltips are hidden, the pie menu is almost useless so the user can't get the profile directly etc.


  • Allow/prevent seeing all the hovertexts : @showhovertextall=<y/n>

Implemented in v1.19 When prevented, the user is unable to read any hovertext (2D text floating above some prims).


  • Allow/prevent seeing one hovertext in particular : @showhovertext:<UUID>=<y/n>

Implemented in v1.19 When prevented, the user is unable to read the hovertext floating above the prim which id is UUID. This is made that way so that the restriction can be issued on an object, by another one (unlike @detach which can only set this restriction on itself).


  • Allow/prevent seeing the hovertexts on the HUD of the user : @showhovertexthud=<y/n>

Implemented in v1.19 When prevented, the user is unable to read any hovertext showing over their HUD objects, but will be able to see the ones in-world.


  • Allow/prevent seeing the hovertexts in-world : @showhovertextworld=<y/n>

Implemented in v1.19 When prevented, the user is unable to read any hovertext showing over their in-world objects, but will be able to see the ones over their HUD.


  • Allow/prevent flying : @fly=<y/n>

Implemented in v1.12.2 When prevented, the user is unable to fly.


  • Get the UUID of the object the avatar is sitting on : @getsitid=<channel_number>

Implemented in v1.12.4 Makes the viewer automatically answer the UUID of the object the avatar is currently sitting on, or NULL_KEY if they are not sitting.


  • Force rotate the avatar to a set direction : @setrot:<angle_in_radians>=force

Implemented in v1.17 Forces the avatar to rotate towards a direction set by an angle in radians from the north. Note that this command is not very precise, nor will do anything if the action attempts to rotate the avatar by less than 10° (experimental value, it has been mentioned somewhere that 6° was the minimum). In other words, it is best to either check with a llGetRot() first, or to make the avatar turn twice, first 180° plus the desired angle, then by the angle we need. It isn't very elegant but it works.


  • Allow/prevent changing some debug settings : @setdebug=<y/n>

Implemented in v1.16 When prevented, the user is unable to change some viewer debug settings (Advanced > Debug Settings). As most debug settings are either useless or critical to the user's experience, a whitelist approach is taken : only a few debug settings are locked, the others are always available and untouched. At the time of this writing, the allowed debug settings are :

    • AvatarSex (0 : Female, 1 : Male) : gender of the avatar at creation.
    • RenderResolutionDivisor (1 -> ...) : "blurriness" of the screen. Combined to clever @setenv commands, can simulate nice effects. Note: renderresolutiondivisor is a Windlight only option (Basic Shaders must be enabled in graphics preferences) and as such, is not available in v1.19.0.5 or older viewers.


  • Force change a debug setting : @setdebug_<setting>:<value>=force (*)

Implemented in v1.16 Forces the viewer to change a particular debug setting and set it to <value>. This command is actually a package of many sub-commands, that are regrouped under "@setdebug_...", for instance "@setdebug_avatarsex:0=force", "@setdebug_renderresolutiondivisor:64=force" etc.

See the list of allowed debug settings in the @setdebug command hereabove.


  • Get the value of a debug setting : @getdebug_<setting>=<channel_number>

Implemented in v1.16 Makes the viewer automatically answer the value of a debug setting, immediately on the chat channel number <channel_number> that the script can listen to. Always use a positive integer. Remember that regular viewers do not answer anything at all so remove the listener after a timeout. The answer is the value that has been set with the <setting> part of the matching @setdebug command, or by hand.

See the list of allowed debug settings in the @setdebug command hereabove.


  • 環境の設定の変更を許可/禁止する : @setenv=<y/n>

実装 v1.14 禁止すると、ユーザはビューアで環境の設定を変更することができません。 (世界 > 環境の設定 > 日の出/正午/日没/深夜/地域の標準設定に戻す/環境編集は全てロックされます)。


  • 環境の設定を強制的に変更させる : @setenv_<setting>:<value>=force (*)

実装 v1.14 ビューアに特定の環境の設定 (時刻や Windlight) を <value> の値に変えさせます。このコマンドの実態はたくさんのサブコマンドの集合体です。これらは "@setenv_..." の配下にグルーピングされます。例えば、"@setenv_daytime:0.5=force"、 "@setenv_bluehorizonr:0.21=force" などです。

このコマンドは (他の "force" コマンドと同じように) 既に当該制約が設定されていれば、何もせずに復帰します。しかし、 "@setenv" の場合は、制約を作成したオブジェクトから変更がかかると、その制約が無視されます。言い換えると、首輪は環境の設定の変更を強制させることができますが、それ自身によって変更することができます。しかし、他のオブジェクトは、首輪がその制約を撤廃するまでそれを変更できません。

それぞれに指定できる値の範囲が定められていますが、ビューアではチェックされません。そのため、スクリプトではブラウザからはできないような、面白い効果を出すことができます。ただし自己責任で使ってください。ここでの範囲は、環境編集ダイアログのつまみの動かせる範囲を参考までに示しています。

それぞれのサブコマンドは、以下のように動作します (名前はなるべくビューアの Windlight パネルに似たものを選んでいます)。

@setenv_XXX:<value>=force where XXX is... <value> range Sets...
daytime 0.0-1.0 and <0 時間帯 (日の出:0.25, 正午:0.567, 日没:0.75, 深夜:0.0, 地域の標準設定に戻す:<0). 注意。全ての Windlight の設定をリセットします
preset String 環境の事前設定, 例えば Gelatto, Foggy など。 注意。事前設定をロードするのはブラウザに負担がかかり、一瞬動作が重くなるので、1秒おきに実行することのないように
ambientr 0.0-1.0 アンビエント光, 赤
ambientg 0.0-1.0 アンビエント光, 緑
ambientb 0.0-1.0 アンビエント光, 青
ambienti 0.0-1.0 アンビエント光, 輝度
bluedensityr 0.0-1.0 空の配色と濃度, 赤
bluedensityg 0.0-1.0 空の配色と濃度, 緑
bluedensityb 0.0-1.0 空の配色と濃度, 青
bluedensityi 0.0-1.0 空の配色と濃度, 輝度
bluehorizonr 0.0-1.0 空の色, 赤
bluehorizong 0.0-1.0 空の色, 緑
bluehorizonb 0.0-1.0 空の色, 青
bluehorizoni 0.0-1.0 空の色, 輝度
cloudcolorr 0.0-1.0 雲の色, 赤
cloudcolorg 0.0-1.0 雲の色, 緑
cloudcolorb 0.0-1.0 雲の色, 青
cloudcolori 0.0-1.0 雲の色, 輝度
cloudcoverage 0.0-1.0 空を覆う雲の量
cloudx 0.0-1.0 雲の位置 X
cloudy 0.0-1.0 雲の位置 Y
cloudd 0.0-1.0 雲の密度
clouddetailx 0.0-1.0 雲の詳細 X
clouddetaily 0.0-1.0 雲の詳細 Y
clouddetaild 0.0-1.0 雲の詳細 密度
cloudscale 0.0-1.0 雲のスケール
cloudscrollx 0.0-1.0 雲の移動速度 (X 方向)
cloudscrolly 0.0-1.0 雲の移動速度 (Y 方向)
densitymultiplier 0.0-0.9 大気の不透明度の増幅
distancemultiplier 0.0-100.0 視界の増幅
eastangle 0.0-1.0 東の角度, 0.0 が普通
hazedensity 0.0-1.0 大気の不透明度
hazehorizon 0.0-1.0 空と遠景の露光
maxaltitude 0.0-4000.0 最大高度
scenegamma 0.0-10.0 風景ガンマ, 1.0 が普通
starbrightness 0.0-2.0 星の輝き
sunglowfocus 0.0-0.5 太陽の輝き フォーカス
sunglowsize 1.0-2.0 太陽の輝き サイズ
sunmooncolorr 0.0-1.0 太陽/月の色, 赤
sunmooncolorg 0.0-1.0 太陽/月の色, 緑
sunmooncolorb 0.0-1.0 太陽/月の色, 青
sunmooncolori 0.0-1.0 太陽/月の色, 輝度
sunmoonposition 0.0-1.0 太陽/月の位置, 「時間帯」とは異なります。 事前設定をロードした後に、太陽の光を設定するのに使用してください

注意: 上記の設定のうち、"daytime" のみが v1.14 以上の RestrainedLove が実装されている v1.19.0 の (もしくはより古い) ビューアでサポートされています。他の設定は無視されます。これらのビューアには Windlight レンダラが実装されていないからです。


(*) 相応の制約によってユーザがそうすることができない場合は、何もせずに復帰します。これは仕様です。

   Ex : オブジェクトが取り外し不能の場合、Force detach はできません。ユーザが脱衣不能の場合、Force undress はできません。


  • 環境の設定の設定値を取得する : @getenv_<setting>=<channel_number>

実装 v1.15 ビューアに環境の設定の設定値を自動的に回答させ、<channel_number> で指定したチャネルにすぐに載せてスクリプトが拾えるようにします。常に正の値を使用してください。普通のビューアは何も回答しないことを念頭に、タイムアウトの後でリスナーを削除するようにしてください。復帰値は 対応する @setenv コマンドで <setting> パートにセットされた値か、手動で設定した値です。上述の設定内容一覧表を参照してください。
注意: @getenv_daytime だけが RestrainedLove v1.15 以上が実装されている v1.19.0 の (もしくはより古い、 例えば Windlight でない) ビューアでサポートされています。

sendchat などのグローバルな挙動に関する重要な注意点

挙動がグローバルである、というのは、それが特定のオブジェクトに依存しないことを意味します。しかしながら、これらは可変の UUID が設定されているオブジェクトから引き起こされるものです。複数のオブジェクトが同じ挙動を追加することができます。これらは、UUID が異なることから、複数回にわたって格納されることになります。

これには嬉しい副作用があります。チャットを禁止する2つの装置を装着しているときは、両方の装置のロックを解除しないとチャットを再開することができません。しかしこれにはいやらしい副作用もあります。(例えばrezし直されたりして)アイテムの UUID が変更され、そのアイテムがチャットを許可する設定となっていなかった場合、ユーザは少しの間待たなければなりません。これは、ガベージ・コレクタ が回収するまでの間、そのルールは「不明」(UUID が現存しない)のまま残るからです。

注意:1.16.1 から、オブジェクトにロックをかけると、どのようにしてロックをかけたかに関わらず(例えばllAttachToAvatar)、そのオブジェクトは必ず 5 秒後にビューアによって自動的に再装着されます。つまり、デタッチの際に @clear を呼び出すと、確かにオブジェクトのロックは解除されますが、再装着後に再びロックをかける必要があります。このため、デタッチの際に @clear を呼び出すことは、1.16.1 より前のバージョンとは反対に、今では推奨されません。

共有フォルダ

バージョン 1.11 から、ビューアはインワールドのスクリプトと一部のアイテムを「共有」し、強制的に着脱させたり、共有しているものをリストで表示したりすることができるようになりました。

「共有」というのは、他の人が欲しいときにそのアイテムを持っていくという意味ではなく(譲渡不能のアイテムもあるわけですから)、単に、他の人が自由自在に、アイテムを持つ本人に対する制約が含まれたスクリプトを通じて、それらの着脱を強制させることができるという意味です。これらのアイテムはインベントリに残ります。In fact, this feature would be best named "Exposed folder".

やり方:

  • 「#RLV」という名前のフォルダを「My Inventory」直下に作成します(「My Inventory」を右クリックして「新しいフォルダ」を選択)。これを以降の手順では「共有フォルダ」と呼びます。
  • 制約が含まれるフォルダや、その他装着するものを新しく作成したフォルダの直下に移動します。
  • あとは、フォルダの中のものを装着するだけです!

すると、このようなフォルダ構成になります。

My Inventory
|- #RLV
|  |- cuffs
|  |  |- left cuff (l forearm)   (no copy)
|  |  \- right cuff (r forearm)   (no copy)
|  \- gag
|     \- gag (mouth)   (no copy)
|- Animations
|- Body Parts
.
.
.

例:RR Straps という名前の一式を持っている場合、「Straps BOXED」フォルダを共有フォルダ直下にとりあえず移動します。

移動したフォルダ(1度に1個のフォルダです!)の中のアイテムを全部装着するか、自分で変名して、それぞれのアイテムの名前が装着ポイントの名前を含むようにします。例えば、「left cuff (l forearm)」、「right ankle cuff (r lower leg)」のようにします。編集不能なアイテムを共有するのはちょっと難しいので注意してください。人の手でもビューアでも名前を書き換えることができないからです。これについては後ほど説明します。

装着ポイント名はインベントリのメニューの中の「装着先」から調べることができます。大文字小文字は関係ありません (例:"chest", "skull", "stomach", "left ear", "r upper arm"...)。アイテムを装着したときに、変名されていなければ最初に自動的に変名されます。ただし、共有フォルダの中にあり、装着ポイント名が含まれておらず、編集可能なアイテムに限ります。もし他の装着ポイントに装着したい場合は、まず手で変名する必要があります。

服のパーツはまったく同じように扱われます(それどころか、制約フォルダに置け、同じコマンドで装着することができます)。例えば靴は、混在したアウトフィットの良い例となります。いくつかの装着パーツとレイヤ靴で構成されています。服は自動的に変名されることはありません。服のタイプと装着ポイントが対応しているからです (skirt, jacket, undershirt...)。

編集不能アイテムを共有する方法: 既に説明しましたが、編集不能アイテムは変名できないため、少し複雑な方法となります。アウトフィットのフォルダ (例えば上のフォルダ構成例だと"cuffs"という名前) にサブフォルダを作成し、そこに編集不能なアイテムを 1 つだけ入れます。そのアイテムを装着すると、フォルダが変名されていることに気づくでしょう。つまり、アウトフィットの中に複数の編集不能アイテムが入っている場合、同じ数のフォルダを作成し、1 つのフォルダに 1 個ずつ編集不能のアイテムを入れていくことになります。

例えば、編集不能の靴の場合はこうなります。

My Inventory
|- #RLV
|  \- shoes
|     |- left shoe (left foot)
|     |  \- left shoe   (no modify) (no transfer)  <-- no-mod object
|     |- right shoe (right foot)
|     |  \- right shoe   (no modify) (no transfer) <-- no-mod object
|     \- shoe base   (no modify) (no transfer)     <-- this is not an object
|- Animations
|- Body Parts
.
.
.

バッドノウハウ:

  • 共有フォルダの中のフォルダの名前にカンマ (',') を含めないでください。フォルダの中がめちゃくちゃになる可能性があります。
  • 共有フォルダの中のアイテムは、必ず変名(するか、少なくとも一回は装着して自動的に変名されるように)してください。そうしないと、強制装着コマンドが何もしていないように見えることになります。
  • 共有フォルダにたくさんのフォルダを詰め込まないようにしてください。スクリプトによっては、@getinv コマンドで一覧を取得し、それを使って処理をするものがありますが、チャットによるメッセージは最大1023文字の制限があります。賢く選んで、短い名前をつけてください。しかし、平均 9 文字の名前であれば、約 100 フォルダまでもつことができます。
  • ビューアが名前を頼りにどこに装着するかを判断できるようにするために、編集不能なアイテムは必ず1つずつサブフォルダに入れてください。これらのアイテムは変名不能のため、編集可能なアイテムと同じようには共有できません。また、アウトフィットのフォルダ自体は (複数のアイテムが入っているため) 変名されません。

llGiveInventoryList() によって送られたサブフォルダの共有フォルダへの受け入れ :

RestrainedLove v1.16.2 より、あなたはターゲットのアバターにアイテム一式を送り、相手の #RLV フォルダの中のサブフォルダとして持たせることができます(それにより、後でそのアイテムを @attach させることができます)。

llGiveInventoryList(victim_id, "#RLV/~subfolder_name", list_of_stuff) コマンドを発行すると、スクリプトは相手(victim_id と同じキーをもつアバター)のビューアに通常の 受け取る/破棄/無視リスト ダイアログを表示します。

相手がオファーを受け入れると、list_of_stuff で指定されたアイテムが #RLV フォルダの中の新しいサブフォルダに格納されます。このサブフォルダの名前は ~subfolder_name で指定された名前となります(スクリプターには、一意となるようなサブフォルダの名前を指定する義務があります。既にあるサブフォルダの名前と同じであった場合、2 つの同じ名前のサブフォルダが #RLV フォルダに現れることになります)。

チルダ文字はサブフォルダの先頭に *必ず* つけるように留意してください (そうすることで、この方法で送られて来たサブフォルダを相手が見つけやすくなりますし、そのようなサブフォルダの名前は #RLV フォルダの中の最後尾に表示されます) 。

また、この機能は (Debug Setting の RestrainedLoveForbidGiveToRLV を TRUE に設定することで) ユーザが無効にできることにも注意してください。このような場合、#RLV フォルダの中には格納されず、インベントリのルート直下の"#RLV/~subfolder_name"という名前のフォルダの中に格納されます。

ユーザがインベントリのオファーを断ることも、ビューアで機能を無効にすることも、ラグのひどい日には SL がオブジェクトの実際の送信に時間がかかることもあることから、@attach コマンドを発行する前に、送信されたフォルダが存在するかどうかを (@getinv で) 確認しなければなりません。

参考情報

ここに、これが内部的にどのように動作するかを記します。あなたが遭遇するかもしれない暗黙仕様への理解を深めるのに役立つでしょう。

  • それぞれのコマンドは Behaviour (例: "remoutfit")、Option (例: "shirt")、Param (例: "force") に解析され、UUID (発信しているオブジェクトのユニークなID) から届きます。
  • コマンドには 2 種類あります。one-shot コマンド (Param が "force" であり、Param が "version" 呼び出しのチャネル番号のような番号であるもの) と、 rules コマンド (Param が "y"、"n"、"add"、"rem" のいずれか) 。 "clear" は特別ですが、one-shot コマンドとして捉えることができます。
  • When the command takes a channel number, this number may be either strictly positive or (for RestrainedLove v1.23a (@versionnum = 1230001) and above) strictly negative. Using channel 0 is not allowed. Note that RestrainedLove can send a maximum of 255 characters on negative channels, while it can send up to 1023 characters on positive channels. Negative channels are useful to prevent the user from cheating, for example when asking for the @versionnum (since the user could use a non-RestrainedLove viewer and make the RestrainedLove devices believe they run within a RestrainedLove viewer by spoofing the reply to the version command on a positive channel, which they can't do on negative channels). Positive channels are best used for commands that may return large reply strings (@getpath, for example).
  • "n" と "add" は まったく同じ で、まったく同じように 扱われます。これらは単なる シノニム です。同じようなことが "y" と "rem" にも言えます。ルール ("sendchannel=n") と例外 ("sendchannel:8=add") をスクリプトの中ではっきり区別するためだけのものです。
  • ルールは、発生元の UUID をルールそのものに関連付けた形でテーブルに蓄積されます。"n"/"add" の Param を受信すると 追加 され、"y"/"rem" の Param を受信すると 削除 されます。

UUID1 が首輪で UUID2 が猿ぐつわだとします。

UUID1 => detach, tploc, tplm, tplure, sittp

UUID2 => detach, sendim, sendim:(keyholder)

これらの 2 つのルールは、ユーザは keyholder 以外のアバターに IM を送信できず、どこにも TP ができないという意味になります。これらの 2 つのアイテムは取り外しできません。ここで、首輪が "@sendim=n" を送信したとすると、テーブルは以下のようになります。

UUID1 => detach, tploc, tplm, tplure, sittp, sendim

UUID2 => detach, sendim, sendim:(keyholder)

"@sendim=n" を 2 回目に送信すると何も起りません。追加する前に既に存在するかチェックがかかるからです。猿ぐつわのロックが解除され取り外されると、"@clear" が送信されるかガベージ・コレクタが開始されるかするため、UUID2 に関連づいたルールは消滅します。ところが、例外まで消滅してしまっため、アバターは keyholder にさえも IM を送信できない状態のままとなります。オブジェクトに関連付けられたルールは、他のオブジェクトに関連付けられたルールに矛盾しないからです。

  • One-shot コマンドは、これとは逆に、オンザフライで実行され、蓄積されません。
  • ログオンすると、プログレスバーが表示されている間、アバターはしばらく操作できない (チャットできない、移動できない) 状態となります。しかし、装着されているスクリプトの入ったオブジェクトはその間に rez して、ビューアが操作可能な状態になる前にルールとコマンドの送信を開始します。このために、ビューアはそれらを貯めておき、ユーザが操作可能な状態 (プログレスバーが消えたとき) になってはじめてそれらを実行します。
  • ビューアは定期的に (N 秒ごとに) 全てのルールをチェックし、既に存在しない UUID にリンクしているものを削除します (「ガベージ・コレクタ」) 。つまり、装着していない オブジェクトから発行されたルールは、アバターが テレポートして 他の場所に行くと、すぐに破棄されます。