Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: Vehicle orbited in the sandbox?

Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
10-29-2005 03:39
When your avatar is pushed, you (usually) get a PvP message and the push script's owner shows up in the PvP list. Not so when your VEHICLE is being pushed! Hopefully someday we'll have some way to be immune from this nonsense.

In the meantime, I am releasing scripts that I have used twice to successfully pinpoint the location of a push object in the sandbox, including just now. I found the offending device, a Hand of God linked to a giant sphere, just minutes before the sandbox was cleared.

OK, so here's the code... Put this in a plywood cube or something. I recommend making the cube phantom, so it won't get hung up, or bump anyone. (The object of this exercise is to file an AR on someone for pushing your vehicle, and it'll be pretty ironic if you get an AR from one of these things.) You can shout commands on channel 1 such as 'start', 'stop', and 'die'. Please clean them up after you are done gathering evidence, as each has a listener, and that has some impact on sim performance.

Scroll down for code that will distribute these bumper detectors in a line, so you don't have to.

CODE
// Designed to pinpoint a script in the sandbox 1/22/04 that kept launching physics objects.
// Put this in a bunch of cubes lined up at the north border of a sim and click them.
// They will travel across the sim slowly. As soon as they get pushed, they will go non-
// physical.
// Then they will go back to where they were pushed and use llSetText() to say where they were
// when pushed.

integer running = FALSE;
vector lastGoodPos;
vector baselinePos;

Goto(vector Dengo) {
while(llVecDist(llGetPos(), Dengo) > 1) {
llSetPos(Dengo);
}
}

startSweep() {
llWhisper(0, "Starting sweep");
llSetBuoyancy(1);
running = TRUE;
llSetStatus(STATUS_PHYSICS, TRUE);
llSleep(1);
baselinePos = llGetPos();
llMoveToTarget(llGetPos(), 0.1);

llSetTimerEvent(.5);
}

stopSweep() {
running = FALSE;
llSetStatus(STATUS_PHYSICS, FALSE);
llSetTimerEvent(0);
}

sweepComplete() {
stopSweep();
llSetText("Sweep complete, no push occurred.", <1,1,1>, 1);
}

default {
state_entry() {
llSetBuoyancy(0);
llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_PHYSICS, FALSE);
lastGoodPos = llGetPos();
llListen(1, "", "", "");
llSetText("", <1,1,1>, 1);
}

listen(integer chan, string name, key id, string msg) {
if(id!=llGetOwner())
return;
if(msg=="ping")
llOwnerSay("pong "+(string)running+" "+(string)llGetPos());
if(msg=="start")
startSweep();
if(msg=="stop")
stopSweep();
if(msg=="die")
llDie();
if(msg=="reset")
llResetScript();
}

touch_start(integer n) {
if(llDetectedKey(0)!=llGetOwner())
return;
if(!running)
startSweep();
else
stopSweep();

}

timer() {
vector pos = llGetPos();
if(llFabs(pos.x - baselinePos.x) > 1 || llFabs(pos.z - baselinePos.z) > 50) {
llSetTimerEvent(0);
llSetStatus(STATUS_PHYSICS, FALSE);
Goto(lastGoodPos);
llSetText("Pushed at "+(string)lastGoodPos + "\n ", <1,1,1>, 1);
} else
lastGoodPos = pos;
if(pos.y < 10) {
sweepComplete();
}
llMoveToTarget(<pos.x, pos.y - 10, pos.z>, 1);
}
}
Now, perhaps you don't want to spend a lot of time rezzing a ton of these little things, so here's some code to drop a line of them at 10M intervals:

