key owner = NULL_KEY;
vector pos = ZERO_VECTOR;
string nom = "";
list OlForm = [];
list OfForm = [];
default {
state_entry() {
pos = llGetPos();
OlForm = [PRIM_SIZE, <1, 0.25, 0.25>, PRIM_POSITION, pos ];
OlForm += [PRIM_TYPE, 4, 0, <0.000000, 1.000000, 0.000000>, 0.949000, <0.000000, 0.000000, 0.000000>, <0.350000, 0.250000, 0.000000>];
OlForm += [<0.000000, 0.000000, 0.000000>, <0.000000, 0.750000, 0.000000>, <0.000000, 0.000000, 0.000000>, 4.000000, 0.000000, 0.800000];
OlForm += [PRIM_COLOR, 0, <0.000000, 0.000000, 0.000000>, 1.000000, PRIM_COLOR, 1, <0.000000, 0.000000, 0.000000>, 0.5];
OlForm += [PRIM_COLOR, 2, <0.000000, 1.000000, 0.000000>, 1.000000, PRIM_COLOR, 3, <0.000000, 0.000000, 0.000000>, 1.000000];
OlForm += [PRIM_COLOR, 4, <0.000000, 1.000000, 0.000000>, 1.000000, PRIM_COLOR, 5, <0.000000, 1.000000, 0.000000>, 1.000000];
pos -= <0.0, 0.0, 0.5>;
OfForm = [PRIM_SIZE, <0.25, 0.25, 0.25>, PRIM_POSITION, pos];
OfForm += [PRIM_TYPE, 3, 0, <0.150000, 1.000000, 0.000000>, 0.95, <0.000000, 0.000000, 0.000000>, <0.000000, 1.000000, 0.000000>];
OfForm += [PRIM_COLOR, 0, <0.000000, 0.000000, 0.000000>, 1.000000, PRIM_COLOR, 1, <0.000000, 0.000000, 0.000000>, 0.50];
OfForm += [PRIM_COLOR, 2, <1.000000, 0.000000, 0.000000>, 1.000000, PRIM_COLOR, 3, <0.000000, 0.000000, 0.000000>, 1.000000];
OfForm += [PRIM_COLOR, 4, <0.000000, 0.000000, 0.000000>, 1.000000, PRIM_COLOR, 4, <0.000000, 0.000000, 0.000000>, 1.000000];
owner = llGetOwner();
llRequestAgentData(owner, DATA_NAME); }
dataserver(key queryid, string data) {
nom = data;
state run; } }
state run {
state_entry() {
owner = llGetOwner();
llSetTimerEvent(30); }
timer() {
llRequestAgentData(owner, DATA_ONLINE); }
dataserver(key queryid, string data) {
integer ol = (integer)data;
if (ol) {
llSetPrimitiveParams(OlForm);
llSetText(nom + " is online", <0.0, 1.0, 0.0>, 1.0); }
else {
llSetPrimitiveParams(OfForm);
llSetText(nom + " is offline", <1.0, 0.0, 0.0>, 1.0); } } }
Tu n'as qu'à copier le code et le coller dans un script d'une prim simple quelconque.