Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

AcidicFlight Code Revealed! (Famous Public Land Scanner)

Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:16
I'll be making posts on this thread for LSL, PHP, and MySQL Table Structure.

You may have to alter some parts of the code(s) to make it work for you and/or your web server.

I am releasing this code for educational purposes only. Do NOT contact me for support, because I do NOT offer support for this code. Use at your own risk!
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:19
LSL Scripts:



Script: C:
CODE

integer DEBUG = FALSE;
key RDC;
string SI;

default
{
state_entry()
{
if (DEBUG) { llWhisper(0, "Initializing XML-RPC..."); }
vector tpos = llGetPos();
SI = llGetRegionName() + "_" + (string)llRound(tpos.x) + "," + (string)llRound(tpos.y) + "," + (string)llRound(tpos.z) + "-Clear";
llOpenRemoteDataChannel();
}

on_rez(integer start_param)
{
llResetScript();
}

remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata) {
if (event_type == REMOTE_DATA_CHANNEL)
{
llInstantMessage(llGetOwner(), "XML-RPC Channel Opened: " + (string)channel);
RDC = (key)channel;
state ready;
}
}

}

state ready
{
state_entry()
{
if (DEBUG) { llWhisper(0, "XML-RPC Initialized!"); }
}

on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if (llList2String(lmessage, 0) == "C")
{
SI = llList2String(lmessage, 1);
integer i;
for(i = 2; i <= (llGetListLength(lmessage) - 1); ++i)
{
SI += " " + llList2String(lmessage, i);
}

if (DEBUG) { llWhisper(0, "C: Received Info: " + SI); }
}
}

remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata) {
if ((event_type == REMOTE_DATA_REQUEST) && (sdata == "313Resultz"))
{
if (DEBUG) { llWhisper(0, "XML-RPC Request: " + sdata); }
if (DEBUG) { llWhisper(0, "XML-RPC Reply: " + SI); }
llRemoteDataReply(channel, message_id, SI, 313);
}
}
}


Script: LSC:
CODE

integer DEBUG = FALSE;
string version = "2.25";

list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string Coordinates;
integer LSS01status;
integer LSS02status;
integer LSS03status;
integer LSS04status;
integer LSS05status;
integer LSS06status;
integer LSS07status;
integer LSS08status;
integer LSS09status;
integer LSS10status;
integer LSS11status;
integer LSS12status;
integer LSS13status;
integer LSS14status;
integer LSS15status;
integer LSS16status;

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

commandscan()
{
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Commanding Scan."); }
Coordinates = "";
LSS01status = FALSE;
llMessageLinked(1, 0, "LSS01 Scan", NULL_KEY);
LSS02status = FALSE;
llMessageLinked(1, 0, "LSS02 Scan", NULL_KEY);
LSS03status = FALSE;
llMessageLinked(1, 0, "LSS03 Scan", NULL_KEY);
LSS04status = FALSE;
llMessageLinked(1, 0, "LSS04 Scan", NULL_KEY);
LSS05status = FALSE;
llMessageLinked(1, 0, "LSS05 Scan", NULL_KEY);
LSS06status = FALSE;
llMessageLinked(1, 0, "LSS06 Scan", NULL_KEY);
LSS07status = FALSE;
llMessageLinked(1, 0, "LSS07 Scan", NULL_KEY);
LSS08status = FALSE;
llMessageLinked(1, 0, "LSS08 Scan", NULL_KEY);
LSS09status = FALSE;
llMessageLinked(1, 0, "LSS09 Scan", NULL_KEY);
LSS10status = FALSE;
llMessageLinked(1, 0, "LSS10 Scan", NULL_KEY);
LSS11status = FALSE;
llMessageLinked(1, 0, "LSS11 Scan", NULL_KEY);
LSS12status = FALSE;
llMessageLinked(1, 0, "LSS12 Scan", NULL_KEY);
LSS13status = FALSE;
llMessageLinked(1, 0, "LSS13 Scan", NULL_KEY);
LSS14status = FALSE;
llMessageLinked(1, 0, "LSS14 Scan", NULL_KEY);
LSS15status = FALSE;
llMessageLinked(1, 0, "LSS15 Scan", NULL_KEY);
LSS16status = FALSE;
llMessageLinked(1, 0, "LSS16 Scan", NULL_KEY);
}

