nyuuzyou/wikis huggingface dataset:
LSL Protocol/Restrained Love Open Relay Group/vision

== !x-vision == 
Implemented in DEM RLV Relay HUD, in Dominatech Relay 2.1, in Dahlia's multirelay and in Satomi's Multi-Relay 1.03b2
; Description : meta command to control what the victim can see while under restraint. This will allow a full range of vision control of the victim. Full blindness, partial, color, textures, etc.. It's not clear that there's a need for this any more since the @setoverlay command provides most of the functionality. The only thing the relay version allows is for different devices to stack their overlays.
; Implementation : using a small microprim that hides on the back of our RelayHUD, we can expand and texture this to control the sight of the victim. Put them in a dark cell, they go blind. Or in a forcefield change the color, make it partially transparant, put up a texture, etc. We are/will also be using this as a "MouseLook" enforcer to punish a victim when they won't stay in mouselook (get out of mouselook, go totally blind). Currently being implemented in devices from THINK KINK.
; Syntax : !x-vision/(color)/(alpha)/(texture)/(repeats)/(offsets)/(rotation)
: !x-vision/clear
::(color) = color for the HUD covering prim in RGB format <r'g'b> 0-255 (NOTE: the ' is the seperator instead of , to avoid parsing issues with the rest of the RLV command string)
::(alpha) = % transparent to make the HUD prim cover (in alpha format 0.0-1.0)
::(texture) = UUID for a texture to apply to the prim
::(repeats) = x/y repeats for the texture, same format as the texture tab on an prim 1.0'1.0
::(offsets) = x/y offsets for the texture, same format as the texture tab on an prim 0.0'0.0
::(rotation) = rotation of the texture
:: SPECIAL ENTRY, any of the parameters can be replaced with "*" for 'do not change existing value'
:: NOTE: the 'default' value of the HUD prim is 100% transparent, white, TEXTURE_BLANK. ie. !vision/<255'255'255>/0.0/TEXTURE_BLANK/1.0'1.0/0.0'0.0
:: if all you want to do is 'blind' someone, then !vision/<0'0'0>/1.0/*/*/*/*
:: The second form clears the vision restriction set.
; Examples
: Total blackout "!x-vision/<0'0'0>/1.0/TEXTURE_BLANK/1.0'1.0/0.0'0.0/0.0
: Light fog "!x-vision/<128'128'128>/0.5/TEXTURE_BLANK/1.0'1.0/0.0'0.0/0.0"
: In a plywood box no matter where they look "!x-vision/<255'255'255>/1.0/TEXTURE_PLYWOOD/1.0'1.0/0.0'0.0"
; Discussion
Although this feature has been extensively discussed elsewhere, that discussion was unnecessarily contentious and is not repeated here.
Recommend deprecating this functionality
LSL Protocol/Restrained Love Open Relay Group/x-tensions Validation Process

Proposed x-tensions should go through the following successive stages:
* Proposal: someone proposes a new feature
* Draft: there is a proof of concept implementation and specification
* Accepted: a vote of board members decided the extension is accepted as an ORG x-tension.
* Ready: a complete test set has been written and approved by 3 board members.
* Bronze: there exists one implementation of the feature in one relay and one compatible controlling device, which both pass the test set.
* Silver: there exists 2 interoperable implementations on each side passing the tests. One implementation either relay side or controller side has to be open source.
* Gold: there exists 3 tested interoperable implementations both sides. There must exist at least one open source relay side implementation and one open source controller side implementation.
* Platinum: 4 tested interoperable implementations both sides. One open source each side. Further more we require that a fully automated test suite (implemented by open source scripts) exists.
The Ready stage should be interpreted as a green light for device makers: "this x-tension is almost ready for prime time, you should really consider implementing it now".
The subsequent stages are more indicators of the level of confidence the buyer should have in the stuff (and confidence for the maker that enough compatible devices already exist).
However, those levels of confidence (from Ready to Platinum) only apply to one given version of the specification. If it is updated, new tests might have to be written, and anyway all the tests tests have to be started over. This means that any new version starts at Accepted stage.
LSL Protocol/Restrained Love Relay/Comparison

This is not a place for editorializing, but just a table of features found in different relays currently available in Second Life. More to give RLV furniture developers a sense of what is supported than to act as a guide to choosing a relay.
Relay brand 	Satomi's Multi 	Susan's	TKPBA 	Satomi's DFR 	OpenCollar 	Dahlia's 	Ultraslim Relay
Version 	1.03b 	1.071 	110m 	2 	3.581 	2.0 	1.0
Type 	1 prim multi 	single 	multi-prim 	single or multi w/ viewer hook 	1 prim multi 	multi-prim 	multi-prim
Max Controllers	script mem. 	1 	5 	1 	script mem. 	5 	20
RLVR Version 	1100 	1020 	1100 	1100 	1100 	1100 	1100
!implversion 	Satomi's Multi-Relay 	- 	tkPBA 110m 	ORG=0003/Satomi's Damn Fast Relay v2	OpenCollar 3.6 	ORG=0004/Dahlia's multirelay/version=2.0/mode=xxx/safeword=yyy/evil=zzz with xxx=auto,ask,restricted, yyy=none,cond,uncond and zzz=0,1 	ORG=0004/Ultraslim relay/version=1.0/mode=xxx/safeword=yyy with xxx=auto,ask and yyy=none,cond,uncond
!x-orgversions 	ORG=0003/who=001/handover=001/email=005/delay=004/vision=001/follow=002/channel=001/ack=002	- 	ORG=0001/who=001/vision=001/handover=001	ORG=0003 	ORG=0003/who=001	ORG=0004/who=001/vision=001/handover=001/email=006/follow=001/follow=002/key=002/key=003/freeze=001/freeze=002/delay=003/delay=004/sensor=002/autoforward=001/cancel=001/speech=002/camera=001	ORG=0004/who=001
ORG 	0003 	no 	0001 	0003 	0003 	0004 	0004
who 	001 	- 	001 	- 	001 	001 	001
handover 	001 	- 	001 	- 	- 	001 	-
vision 	001 	- 	001 	- 	- 	001 	-
freeze 	- 	- 	- 	- 	- 	001,002 	-
follow 	001 	- 	- 	- 	- 	001,002 	-
listen 	- 	- 	? 	- 	- 	- 	-
channel 	001 	- 	- 	- 	- 	useless with llRegionSayTo() 	-
email 	005 	- 	- 	- 	- 	006 (005 is not supported anymore) 	-
http-in 	commented out 	- 	- 	- 	- 	- 	-
ack 	002 	- 	- 	- 	- 	useless with llRegionSayTo() 	-
delay 	003 	- 	- 	- 	- 	003,004 	-
key 	- 	- 	- 	- 	- 	002,003 	-
autoforward 	- 	- 	- 	- 	- 	001 	-
sensor 	- 	- 	- 	- 	- 	002 	-
cancel 	- 	- 	- 	- 	- 	001 	-
speech 	- 	- 	- 	- 	- 	002 	-
camera 	- 	- 	- 	- 	- 	001 	-
LSL Protocol/Restrained Love Relay/Introduction

===Restrained Love===
The Restrained Love viewer is an alternative to the Second Life viewer, mostly aimed at enhancing BDSM play. It is aimed at making restraints more secure and more restrictive, by giving the "top" more tools to keep the "bottom" under control.
It is operated through llOwnerSay calls in LSL scripts, by reacting when the message sent through this call is formatted in a special way. However llOwnerSay is obviously limited to objects the user of the viewer owns, mainly attachments.
===Restrained Love Relay===
This is why the makers of objects that are not supposed to be owned by their users (cages, public furniture, traps, teleporters...) need to rely on said users to wear an object that will "relay" the commands from chat to llOwnerSay... this is the purpose of this specification.
This specification is aimed at giving a simple and clear way to let any furniture work with any relay, both being made and distributed (free or for a price) by different people who do not have to coordinate to make the system work.
Making a furniture compliant with this specification is meant to be very easy, but making a relay (which is the nexus of the system) is unfortunately much harder. Several implementations exist and are kindly provided by several members of the BDSM community of SL.
===Who maintains this specification ?===
This specification has been initially written by Marine Kelley in the purpose of staying mostly static, so people do not have to review their code all the time. It has been maintained by the community for about a year but is now back under Marine Kelley's responsibility.
Special kudos to Maike Short for all the work she did on the page, reorganizing it, helping with the specification, the sample code, discussing with people... she really did a lot. It would not be the same without her precious help. An unfortunate turn of events forced her to leave SL, and she will be missed, but not forgotten. Thank you Maike.
LSL Protocol/Restrained Love Relay/Other Implementations

Want to share your own relay script?
Please create a new page and add a link here.
== Amethyst Plugin version by Felis Darwin ==
An edited version of the Reference Implementation meant to be used as a plugin for Amethyst collars.
Adds an actual timeout for the ask dialog, periodic pinging, locking support, a whitelist/blacklist feature, and a few other goodies specific to Amethyst collars.
This version's subpage
== Maike Short's Version ==
Maike Short's Relay
== Dominatech RLV Relay ==
Julia Banshee's relay, with multiple device support.
== Dark Elf Manufacture's Relay HUD ==
DEM's (formerly from THINK KINK) multiple device relay with !who, !x-who (it is unclear whether !who will be allowed to remain in the standard spec), !x-vision, SAFEWORD and HARDCORE support.
LSL Protocol/ScriptShow

Back to Protocol page
==Scripted show Protocol ==
(Proposed)
(Draft, not implemented)
(Open for comments)
Scripted Shows use a notecard to control the show.
Notecards are slow, so the protocol allows for the enabling of other scripts for more complex functions.
The basic notecard show consists of lines with commands.
1.) Include, [notecard name], [ntimes = 1]
 This command includes a notecard and optionally repeats it n Times.
 The notecard that contains this command is paused until the other notecard completes.
2.) Pause, [seconds]
 This pauses for x seconds. x can be as small as .1 second and up to 10 seconds.
3.) Say, [channel = 0], [actor name], [text] 
(Note: The viewer script is responsible to decide on range say vs wisper vs shout )
 This is the main command for the system. It can be used to trigger other actions or send text to the viewer.
4.) TextureKey, [Key]
 Changes the display to GUID.
 It is recommended that the texture be packed into a box in the inventory of the object so that SL does not remove the texture from the database.
5. TextureName, [name]
 Changes the display to display the named texture.
6.) TextureScale, [TBD]
 Sets the repeat, rotate, and flip settings for the texture
7.) Color, [RGB], [alpha = 1]
 Set's the color of the screen.
6.) TextureAnimate, [pram list]
 TBD
7.) ScriptEnable, [script name] 
and DisableEnable, [script name]
 
 Note: the script must be disabled via script in order to be enabled via a script
8.) WaitFor, [channel], [msg] 
 This allows for one Interpreter to wait for other scripts to send messages.
9.) RezObject, [inventory name], [int StartPram], [pos], [rotation]
 Rezs a object from the viewer's inventory.
 The pos and rotation is relative to the viewer.
 Note:This uses the "safe" form of object rezing in that the object being rezed is not a copy of the viewer.
 
== Interpreter ==
ToDo
===Scripts===
The Main Interpreter script(To Do)
===Notes===
LSL Protocol/es

==Protocolos de Script y canales de chat conocidos==
A veces los scripts en Second Life se envían mensajes para intercambiar información o coordinar conducta. Las reglas para esa conversación son un protocolo. Ejemplos son poder decir "/1show" o "/1hug lee".
Tales protocolos usan un chat channel común. Los ejemplos arriba usan el canal 1. Puede utilizarse cualquier otro número pero un usuario (y otros objetos) necesitan una manera de encontrar el número correcto.
Algunos protocolos, como los de sistemas de combate, son muy complicados y podrían estar mejor documentados. Esta página puede usarse para prevenir conflictos y permitir que varios programadores coordinen la definición de protocolos. 
Los protocolos también pueden ser sistemas de tarjetas de notas y sistemas que usan nombres de objetos. 
== Lista de protocolos ==
Añada un protocolo aquí si se usa extensamente o puede ser en el futuro.
Un protocolo en esta lista debe tener sus propias páginas donde se define el protocolo en detalle. 
Nombre 	Creador 	Descripción
AutoBahn 	grumble Loudon 	Sistema automático de vehículos para autos, trenes y montañas rusas.
ListMessage 	Anónimo 	Envia y recibe listas, no listas, no resultados, verbos no encontrados, y expresiones polacas parcialmente evaluadas.
LockMeister System 	Kyrah Abattoir 	Usado para coordinar diferentes partes de los juguetes de ataduras.
LSL Protocol/EasyTalk 	Salahzar Stenvaag	Protocolo de comunicación muy fácil y simple. Úsalo para simplemente coordinar objetos llSay/llRegionSay/llListen y también grupos relacionados.
RestrainedLove viewer API 	Marine Kelley 	Usa las rasgos de RestrainedLife viewer a través de llamadas llOwnerSay().
RestrainedLife viewer relay spec	Marine Kelley 	Permite que los muebles o jaulas den órdenes al RestrainedLife viewer del usuario.
----
==Canales de chat conocidos==
La intención de esta lista es reducir la cantidad de scripts que usan el mismo número de canal de chat. Mantengalos en secuencia. 
Canal 	Creador 	Descripción 	Mensajes
1, 4, 5, 9 	desconocido 	Muy común en bolas de actitud o postura (poseballs) 	"hide", "show"
9 	Material Squirrel	Material Squirrel wings 	"color <string>", "flutter", "open", "close"
20 	Unknown 	Interfaz SafeZone (sistema de combate) 	
33 	desconocido 	Collar 	
42 	desconocido 	Canal común usado por los scripts de ejemplos de wikis 	
66 	Travis Lambert 	Canal de órdenes predeterminado para BanLink 	
77 	Xarrk Dagger 	Canal de órdenes de chat predeterminado para aparatos de KAIIA Systems	
88 	Cadroe Murphy 	Usado por ShapeGen y otras herramientas de construcción 	
99 	desconocido 	Brazaletes de baile 	
888 	Xarrk Dagger 	Canal de identificación de aparatos de KAIIA Systems 	
10748, -10748	Lee Ponzu 	Usado comúnmente en scripts de Ponzu 	
31984 	desconocido 	Interfaz ACME (sistema de combate) 	
-504xxx 	Gal Canning 	comunicaciones susurradas inter-prim
LSL Protocol/fr

==Protocoles de script et canaux de chat identifiés==
Les scripts sont capables de s'envoyer des messages pour échanger des informations ou se coordonner. Les règles définissant ces conversations sont appelées protocoles. Par exemple, être capable de dire "/1show" ou "/1hug lee".
Les protocoles utilisent un canal de chat commun. Les exemples ci-dessus communique sur le canal 1 mais un autre canal aurait pu tout aussi bien être choisi.
Certains protocoles sont particulièrement compliqués. Cette page permet de prévenir les conflits afin que les programmeurs puissent coordonner leurs protocoles.
Les protocoles peuvent aussi être des systèmes de note ou des systèmes à base de nom d'objets.
== Liste de Protocoles ==
Ajoutez un protocole ici s'il est largement utilisé, ou est susceptible de l'être dans le futur.
Un protocole de cette liste doit aussi avoir ses propres pages dans lesquelles il est défini en détail.
Nom 	Créateur 	Description
AutoBahn 	grumble Loudon 	Système de véhicule automatique pour voitures, trains, grand huits.
ListMessage 	Anonyme 	Envoie et reçois des lists, non-lists, non-results, verb-not-found, et des expressions polonaises partiellement évaluées.
LockMeister System 	Kyrah Abattoir 	Utilisé pour coordonner les différentes parties d'accessoires de bondage.
LSL Protocol/EasyTalk 	Salahzar Stenvaag	|Protocole de communication très simple et très facile. A utiliser pour simplement coordonner llSay/llRegionSay/llListen objects, aussi bien qu'un ensemble lié.
RestrainedLove viewer API 	Marine Kelley 	Utilise les caractéristiques du "RestrainedLife viewer" par l'intermédiare d'appels llOwnerSay() .
RestrainedLife viewer relay spec	Marine Kelley 	Permet à votre objet ou cage d'envoyer des commandes au RestrainedLife viewer de l'utilisateur.
----
==Channels de chat identifiés==
Cette liste est destinée à réduire le nombre de scripts utilisant le même numéro de channel de chat.
Veuillez s'il vous plaît essayer de les conserver en séquence. 
Channel 	Créateur 	Description 	Messages
1, 4, 5, 9 	Inconnu 	Très commun pour les poseballs 	"hide", "show"
9 	Material Squirrel	Ailes Material Squirrel 	"color <string>", "flutter", "open", "close"
20 	Inconnu 	Interface de SafeZone (système de combat) 	
33 	Inconnu 	Collier 	
42 	Inconnu 	Channel commun utilisé par les exemples de script wiki 	
66 	Travis Lambert 	Channel de commande par défaut de BanLink 	
77 	Xarrk Dagger 	Channel de commande par défaut des dispositifs KAIIA Systems 	
88 	Cadroe Murphy 	Utilisé par ShapeGen et autres outils de construction 	
99 	Inconnu 	Bracelets de danse 	
888 	Xarrk Dagger 	Channel d'identification des dispositifs KAIIA Systems 	
10748, -10748	Lee Ponzu 	Communément employés dans les scripts de Ponzu 	
31984 	Inconnu 	Interface ACME (système de combat) 	
-504xxx 	Gal Canning 	Seulement pour communication "chuchotée" (whispered) entre prims
LSL Protocol/it

==Protocolli Script e canali chat conosciuti==
A volte gli scripts in Second Life inviano messaggi tra loro per scambiare informazioni o per coordinare i comportamenti. Le regole per tale conversazione rappresentano un protocollo. Essere in grado di dire "/1show" or "/1hug lee" sono degli esempi.
Tali protocolli usano un canale di chat comune. Gli esempi precedenti usano il canale 1. Potrebbero anche aver utilizzato qualsiasi altro numero, ma un utilizzatore (e altri oggetti) devono avere un modo per trovare il numero corretto.
Alcuni protocolli, come i sistemi di combattimento, sono alquanto complicati e potrebbero essere documentati meglio. Questa pagina può essere usata per aiutare a prevenire conflitti e permettere a più programmatori di coordinare le definizioni di protocollo.
I protocolli possono anche essere sistemi note card e sistemi che usano object names.
== Lista protocolli ==
Aggiungete qui un protocollo se è largamente utilizzato o qualora possa esserlo in futuro.
Un protocollo in questa lista dovrebbe anche avere le sue pagine specifiche dove venga definito in dettaglio.
Nome 	Creatore 	Descrizione
AutoBahn 	grumble Loudon	Sistema automatico di veicoli per automobili, treni, otto volante.
ListMessage 	Anonimo 	Invia e riceve liste, non-liste, non-risultati, verbi-non-trovati ed espressioni Polacche parzialmente valutate.
LockMeister System	Kyrah Abattoir	Usato per coordinare parti diverse di giocattoli controllati.
ScriptShow 	grumble Loudon	Visualizzazione di Script basata su interprete.
----
==Canali chat conosciuti==
Questa lista è mirata a ridurre il numero di script che utilizzano lo stesso numero di canale chat. 
Prego provateli e manteneteli in sequenza.
Canale 	Creatore 	Descrizione 	Messaggi
1, 4, 5, 9 	Sconosciuto 	Molto comune nelle poseballs 	"hide", "show"
9 	Material Squirrel	Ali di Material Squirrel 	"color <string>", "flutter", "open", "close"
20 	Sconosciuto 	Interfaccia SafeZone (sistema di combattimento) 	
33 	Sconosciuto 	Collare 	
42 	Sconosciuto 	Canale comune usato dagli script di esempio del wiki 	
66 	Travis Lambert 	Canale chat di default per comando BanLink 	
77 	Xarrk Dagger 	Canale chat di default per comandi a dispositivi di sistemi KAIIA	
88 	Cadroe Murphy 	Usato da ShapeGen e da altri strumenti di costruzione 	
99 	Sconosciuto 	Braccialetti per danza 	
888 	Xarrk Dagger 	Canale di identificazione dispositivo per sistemi KAIIA 	
10748, -10748	Lee Ponzu 	Comunemente usato negli script di Ponzu 	
31984 	Sconosciuto 	Interfaccia ACME (sistema di combattimento) 	
-504xxx 	Gal Canning 	comunicazione inter-prim appena sussurrata
LSL Protocol/ja

==スクリプトプロトコルとチャットチャンネルについて==
ときおり、SecondLife内のスクリプトは情報の変更か調整目的で他のスクリプトにメッセージを送信します。このやり取りのルールをプロトコルといいます。"/1show"や"/1hug lee"を例としてあげることが出来ます。
プロトコルは普通チャットチャンネルをつかいます。上の例では1チャンネルを使っています。簡単に幾つかのほかの数字も用いられますが、ユーザ（と他のオブジェクト）はなんらかの正確な数値を探す方法をとらなければなりません。
コンバットシステムのようないくつかのプロトコルは、極めて複雑でよりよい書式となるでしょう。このページは矛盾を防ぐ支えと、プロトコルを定義する複数のプログラマたちに余裕を持たせることができます。
プロトコルはノートカードシステムや使用しているオブジェクト名のシステムでも可能です。
== プロトコルリスト ==
もし幅広く使われている、もしくは将来いつか重点的になるプロトコルなら、ここに加えましょう。
一覧にあるプロコトルには固有のページがあり、そこに詳細な定義がされているはずです。
名前 	製作者 	解説
AutoBahn 	grumble Loudon 	自動車、列車、ローラーコースター用のAutomatic vehicle system
リストメッセージ 	作者不明 	リスト、リストではないもの、、結果のないもの、実行結果が不明なもの、そして評価が不完全な前置記法の送受信
錠前機関 	Kyrah Abattoir 	異なる場所に固定する調整に用いる程度の代物
LSL Protocol/EasyTalk 	Salahzar Stenvaag	とても簡単でシンプルなコミュニケーションプロトコル。llSay/llRegionSay/llListenをするオブジェクトを分かりやすく整理するのに使います。リンクセットにも。
RestrainedLove viewer API 	Marine Kelley 	llOwnerSay() の呼び出しを通して、RestrainedLove viewer の機能を使います。
RestrainedLove viewer relay spec 	Marine Kelley 	家具や檻に、RestrainedLove viewer に対してコマンドを発行させます。
RestrainedLove viewer open relay spec 	Open Relay Group 	コミュニティによって作成・保守された便利な拡張が含まれた、RestrainedLife viewer　relay spec　の上位セットです。
P Vendor Linked Messages API & Environment	Zep Palen 	P Vendor システムのオーナーが入出力 API を使ってカスタムベンダーを作成できます。
Script API 	Nexii Malthus 	LSL スクリプトとサポートするクライアント間のコミュニケーション・レイヤを提供するためのプロトコルです。便利で機能性が高い機能セットです。(現在のところ、Vertical Life and Plywood clients に対応しています)
----
==チャットチャンネルについて==
このリストは幾つかのスクリプト用いている同じチャットチャンネルの番号を整理するためのものです。
順々になるようにしてください。
チャンネル 	製作者 	解説 	命令文
1, 4, 5, 9 	Unknown 	とても一般的なポーズボール 	"hide", "show"
9 	Material Squirrel	Material Squirrel wings 	"color <string>", "flutter", "open", "close"
20 	Unknown 	セーフゾーンインターフェイス (コンバットシステム) 	
33 	unknown 	Collar 	
42 	unknown 	wikiのスクリプト例で使われている一般的なチャンネル 	
66 	Travis Lambert 	BanLink default chat command channel 	
77 	Xarrk Dagger 	KAIIA Systems devices default chat command channel	
88 	Cadroe Murphy 	ShapeGenと他のビルドツールにて使用 	
99 	unknown 	Dance Bracelets 	
888 	Xarrk Dagger 	KAIIA Systems device identification channel 	
10748, -10748	Lee Ponzu 	Commonly used in scripts by Ponzu 	
31984 	unknown 	ACMEインターフェイス (コンバットシステム) 	
-504xxx 	Gal Canning 	プリム間コミュニケーションでのささやき限定
LSL Protocol/rfedip-devices

==Rfedip Devices==
This page is intended for creators of rfedip compliant devices to list and document their devices.
When you create a compliant device, you can (should) use this page to tell others about it and to document it. I suggest to make a section for every device, and that the section may contain subsections as needed.
Please keep in mind that this article is intended to inform creators of devices so that they can create devices which work together with devices created by others. This article is not intended for documentation the users of the devices may need.
==Tethering Device==
please see []
Ratany Resident 09:19, 13 January 2014 (PST)
==Enchaining Device==
please see []
Ratany Resident 09:19, 13 January 2014 (PST)
LSL Recursion Benchmark

//
// The Computer Language Shootout
// http://shootout.alioth.debian.org/
//
// contributed by bearophile, Jan 24 2006
// modified by Babbage Linden, Oct 10 2007
//
integer ack(integer x, integer y) 
{
 if(x == 0)
 {
 return y + 1;
 }
 
 if(y)
 {
 return ack(x - 1, ack(x, y - 1));
 }
 else
 {
 return ack(x - 1, 1);
 }
}
integer fib(integer n) 
{
 if (n < 2) 
 {
 return 1;
 }
 return fib(n - 2) + fib(n - 1);
}
float fibFP(float n) 
{
 if (n < 2.0) 
 {
 return 1.0;
 }
 return fibFP(n - 2.0) + fibFP(n - 1.0);
}
integer tak(integer x, integer y, integer z) 
{
 if (y < x) 
 {
 return tak(tak(x - 1, y, z), tak(y - 1, z, x), tak(z - 1, x, y));
 }
 return z;
}
float takFP(float x, float y, float z) 
{
 if (y < x)
 {
 return takFP( takFP(x-1.0, y, z), takFP(y-1.0, z, x), takFP(z-1.0, x, y) );
 }
 return z;
}
test() 
{
 integer n = 3;
 llSay(0, "Ack(3," + (string)(n+1) + "): " + (string)(ack(3, n+1)));
 //llSay(0, "Fib("+ (string)(28.0 + n) + "): " + (string)(fibFP(28.0+n)));
 
 llSay(0, "Tak(" + (string)(3 * n) + "," + (string)(2 * n) + "," + (string)n + "): " + (string)tak(3*n, 2*n, n));
 
 llSay(0, "Fib(3): " + (string)fib(3));
 llSay(0, "Tak(3.0,2.0,1.0): " + (string)takFP(3.0, 2.0, 1.0));
}
time()
{
 llResetTime();
 llSay(0, "Starting tests...");
 test();
 llSay(0, "Finished tests in " + (string)llGetTime() + "s");
}
default
{
 state_entry()
 {
 time();
 }
 
 touch_start(integer num)
 {
 time();
 }
}