3 available channels: main, secondary and private
2 modes for each channel: short range (shout - 100meters) and long range (simwide) [BEWARE THAT SIMWIDE COMMUNICATIONS CAN'T DO SIMCROSSING!!!]
each channel number can be modified
01) create a cube, resize it to 0.010x0.200x0.200, name it "Transceiver"
02) pick it up
03) open your inventory, right click on it
04) Attach To HUD> Top (or any available position)
05) adjust its position
06) open its inventory and drop in the "Transceiver" script
07) open its inventory and drop in the "Transceiver instructions" notecard
0
close its inventory09) detach it
10) reattach it
11) follow the instructions and enjoy your transceiver
--------------------
Transceiver
--------------------
integer main; // Used to store the main channel's number
integer secondary; // Used to store the secondary channel's number
integer private; // Used to store the private channel's number
default
{
changed(integer change)
{
if (change & CHANGED_OWNER)
{
llOwnerSay("/me owner is changed, script resetted." );
llResetScript();
}
}
// If the object's owner is changed then a message is sent and the
// script is resetted to its default values (state_entry section).
attach(key id)
{
if(id)
{
llOwnerSay("/me ready. Touch to receive instructions
notecard and to check channels numbers."
;llOwnerSay("Main channel set on " + (string)main);
llOwnerSay("Secondary channel set on " +
(string)secondary);
llOwnerSay("Private channel set on " + (string)private);
}
// On attach event, quick instructions are given and
// current channels numbers listed.
else
{
llOwnerSay("/me detached."
;}
// On detach event, a warning message is sent.
}
touch_start(integer num_detected)
{
llGetOwner();
llOwnerSay("Greetings " + llDetectedName(0));
llOwnerSay("Main channel set on " + (string)main);
llOwnerSay("Secondary channel set on " + (string)secondary);
llOwnerSay("Private channel set on " + (string)private);
llOwnerSay("Instructions notecard will be delivered in a few
moments, however if you are in away or busy mode the
deliver will fail."
;llGiveInventory(llDetectedKey(0), "Transceiver instructions"
;}
// On touch event, current channels numbers are listed and the
// instructions notecard contained into your object is given.
state_entry()
{
main = -1; // Initial main channel's number.
secondary = -2; // Initial secondary channel's number.
private = -3; // Initial private channel's number.
// Note that those values WILL NOT be restored each time that
// the object is rezzed: owner's settings (channels numbers)
// will be kept even after detach events.
// Of course if you manually reset the script then the initial
// values will be restored.
// Channels number can be any valid integer from -2147483648
// through 2147483647.
llListen(700, "", llGetOwner(), ""
;// Listens on channel 700 for owner's outgoing short range
// messages to be sent on the main channel.
//
// For example:
// /700 Hello!
llListen(777, "", llGetOwner(), ""
;// Listens on channel 777 for owner's outgoing wide range
// messages to be sent on the main channel.
//
// For example:
// /777 Hello!
llListen(800, "", llGetOwner(), ""
;// Listens on channel 800 for owner's outgoing short range
// messages to be sent on the secondary channel.
//
// For example:
// /800 Hello!
llListen(888, "", llGetOwner(), ""
;// Listens on channel 888 for owner's outgoing wide range
// messages to be sent on the secondary channel.
//
// For example:
// /888 Hello!
llListen(900, "", llGetOwner(), ""
;// Listens on channel 900 for owner's outgoing short range
// messages to be sent on the private channel.
//
// For example:
// /900 Hello!
llListen(999, "", llGetOwner(), ""
;// Listens on channel 999 for owner's outgoing wide range
// messages to be sent on the private channel.
//
// For example:
// /999 Hello!
llListen(1000, "", llGetOwner(), ""
;// Listens on channel 1000 for the owner's chosen number
// for the main channel.
//
// For example:
// /1000 -10
// Sets the main channel's number on -10
llListen(2000, "", llGetOwner(), ""
;// Listens on channel 2000 for the owner's chosen number
// for the secondary channel.
//
// For example:
// /2000 -20
// Sets the secondary channel's number on -20
llListen(3000, "", llGetOwner(), ""
;// Listens on channel 3000 for the owner's chosen number
// for the private channel.
//
// For example:
// /3000 -30
// Sets the main channel's number on -30
llListen(main, "Transceiver", "", ""
;// Listens on main channel for incoming messages
// sent via objects whose name is "Transceiver".
llListen(secondary, "Transceiver", "", ""
;// Listens on secondary channel for incoming messages
// sent via objects whose name is "Transceiver".
llListen(private, "Transceiver", "", ""
;// Listens on private channel for incoming messages
// sent via objects whose name is "Transceiver".
}
listen(integer channel, string transmitter, key ID, string text)
{
if (channel == 700)
{
llShout(main, transmitter + " s.r.- " + text);
llOwnerSay("/me > " + transmitter + " s.r.: " + text);
}
// When the owner says something on channel 700, the message is
// shout (100 meters range [short range]) on the main channel
// and a copy of it is displayed to the owner.
// For example:
// [00:00] /700 Hello!
// [00:00] Transceiver > Katerina Morgwain s.r.: Hello!
if (channel == 777)
{
llRegionSay(main, transmitter + " w.r.- " + text);
llOwnerSay("/me > " + transmitter + " w.r.: " + text);
}
// When the owner says something on channel 777, the message is
// sent region-wide (sim-wide [wide range]) on the main channel
// and a copy of it is displayed to the owner.
// For example:
// [00:00] /777 Hello!
// [00:00] Transceiver > Katerina Morgwain w.r.: Hello!
if (channel == 800)
{
llShout(secondary, transmitter + " S.s.r.- " + text);
llOwnerSay("/me > " + transmitter + " S.s.r.: " + text);
}
// When the owner says something on channel 800, the message is
// shout (100 meters range [short range]) on the secondary
// channel and a copy of it is displayed to the owner.
// For example:
// [00:00] /800 Hello!
// [00:00] Transceiver > Katerina Morgwain S.s.r.: Hello!
if (channel == 88

{
llRegionSay(secondary, transmitter + " S.w.r.- " + text);
llOwnerSay("/me > " + transmitter + " S.w.r.: " + text);
}
// When the owner says something on channel 888, the message is
// sent region-wide (sim-wide [wide range]) on the secondary
// channel and a copy of it is displayed to the owner.
// For example:
// [00:00] /888 Hello!
// [00:00] Transceiver > Katerina Morgwain S.w.r.: Hello!
if (channel == 900)
{
llShout(private, transmitter + " P.s.r.- " + text);
llOwnerSay("/me > " + transmitter + " P.s.r.: " + text);
}
// When the owner says something on channel 900, the message is
// shout (100 meters range [short range]) on the private
// channel and a copy of it is displayed to the owner.
// For example:
// [00:00] /900 Hello!
// [00:00] Transceiver > Katerina Morgwain P.s.r.: Hello!
if (channel == 999)
{
llRegionSay(private, transmitter + " P.w.r.- " + text);
llOwnerSay("/me > " + transmitter + " P.w.r.: " + text);
}
// When the owner says something on channel 999, the message is
// sent region-wide (sim-wide [wide range]) on the private
// channel and a copy of it is displayed to the owner.
// For example:
// [00:00] /999 Hello!
// [00:00] Transceiver > Katerina Morgwain P.w.r.: Hello!
if (channel == 1000)
{
main = (integer)text;
llListen(main, "Transceiver", "", ""
; llOwnerSay("Main channel set on " + (string)main);
}
// When a number is sent on channel 1000, via an object whose
// name is "Transceiver", then the primary channel's number
// will be set on that number and a confirmation message will be
// displayed.
if (channel == 2000)
{
secondary = (integer)text;
llListen(secondary, "Transceiver", "", ""
; llOwnerSay("Secondary channel set on " + (string)secondary);
}
// When a number is sent on channel 2000, via an object whose
// name is "Transceiver", then the secondary channel's number
// will be set on that number and a confirmation message will be
// displayed.
if (channel == 3000)
{
private = (integer)text;
llListen(private, "Transceiver", "", ""
; llOwnerSay("Private channel set on " + (string)private);
}
// When a number is sent on channel 3000, via an object whose
// name is "Transceiver", then the private channel's number
// will be set on that number and a confirmation message will be
// displayed.
if (channel == main)
{
llOwnerSay(text);
}
// When a message is heard on the main channel, its content is
// displayed to the owner.
// For example:
// [00:02] Transceiver: Katerina Morgwain s.r.- Hello!
if (channel == secondary)
{
llOwnerSay(text);
}
// When a message is heard on the secondary channel, its content
// is displayed to the owner.
// For example:
// [00:02] Transceiver: Katerina Morgwain S.s.r.- Hello!
if (channel == private)
{
llOwnerSay(text);
}
// When a message is heard on the secondary channel, its content
// is displayed to the owner.
// For example:
// [00:02] Transceiver: Katerina Morgwain P.s.r.- Hello!
}
}
-------------------
Transceiver instructions
-------------------
Note:
Short range = 100 meters (shout)
Wide range = whole region (sim-wide)
WARNING: SIM-WIDE COMMUNICATIONS CAN'T DO SIM-CROSSING.
>>> STRONG SUGGESTION: create gestures to speed up things <<<
-------------------------------------------------------------------------
MAIN CHANNEL
To use the Main channel in Short Range mode:
/700 YourMessageHere
To use the Main channel in Wide Range mode:
/777 YourMessageHere
To change the Main channel's "frequency":
/1000 ChosenNumberHere
Channels number can be any valid integer from -2147483648
through 2147483647.
>>> AVOID CHANNEL 0 (zero): IT IS THE MAIN CHAT!!! <<<
-------------------------------------------------------------------------
SECONDARY CHANNEL
To use the Secondary channel in Short Range mode:
/800 YourMessageHere
To use the Secondary channel in Wide Range mode:
/888 YourMessageHere
To change the Secondary channel's "frequency":
/2000 ChosenNumberHere
Channels number can be any valid integer from -2147483648
through 2147483647.
>>> AVOID CHANNEL 0 (zero): IT IS THE MAIN CHAT!!! <<<
-------------------------------------------------------------------------
PRIVATE CHANNEL
To use the Private channel in Short Range mode:
/900 YourMessageHere
To use the Private channel in Wide Range mode:
/999 YourMessageHere
To change the Private channel's "frequency":
/3000 ChosenNumberHere
Channels number can be any valid integer from -2147483648
through 2147483647.
>>> AVOID CHANNEL 0 (zero): IT IS THE MAIN CHAT!!! <<<