default
{
state_entry()
{
llSetObjectName("AcidicFlight " + version);
commandscan();
}

on_rez(integer start_param)
{
llSetObjectName("AcidicFlight " + version);
llResetScript();
}

touch_start(integer total_number)
{
if (llDetectedKey(0) == llGetOwner())
{
llSay(0, "Resetting...");
llResetScript();
}
}

timer()
{
llSetTimerEvent(0);
commandscan();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if (llList2String(lmessage, 0) == "LSC")
{
if (llList2String(lmessage, 1) == "LSS01")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS01status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS02")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS02status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS03")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS03status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS04")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS04status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS05")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS05status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS06")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS06status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS07")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS07status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS08")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS08status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS09")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS09status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS10")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS10status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS11")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS11status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS12")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS12status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS13")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS13status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS14")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS14status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS15")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS15status = TRUE;
}
else if (llList2String(lmessage, 1) == "LSS16")
{
Coordinates = Coordinates + llList2String(lmessage, 2);
LSS16status = TRUE;
}
if (
(LSS01status) &&
(LSS02status) &&
(LSS03status) &&
(LSS04status) &&
(LSS05status) &&
(LSS06status) &&
(LSS07status) &&
(LSS08status) &&
(LSS09status) &&
(LSS10status) &&
(LSS11status) &&
(LSS12status) &&
(LSS13status) &&
(LSS14status) &&
(LSS15status) &&
(LSS16status)
)
{
if (DEBUG) { llWhisper(0, llGetScriptName() + ": All Scans Completed."); }
vector tpos = llGetPos();
integer landowner = 0;
if (llGetLandOwnerAt(llGetPos()) == llGetOwner()) { landowner = TRUE; }
string prefix = "C " + llGetRegionName() + "_" + (string)llRound(tpos.x) + "," + (string)llRound(tpos.y) + "," + (string)llRound(tpos.z) + "_" + (string)landowner + "_" + (string)llRound(llGetTimeOfDay()) + "_" + version + "-";
if (Coordinates) { llMessageLinked(1, 0, prefix + Coordinates, NULL_KEY); }
else { llMessageLinked(1, 0, prefix + "Clear", NULL_KEY); }
llSetTimerEvent(10);
}
}
}
}


Script: LSS01:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 0, 0>;
vector stoppos = <256, 16, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:20
LSL Scripts:



Script: LSS02:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 20, 0>;
vector stoppos = <256, 32, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS03:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 36, 0>;
vector stoppos = <256, 48, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS04:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 52, 0>;
vector stoppos = <256, 64, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS05:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 68, 0>;
vector stoppos = <256, 80, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS06:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 84, 0>;
vector stoppos = <256, 96, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:20
LSL Scripts:



Script: LSS07:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 100, 0>;
vector stoppos = <256, 112, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS08:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 116, 0>;
vector stoppos = <256, 128, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS09:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 132, 0>;
vector stoppos = <256, 144, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS10:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 148, 0>;
vector stoppos = <256, 160, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS11:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 164, 0>;
vector stoppos = <256, 176, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:21
LSL Scripts:



Script: LSS12:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 180, 0>;
vector stoppos = <256, 192, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS13:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 196, 0>;
vector stoppos = <256, 208, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS14:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 212, 0>;
vector stoppos = <256, 224, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS15:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 228, 0>;
vector stoppos = <256, 240, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}


Script: LSS16:
CODE

integer DEBUG = FALSE;
vector startpos = <0, 244, 0>;
vector stoppos = <256, 256, 0>;
list conversion = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#", "%", "@"];

string compress(integer x, integer y)
{
string output;

if ((x % 4) == 0) {
output = llList2String(conversion, x / 4);
} else {
// not a multiple of 4.
output = "-";
}

if ((y % 4) == 0) {
output += llList2String(conversion, y / 4);
} else {
// not a multiple of 4.
output += "-";
}

return output;
}

ScanLand()
{
string tSI;
integer Public = FALSE;
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: START"); }

vector scanpos = startpos;
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY)
{
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
while (scanpos != stoppos)
{
scanpos.x += 4;
if (scanpos.x > 256)
{
scanpos.x = 0;
scanpos.y += 4;
}
//if (DEBUG) { llWhisper(0, "Land Owner Of " + llGetRegionName() + " " + (string)scanpos + ": " + (string)llGetLandOwnerAt(scanpos)); }
if (llGetLandOwnerAt(scanpos) == NULL_KEY) {
tSI = tSI + compress(llRound(scanpos.x), llRound(scanpos.y));
Public = TRUE;
}
}
if (!Public)
{
//if (DEBUG) { llWhisper(0, "Sending Clear Message."); }
tSI = "";
}

llMessageLinked(1, 0, "LSC " + llGetScriptName() + " " + tSI, NULL_KEY);
if (DEBUG) { llWhisper(0, llGetScriptName() + ": Land Scan: END"); }
}

default
{
on_rez(integer start_param)
{
llResetScript();
}

link_message(integer sender_number, integer number, string message, key id)
{
list lmessage = llParseString2List(message, [" "], []);
if ((llList2String(lmessage, 0) == llGetScriptName()) && (llList2String(lmessage, 1) == "Scan")) { ScanLand(); }
}
}
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:21
MySQL Table Structure


CODE

