I'm working on a script that repeatedly sends a box using llWarpPos() to each of the four corners of my mainland sim, the corner parcels I own.
However, some of the land in-between I dont own, and for some reason, instead of 'warping', it seems to get caught up with parcel full messages, never fully making it to its four-corner destinations.
Instead of going from (0,0) to (255,0) to (255,255) to (0,255), I get this instead:
(Starting from (132, 219, 419.88330)........)
Second Life: Can't move object 'Test Box' to { 38.8325, 65.0553, 419.883 } in region Isabel because the parcel is full. Notifications from this region are temporarily deactivated.
I am now at: <0.00000, 0.00000, 419.88330>
I am now at: <70.00000, 0.00000, 419.88330>
I am now at: <75.87228, 8.09422, 419.88330>
I am now at: <58.24808, 65.44740, 419.88330>
I am now at: <0.00000, 0.00000, 419.88330>
...and over, and over.
So - questions....
a) Is there a way I can detect whether the parcel is full before I enter it, and perhaps re-route? (I dont think there is, but figured I'd ask anyway)
b) Any suggestions on how I could re-route in general, to get this box back to the four corners where it belongs when it gets 'stuck'?
Here is the script I'm attempting to use: (damn you, BBCode!):
CODE
integer handle;
integer sleep = 10;
vector start;
glSetPos(vector dest) // dest must be in global coordinates
{
vector prev = dest;
vector pos = llGetRegionCorner() + llGetPos(); // glGetPos() inlined
while ( llVecDist(pos, dest) >= 0.01 && llVecDist(pos, prev) >= 0.01 )
{
integer steps = (integer)llCeil(llVecDist(pos, dest) / 10.0);
if ( steps > 128 ) steps = 128;
list rules = [PRIM_POSITION, dest - llGetRegionCorner()];
integer len = 2;
while ( len < steps )
{
rules += rules;
len += len;
}
rules += llList2List(rules, 0, steps * 2 - len - 1);
llSetPrimitiveParams(rules);
prev = pos;
pos = llGetRegionCorner() + llGetPos(); // glGetPos() inlined
}
}
moveme()
{
glSetPos(llGetRegionCorner() + <0,0,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
glSetPos(llGetRegionCorner() + <255,0,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
glSetPos(llGetRegionCorner() + <255,255,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
glSetPos(llGetRegionCorner() + <0,255,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
}
default
{
state_entry()
{
handle = llListen(8,"","","kill");
}
touch_start(integer total_number)
{
start = llGetPos();
}
link_message(integer sender_num, integer lmnum, string lmstr, key lmid)
{
if (llGetSubString(lmstr,0,4) == "BEGIN")
{
list configparms = llParseStringKeepNulls(lmstr, ["|"], [""]);
sleep = (integer) llList2String(configparms,7);
llSay(0,"Preparing to initiate move cycle in 10 seconds.");
llSleep(10);
while (0==0)
{
moveme();
}
}
}
listen(integer channel, string name, key id, string msg)
{
if (msg == "kill")
{
llDie();
}
}
}
Any suggestions would be much appreciated!

)
