PDA

View Full Version : [OFFICIAL] API Monitor


Zachary Carter
26-05-2008, 09:30 AM
Name: API Monitor

Author: Zachary Carter

Date: 18 February 2008


This is a simple script that monitors the API on both Milkyway and Pegasus channels.


[START]

<pre>list api;
default
{
on_rez(integer start_param)
{
llResetScript();
}

state_entry()
{
llListen(-905000, "", "", "");
llListen(-805000, "", "", "");

llSetText("Ready", <1,1,1>, 1);
}
listen(integer c, string n, key id, string message)
{
if(llGetOwnerKey(id) == llGetOwner())
{
if(c == -905000)
{
message = "M: " + message;
}
else
{
message = "P: " + message;
}

api += message;

if(llGetListLength(api) > 5)
{
api = llDeleteSubList(api, 0, 0);
}
llSetText(llDumpList2String(api, "\n"), <1,1,1>, 1);
}
}
}</pre>


[END]