CREATE TABLE `land` (
`Region` varchar(32) NOT NULL default '',
`ScannerChannel` varchar(36) NOT NULL default '',
`ScannerCoordinates` varchar(11) NOT NULL default '',
`ScannerLand` int(11) NOT NULL default '0',
`ScannerDifference` int(11) NOT NULL default '0',
`ScannerStatus` int(11) NOT NULL default '0',
`ScannerVersion` varchar(5) NOT NULL default '',
`LandCoordinates` text NOT NULL,
`Time` int(11) NOT NULL default '0',
PRIMARY KEY (`Region`),
UNIQUE KEY `Region` (`Region`)
) TYPE=MyISAM;
Brad Lupis
Lupine Man
Join date: 23 Jun 2003
Posts: 280
12-02-2004 06:22
Oh great, get ready for an influx of land scanners. I appriciate that your trying to make amends by releasing the code to your land scanners, but you do realize that you probably just opened pandora's box there Chance. We're going to see a checkerboarding of land scanners now in order for people to make money. You probably could have changed parts of the code so it doesn't work 100 percent. Oh well, everyone be vigilant with your delete buttons now.
_____________________
Stupidity Should be Painful.
Sensual Casanova
Spoiled Brat
Join date: 28 Feb 2004
Posts: 4,807
12-02-2004 06:23
From: Brad Lupis
Oh great, get ready for an influx of land scanners. I appriciate that your trying to make amends by releasing the code to your land scanners, but you do realize that you probably just opened pandora's box there Chance. We're going to see a checkerboarding of land scanners now in order for people to make money. You probably could have changed parts of the code so it doesn't work 100 percent. Oh well, everyone be vigilant with your delete buttons now.


There is already a land scanner script on the scriptiong forums... Did you bother to say anything to the guy that released it?
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:23
PHP Scripts



PHP: landimage.php:
CODE

<?
header("Content-type: image/png");
$im = @imagecreate(256, 256) or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);
$black = ImageColorAllocate($im,0,0,0);

$coords = split(" ", $_GET["coords"]);
$ton = 0;
while ($ton <= (count($coords) - 1))
{
$coord = split(",", $coords[$ton]);
imagefilledrectangle($im, $coord[0], $coord[1], ($coord[0] + 4), ($coord[1] + 4), $black);
$ton += 1;
}

imagepng($im);
imagedestroy($im);
?>


PHP: publicland.php:
CODE

<?
global $sql;
$sql = mysql_connect("localhost", "USERNAME", "PASSWORD");
mysql_select_db("DATABASE", $sql);
?>
<style type="text/css">