CODE
// Go to a location (nonphysical motion)
// Has some built-in safety checks
Goto(vector Dengo) {

if(Dengo.x == 0 && Dengo.y == 0) {
llSay(0, "ERROR: <0, 0, z> coordinates. Aborting move.");
return;
}
if(Dengo.x < 0 || Dengo.y < 0 || Dengo.x > 255 || Dengo.y > 255) {
llSay(0, "ERROR: Those coordinates are not in this sim. Aborting move.");
return;
}
integer maxSteps = 100;
while(llVecDist(llGetPos(), Dengo) > 1) {
maxSteps--;
if(maxSteps < 0)
return;
llSetPos(Dengo);
}
}

default {
touch_start(integer n) {
if(llDetectedKey(0) != llGetOwner())
return;

vector pos = llGetPos();
integer x;
for(x=10; x<25; x+=5) {
Goto(<x, pos.y, pos.z>);
llRezObject("Bumper Detector 7", llGetPos(), ZERO_VECTOR, ZERO_ROTATION, 0);
}
llOwnerSay("*** Done, returning");
Goto(pos);
}
}
Obviously you will need to change the bumper detector object's name from "Bumper Detector 7" to whatever you decide to call it.

To use this, assuming you're using the above script to lay down a line of bumper detectors, I recommend setting them up in a grid starting at ground level. Set up your lines perhaps 10 meters above one another, going up to 90 meters above ground level.

Once you set them in motion (shout "start" on channel 1 or just touch them individually), the ones that get pushed will go to the last location they were at before they were pushed. As a result, you'll get a bunch of them sitting in a spherical pattern at the border of the pusher's sensor range! You can use this to guess at the center of the push object's range, which would be the object itself.

The object may be invisible, so edit something and hold down ALT. That will highlight any hidden stuff. That should help you find it, assuming it is hidden. It may also be under the ground or hidden inside another object. You can make the ground invisible with ctrl+alt+shift+5 (if that does nothing, press ctrl+alt+shift+d to turn on the debug menu.)

Once I had my grid of bumper detectors set up, it took about 5-10 minutes to home in on the pusher.

An interesting mod for these scripts might to be to have the distribution script rez the objects with a parameter, and have that parameter cause them to start moving immediately, so you don't have to touch or shout at them.

By default, the objects move in 10M steps. You can set this lower to get more accuracy. The scan will take longer, but it might be worth it.

Once you find the push object, I recommend filing an abuse report and calling in a liaison. They can read scripts in objects they don't own, which can be an important step in proving that the object you found is, indeed, the pusher.
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
11-01-2005 06:12
/15/98/68681/1.html
_____________________
i've got nothing. ;)
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
11-02-2005 07:02
Apart from the proposal in my sig, I thought that, maybe, just *maybe* it might be wise of LL to provide us with an additional status flag which works the exact same way as STATUS_BLOCK_GRAB, but instead allows blocking external pushes. Let's call it STATUS_BLOCK_PUSH, hmm ?

I mean, Lindens already agree that even security scripts shouldn't use llPushObject. That means that it's wrong to arbitrarily push other people even though they are trespassing, so why allow to be pushed under all circumstances without recourse (apart from sitting on a non-physical object...) ?
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
CrystalShard Foo
1+1=10
Join date: 6 Feb 2004
Posts: 682
01-09-2006 00:52
You've got a pretty good idea going there Huns, good job. :)
Vague Speculaas
Registered User
Join date: 18 Sep 2005
Posts: 10
01-11-2006 09:52
Hopefuly linden labs finds a solution. One thing I'm proposing is add another detected function. This function being llDetectedPusher() or add another event such as scripted_push(integer param) {}. That way if you really wanted to you could detect any scripted pushes with a few lines of code.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-11-2006 16:44
From: Jesrad Seraph
*maybe* it might be wise of LL to provide us with an additional status flag which works the exact same way as STATUS_BLOCK_GRAB, but instead allows blocking external pushes. Let's call it STATUS_BLOCK_PUSH, hmm ?

Would it be sort of inconsistent to be able to block pushes in objects but not for your avatar?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
01-11-2006 21:29
Aren't Avatars physical objects ? If so this flag should be useable on avatars too.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.