</style>
<FONT SIZE="5">Public Land</FONT>
<TABLE>
<TR><TD><B><U>Region</U></B></TD><TD><B><U>Size</U></B></TD><TD><B><U>Image</U></B></TD><TD><B><U>Coordinates</U></B></TD><TD><B><U>Date - Time</U></B></TD></TR>
<?
$result = mysql_query("SELECT * FROM `land` WHERE `LandCoordinates` != '' ORDER BY `Region` ASC", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
if ($row["ScannerLand"] == 1) { $fontcolor = "#008000"; }
else { $fontcolor = "#808000"; }
if ($row["ScannerDifference"] == 0) { $fontcolor = "#000000"; }
$pls = split(" ", $row["LandCoordinates"]);
print "<TR STYLE=\"color: ".$fontcolor."\"><TD VALIGN=\"Top\">".$row["Region"]." (".$row["ScannerCoordinates"].")</TD><TD VALIGN=\"Top\">".(count($pls) * 16)." sqm.</TD><TD ALIGN=\"Center\" VALIGN=\"Middle\" WIDTH=\"130\" HEIGHT=\"130\" BGCOLOR=\"#0000FF\"><IMG SRC=\"./landimage.php?coords=".$row["LandCoordinates"]."\" WIDTH=\"128\" HEIGHT=\"128\" STYLE=\"filter:flipv();\"></TD><TD VALIGN=\"Top\">".$row["LandCoordinates"]."</TD><TD VALIGN=\"Top\">".date("m/d/Y - g:i A (T)", $row["Time"])."</TD></TR>\n";
//print "<BGSOUND LOOP=\"1\" VOLUME=\"100\" SRC=\"chaching.wav\">\n";
}
?>
</TABLE>
<HR>
<FONT SIZE="5">Possible Scanners Missing</FONT>
<TABLE>
<TR><TD WIDTH="200"><B><U>Region</U></B></TD><TD WIDTH="75"><B><U>Version</U></B></TD><TD WIDTH="300"><B><U>Channel</U></B></TD><TD><B><U>Date - Time</U></B></TD></TR>
<?
$result = mysql_query("SELECT * FROM `land`ORDER BY `Region` ASC", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
if ($row["ScannerLand"] == 1) { $fontcolor = "#008000"; }
else { $fontcolor = "#808000"; }
//if ($row["ScannerStatus"] == 1) { $fontcolor = "#FF0000"; }
//if ((time() - $row["Time"]) >= 900) { $fontcolor = "#FF0000"; }
$tc = split(",", $row["ScannerCoordinates"]);
if (((time() - $row["Time"]) >= 900) && ($row["ScannerCoordinates"])) { print "<TR STYLE=\"color: ".$fontcolor."\"><TD><A HREF=\"secondlife://".$row["Region"]."/".$tc[0]."/".$tc[1]."\" STYLE=\"color: ".$fontcolor."\">".$row["Region"]." (".$row["ScannerCoordinates"].")</A></TD><TD>".$row["ScannerVersion"]."</TD><TD><FONT FACE=\"Courier New\" SIZE=\"-1\">".$row["ScannerChannel"]."</FONT></TD><TD>".date("m/d/Y - g:i A (T)", $row["Time"])."</TD></TR>\n"; }
}
?>
</TABLE>
<HR>
<FONT SIZE="5">Possible Malfunctioned Scanners</FONT>
<TABLE>
<TR><TD WIDTH="200"><B><U>Region</U></B></TD><TD WIDTH="75"><B><U>Version</U></B></TD><TD WIDTH="300"><B><U>Channel</U></B></TD><TD><B><U>Date - Time</U></B></TD></TR>
<?
$result = mysql_query("SELECT * FROM `land` WHERE `ScannerStatus`='1' ORDER BY `Region` ASC", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
if ($row["ScannerLand"] == 1) { $fontcolor = "#008000"; }
else { $fontcolor = "#808000"; }
if ($row["ScannerStatus"] == 1) { $fontcolor = "#FF0000"; }
if ((time() - $row["Time"]) >= 900) { $fontcolor = "#FF0000"; }
$tc = split(",", $row["ScannerCoordinates"]);
print "<TR STYLE=\"color: ".$fontcolor."\"><TD><A HREF=\"secondlife://".$row["Region"]."/".$tc[0]."/".$tc[1]."\" STYLE=\"color: ".$fontcolor."\">".$row["Region"]." (".$row["ScannerCoordinates"].")</A></TD><TD>".$row["ScannerVersion"]."</TD><TD><FONT FACE=\"Courier New\" SIZE=\"-1\">".$row["ScannerChannel"]."</FONT></TD><TD>".date("m/d/Y - g:i A (T)", $row["Time"])."</TD></TR>\n";
}
?>
</TABLE>
<HR>
<FONT SIZE="5">Monitored Regions</FONT>
<TABLE>
<TR><TD WIDTH="200"><B><U>Region</U></B></TD><TD WIDTH="75"><B><U>Version</U></B></TD><TD WIDTH="300"><B><U>Channel</U></B></TD><TD><B><U>Date - Time</U></B></TD></TR>
<?
$result = mysql_query("SELECT * FROM `land`ORDER BY `Region` ASC", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
if ($row["ScannerLand"] == 1) { $fontcolor = "#008000"; }
else { $fontcolor = "#808000"; }
if ($row["ScannerStatus"] == 1) { $fontcolor = "#FF0000"; }
if ((time() - $row["Time"]) >= 900) { $fontcolor = "#FF0000"; }
$tc = split(",", $row["ScannerCoordinates"]);
if ($row["ScannerCoordinates"]) { print "<TR STYLE=\"color: ".$fontcolor."\"><TD><A HREF=\"secondlife://".$row["Region"]."/".$tc[0]."/".$tc[1]."\" STYLE=\"color: ".$fontcolor."\">".$row["Region"]." (".$row["ScannerCoordinates"].")</A></TD><TD>".$row["ScannerVersion"]."</TD><TD><FONT FACE=\"Courier New\" SIZE=\"-1\">".$row["ScannerChannel"]."</FONT></TD><TD>".date("m/d/Y - g:i A (T)", $row["Time"])."</TD></TR>\n"; }
}
?>
</TABLE>
<HR>
<FONT SIZE="5">Needed Regions</FONT>
<TABLE>
<TR><TD WIDTH="200"><B><U>Region</U></B></TD></TR>
<?
$result = mysql_query("SELECT * FROM `land`ORDER BY `Region` ASC", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
if (!$row["ScannerCoordinates"]) { print "<TR><TD>".$row["Region"]."</TD></TR>\n"; }
}
?>
<META HTTP-EQUIV="refresh" CONTENT="60">


PHP: updateland-xmlrpc.php:
CODE

<?
function SendEmail($toname, $to, $subject, $message) {
$DEBUG = FALSE;

// Could get this from the php ini?
$fromname = "Public Land Notification";
$from = "acidicflight@slapparatus.com";
list($me,$mydomain) = split("@",$from);

// Now look up the mail exchangers for the recipient
if ($DEBUG) { print "<u>DEBUG:</u> Looking up MX for recipient\n<HR>\n"; }
list($user,$domain) = split("@",$to,2);
if (getmxrr($domain,$mx,$weight) == 0) return FALSE;

// Try them in order of lowest weight first
if ($DEBUG) { print "<u>DEBUG:</u> Sorting MX by weight\n<HR>\n"; }
array_multisort($mx,$weight);
$success=0;
foreach($mx as $host) {
// Open an SMTP connection
$connection = @fsockopen ($host, 25, &$errno, &$errstr, 1);
if (!$connection) continue;

$res = fread($connection, 512);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "220") break;

// Introduce ourselves
fputs($connection, "HELO $mydomain\r\n");
if ($DEBUG) { print "<u>SENT:</u> HELO $mydomain\r\n<HR>\n"; }
$res = fread($connection, 256);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "250") break;

// Envelope from
fputs($connection, "MAIL FROM: <".$from.">\r\n");
if ($DEBUG) { print "<u>SENT:</u> MAIL FROM: ".$from."\r\n<HR>\n"; }
$res = fread($connection,256);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "250") break;

// Envelope to
fputs($connection, "RCPT TO: <".$to.">\r\n");
if ($DEBUG) { print "<u>SENT:</u> RCPT TO: ".$to."\r\n<HR>\n"; }
$res = fread($connection, 256);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "250") break;

// The message
fputs($connection, "DATA\r\n");
if ($DEBUG) { print "<u>SENT:</u> DATA\r\n<HR>\n"; }
$res = fread($connection, 256);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "354") break;

// Send To:, From:, Subject:, other headers, blank line, message, and finish
// with a period on its own line.
$boundary = rand(100000000000000000,999999999999999999)."epicrate.com";
$messageid = chr(rand(65,90)).chr(rand(65,90)).chr(rand(65,90)).rand(0,9).chr(rand(97,122)).rand(0,9).chr(rand(65,90)).chr(rand(65,90)).chr(rand(65,90))."@epicrate.com";
$headers = "Message-ID: <".$messageid.">\r\n";
$headers .= "From: \"".$fromname."\" <".$from.">\r\n";
$headers .= "Reply-To: \"".$fromname."\" <".$from.">\r\n";
$headers .= "To: $toname <".$to.">\r\n";
$headers .= "Subject: ".$subject."\r\n";
$headers .= "Date: ".date(r)."\r\n";
$headers .= "X-Mailer: AcidicChip Website Notification\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/alternative;\r\n";
$headers .= "\tboundary=\"--".$boundary."\"\r\n";
$headers .= "\r\n";
$headers .= "----".$boundary."\r\n";

$footer .= "\r\n\r\n";
$footer .= "----".$boundary."--";

fputs($connection, $headers.$message.$footer."\r\n.\r\n");
if ($DEBUG) { print "<u>SENT:</u> <I>EMAIL INFORMATION</I>\r\n<HR>\n"; }
$res = fread($connection, 256);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "250") break;

// Say bye bye
fputs($connection,"QUIT\r\n");
if ($DEBUG) { print "<u>SENT:</u> QUIT\r\n<HR>\n"; }
$res = fread($connection, 256);
if ($DEBUG) { print "<u>RCVD:</u> ".$res."\n<HR>\n"; }
if (substr($res,0,3) != "221") break;

// It worked! So break out of the loop which tries all the mail exchangers.
$success = 1;
break;
}

// Debug for if we fall over - uncomment as desired
if ($DEBUG) { print $success?"Mail sent":"Failure: $res\n"; }
if ($connection) {
if($success==0) fputs($connection, "QUIT\n");
fclose ($connection);
}
return $success?TRUE:FALSE;
}
?>
<? print date("F dS, Y - g:i A (T)", time()); ?>
<? $starttime = time(); ?>
<HR>
<?
global $sql;
$sql = mysql_connect("localhost", "USERNAME", "PASSWORD");
mysql_select_db("DATABASE", $sql);
?>

<?
// List of XML-RPC Channels go here/
$scannerlist = "
11111111-1111-1111-1111-111111111111
22222222-2222-2222-2222-222222222222
33333333-3333-3333-3333-333333333333
";
?>

<?
function Channel2Region($channel) {
$result = mysql_query("SELECT * FROM `land` WHERE `ScannerChannel`='".$channel."'", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
return $row["Region"];
}
}

function LandSQM($region) {
$result = mysql_query("SELECT * FROM `land` WHERE `Region`='".$region."'", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
$pls = split(" ", $row["LandCoordinates"]);
}
return (count($pls) * 16);
}

function ScannerCoords($region) {
$result = mysql_query("SELECT * FROM `land` WHERE `Region`='".$region."'", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
return $row["ScannerCoordinates"];
}
}
?>

<?
function postToHost($host, $path, $data_to_send) {
$fp = fsockopen($host, 80) or Die("Can't connect...<BR><META HTTP-EQUIV=\"refresh\" CONTENT=\"30\">");
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ". strlen($data_to_send) ."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
$res .= fgets($fp, 128);
}
fclose($fp);
return substr($res, strpos($res, "\r\n\r\n"));;
}

function parseResponse($response) {
$result = array();
if (preg_match_all('#<name>(.+)</name><value><(string|int)>(.*)</\2></value>#U', $response, $regs, PREG_SET_ORDER)) {
foreach($regs as $key=>$val) {
$result[$val[1]] = $val[3];
}
}
return $result;
}

function sendRequest($channel, $intValue, $stringValue) {
$channel = htmlspecialchars($channel);
$int = (int)$intValue;
$string = htmlspecialchars($stringValue);

$data = '<?xml version="1.0"?>';
$data .= '<methodCall>';
$data .= '<methodName>llRemoteData</methodName>';
$data .= '<params><param><value><struct>';
$data .= '<member><name>Channel</name><value><string>'.$channel.'</string></value></member>';
$data .= '<member><name>IntValue</name><value><int>'.$int.'</int></value></member>';
$data .= '<member><name>StringValue</name><value><string>'.$string.'</string></value></member>';
$data .= '</struct></value></param></params></methodCall>';

return parseResponse(postToHost("xmlrpc.secondlife.com","/cgi-bin/xmlrpc.cgi", $data));
}

function decompress($coord_str) {
$conversion = array(
"0" => "0",
"4" => "1",
"8" => "2",
"12" => "3",
"16" => "4",
"20" => "5",
"24" => "6",
"28" => "7",
"32" => "8",
"36" => "9",
"40" => "a",
"44" => "b",
"48" => "c",
"52" => "d",
"56" => "e",
"60" => "f",
"64" => "g",
"68" => "h",
"72" => "i",
"76" => "j",
"80" => "k",
"84" => "l",
"88" => "m",
"92" => "n",
"96" => "o",
"100" => "p",
"104" => "q",
"108" => "r",
"112" => "s",
"116" => "t",
"120" => "u",
"124" => "v",
"128" => "w",
"132" => "x",
"136" => "y",
"140" => "z",
"144" => "A",
"148" => "B",
"152" => "C",
"156" => "D",
"160" => "E",
"164" => "F",
"168" => "G",
"172" => "H",
"176" => "I",
"180" => "J",
"184" => "K",
"188" => "L",
"192" => "M",
"196" => "N",
"200" => "O",
"204" => "P",
"208" => "Q",
"212" => "R",
"216" => "S",
"220" => "T",
"224" => "U",
"228" => "V",
"232" => "W",
"236" => "X",
"240" => "Y",
"244" => "Z",
"248" => "#",
"252" => "%",
"256" => "@"
);

if (strlen($coord_str) == 2) { $output = array_search(substr($coord_str, 0, 1), $conversion) . "," . array_search(substr($coord_str, 1, 1), $conversion); }
if (strlen($coord_str) == 3) { $output = array_search(substr($coord_str, 0, 1), $conversion) . "," . array_search(substr($coord_str, 1, 1), $conversion) . "," . array_search(substr($coord_str, 2, 1), $conversion); }
return $output;
}
?>
<?
$scanners = split("\n", str_replace("\t", "", $scannerlist));
for ($i = 0; $i < count($scanners); $i++) {
if ($scanners[$i]) {
$response = sendRequest($scanners[$i], "313", "313Resultz");
$scanresults = split("-", htmlspecialchars($response['StringValue']));
$tmpregion = split("_", $scanresults[0]);
$region = $tmpregion[0];
$scannercoordinates = $tmpregion[1];
$scannerland = $tmpregion[2];
$scannerdifference = $tmpregion[3];
$scannerstatus = 0;
$scannerversion = $tmpregion[4];
//print htmlspecialchars($response['StringValue'])."<BR>";
//print "Region: ".$region."<BR>";
//print "Scanner: ".$scannercoords."<BR>";
//print "Land: ".$scanresults[1]."<BR>";
if ($region) {
$exists = 0;
$result = mysql_query("SELECT * FROM `land` WHERE `Region`='".$region."'", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
$exists += 1;
}
if (!$exists) {
mysql_query("
INSERT INTO `land` (
`Region`,
`ScannerChannel`,
`ScannerCoordinates`,
`ScannerLand`,
`ScannerDifference`,
`ScannerStatus`,
`ScannerVersion`,
`LandCoordinates`,
`Time`
)
VALUES (
'".$region."',
'".$scanners[$i]."',
'".$scannercoordinates."',
'".$scannerland."',
'".$scannerdifference."',
'".$scannerstatus."',
'".$scannerversion."',
'',
'".time()."'
)
", $sql);
}
$result = mysql_query("SELECT * FROM `land` WHERE `Region`='".$region."'", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
if ($row["ScannerDifference"] == $scannerdifference) { $scannerstatus = 1; };
}
if (strpos($scanresults[1], "&")) {
$mailheaders = "From: NULL <null@slapparatus.com>\n";
$mailheaders .= "Reply-To: null@slapparatus.com";
//mail("acidicchip@acidicchip.com", "XML-RPC Error", htmlspecialchars($response['StringValue'])." (XML-RPC: ".$scanners[$i].")", $mailheaders);
}
else if ($scanresults[1] == "Clear") {
mysql_query("
UPDATE `land` SET
`ScannerChannel`='".$scanners[$i]."',
`ScannerCoordinates`='".$scannercoordinates."',
`ScannerLand`='".$scannerland."',
`ScannerDifference`='".$scannerdifference."',
`ScannerStatus`='".$scannerstatus."',
`ScannerVersion`='".$scannerversion."',
`LandCoordinates`='',
`Time`='".time()."'
WHERE `Region`='".$region."' LIMIT 1 ;
", $sql);
print "<I>No Public Land In ".$region."</I><BR>\n";
}
else {
$pubcoords = "";
$o = 0;
$coordlen = strlen($scanresults[1]);
if (
(substr($coordlen, strlen($coordlen) - 1, 1) == "1") ||
(substr($coordlen, strlen($coordlen) - 1, 1) == "3") ||
(substr($coordlen, strlen($coordlen) - 1, 1) == "5") ||
(substr($coordlen, strlen($coordlen) - 1, 1) == "7") ||
(substr($coordlen, strlen($coordlen) - 1, 1) == "9")
) { $coordlen -= 1; }

while ($o < $coordlen) {
if($pubcoords) { $pubcoords = $pubcoords." "; }
$pubcoords .= decompress(substr($scanresults[1], $o, 2));
print "<B>Public Land At ".$region." ".decompress(substr($scanresults[1], $o, 2))."</B><BR>\n";
$o += 2;
}

$exists = 0;
$result = mysql_query("SELECT * FROM `land` WHERE `Region`='".$region."' AND `LandCoordinates`='".$pubcoords."'", $GLOBALS["sql"]);
while ($row = mysql_fetch_array($result)) {
$exists += 1;
}

mysql_query("
UPDATE `land` SET
`ScannerChannel`='".$scanners[$i]."',
`ScannerCoordinates`='".$scannercoordinates."',
`ScannerLand`='".$scannerland."',
`ScannerDifference`='".$scannerdifference."',
`ScannerStatus`='".$scannerstatus."',
`ScannerVersion`='".$scannerversion."',
`LandCoordinates`='".$pubcoords."',
`Time`='".time()."'
WHERE `Region`='".$region."' LIMIT 1 ;
", $sql);

if (!$exists) {
$mailheaders = "From: NULL <null@slapparatus.com>\n";
$mailheaders .= "Reply-To: null@slapparatus.com";
SendEmail("Your Name", "email@address.com", "Public Land", "Public Land Was Found: ".$region." (".LandSQM($region)." sqm)");
}
}
}
else {
print "<FONT COLOR=\"#FF0000\"><B>NO RESPONSE FROM SCANNER: ".$scanners[$i]." ".Channel2Region($scanners[$i])." (".ScannerCoords(Channel2Region($scanners[$i])).")</B></FONT><BR>";
}
}
}
?>
<BR>
<?
$finishtime = time();
$totaltime = $finishtime - $starttime;
print "Completed in ".$totaltime." seconds.";
?>
<HR>
<? include("./publicland.php"); ?>
<META HTTP-EQUIV="refresh" CONTENT="30">
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 06:26
And that's all of it! Enjoy!
splat1 Edison
Registerd Nut
Join date: 6 Sep 2004
Posts: 353
12-02-2004 06:46
/me wips up a land scanner scanner for his plots. bewarned my delete button is set to kill.
_____________________
Splat Soft - We exsist in the RL to!
Gigas Bunny (Mule)
####
You see, our experts describe you as an appallingly dull fellow, unimaginative, timid, lacking in initiative, spineless, easily dominated, no sense of humour, tedious company and irrepressibly drab and awful. And whereas in most professions these would be considerable drawbacks, in chartered accountancy they are a positive boon.
Hank Ramos
Lifetime Scripter
Join date: 15 Nov 2003
Posts: 2,328
12-02-2004 06:46
Massively parallel scan of the sim every 10 seconds? This kind of code running on land that makes up 0.02% of a sim is evil. Talk about adding to world-wide lag.
_____________________
Cienna Rand
Inside Joke
Join date: 20 Sep 2003
Posts: 489
12-02-2004 06:47
While I appreciate your need for attention, shouldn't this be in the Scripting Library or something?
_____________________
You can't spell have traffic without FIC.
Primcrafters (Mocha 180,90) : Fine eyewear for all avatars
SLOPCO (Barcola 180, 180) : Second Life Oil & Petroleum
Company
Landmarker : Social landmarking software
Conversation : Coming soon!
FlipperPA Peregrine
Magically Delicious!
Join date: 14 Nov 2003
Posts: 3,703
12-02-2004 06:50
I don't think I've EVER seen such a misuse of server resources and lack for the community, and that includes the old situation in Federal.

This is truly disgusting. Lindens, if you ever needed your queue for their needing to be rules about responsible cpu use, this is it.

This kinda of cavalier attitude to server resources and your fellow players truly makes me want to PUKE. You see, there's the thing we have here that a lot of us treasure... its called a COMMUNITY.

Regards,

-Flip
_____________________
Peregrine Salon: www.PeregrineSalon.com - my consulting company
Second Blogger: www.SecondBlogger.com - free, fully integrated Second Life blogging for all avatars!
eltee Statosky
Luskie
Join date: 23 Sep 2003
Posts: 1,258
12-02-2004 06:52
not that it means much at this point but these scanners have been the single most lag induing objects in many sims for months. Further, since any land that would truly be worth grabbing now goes straight to the lindens (i've seen parcels down to 128 sqm go through the auction, rather than release systems)

Its more jus an excercise in viewing just how motivating raw greed can be that such an amazingly elaborate and utterly selfish system was ever designed. (remember chance is basically the reason public land, as a SL 'institution' has been removed from the game, to everyone's detriment)
_____________________
wash, rinse, repeat
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-02-2004 06:55
While I agree this should be in the scripting library, lets at least recognize this as a step in the right direction.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
FlipperPA Peregrine
Magically Delicious!
Join date: 14 Nov 2003
Posts: 3,703
12-02-2004 06:56
Sensual babycakes,

Did this other land scanner require 20 scripts and scan the sim in parallel every 10 seconds with all scripts involved? Did it create massive amounts of lag on this scale?

No?

I didn't think so either.

-Flip
_____________________
Peregrine Salon: www.PeregrineSalon.com - my consulting company
Second Blogger: www.SecondBlogger.com - free, fully integrated Second Life blogging for all avatars!
Lordfly Digeridoo
Prim Orchestrator
Join date: 21 Jul 2003
Posts: 3,628
12-02-2004 06:56
Dear Chance,

Go to hell.

Signed, the SL community.
_____________________
----
http://www.lordfly.com/
http://www.twitter.com/lordfly
http://www.plurk.com/lordfly
Maxx Monde
Registered User
Join date: 14 Nov 2003
Posts: 1,848
12-02-2004 06:58
That's a lot of brooms up a sims ass! Every ten seconds, no less!

Seriously though, is this like publishing plans on how to crash a simulator? (Resource drain, fueling malicious behavior). So, mega-TOS violation?

I guess we'll see, a few hundred mis-applied uses of this code later...
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-02-2004 07:01
Crashing a sim requires two lines of code. You don't need to go to this trouble.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 07:05
From: eltee Statosky
not that it means much at this point but these scanners have been the single most lag induing objects in many sims for months. Further, since any land that would truly be worth grabbing now goes straight to the lindens (i've seen parcels down to 128 sqm go through the auction, rather than release systems)

Its more jus an excercise in viewing just how motivating raw greed can be that such an amazingly elaborate and utterly selfish system was ever designed. (remember chance is basically the reason public land, as a SL 'institution' has been removed from the game, to everyone's detriment)


That's interresting... because on my island, I've moniitored it's stats, put out 5 scanners, and BARELY noticed any lag or resource usage... Interresting, ain't it?
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 07:06
From: FlipperPA Peregrine
Sensual babycakes,

Did this other land scanner require 20 scripts and scan the sim in parallel every 10 seconds with all scripts involved? Did it create massive amounts of lag on this scale?

No?

I didn't think so either.

-Flip


That's interresting... because on my island, I've moniitored it's stats, put out 5 scanners, and BARELY noticed any lag or resource usage... Interresting, ain't it?
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 07:06
From: Maxx Monde
That's a lot of brooms up a sims ass! Every ten seconds, no less!

Seriously though, is this like publishing plans on how to crash a simulator? (Resource drain, fueling malicious behavior). So, mega-TOS violation?

I guess we'll see, a few hundred mis-applied uses of this code later...



That's interresting... because on my island, I've moniitored it's stats, put out 5 scanners, and BARELY noticed any lag or resource usage... Interresting, ain't it?
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
12-02-2004 07:07
From: Lordfly Digeridoo
Dear Chance,

Go to hell.

Signed, the SL community.



Dear Lordfly,

((edited to remove personal attack))

Signed,
Chance Small
eltee Statosky
Luskie
Join date: 23 Sep 2003
Posts: 1,258
12-02-2004 07:08
From: Chance Small
That's interresting... because on my island, I've moniitored it's stats, put out 5 scanners, and BARELY noticed any lag or resource usage... Interresting, ain't it?


just how 5 people drivin 200mph down the jersey turnpike at 3am don't necessarily cause accidents.

Those same 5 cars doin that same thing durin morning rush hour is another story entirely. Its not *my* words that noted it was the laggiest object in the simulators... those came from the lindens (and some of these simulators included some other notorious problem objects such as the earlier revisions of the leaf trees that used sheets of 1-200 physics spawning listeners
_____________________
wash, rinse, repeat
1 2 3 4