Author Topic: Clear Player Bricks on Leave  (Read 2079 times)

What I'm asking for is a simple server script that when the player leaves, it clears their bricks. This could be useful for freebuilds where spam wouldn't be a problem even without a active host. Thanks in advance.

Edit: Perhaps a GUI with options to protect people from their bricks being cleared, also a small option to pick the time before the bricks are cleared just incase someone crashes but still wants their bricks.
« Last Edit: December 02, 2009, 05:55:40 PM by Orthone »

Shouldn't you also say that there should be an RTB pref to enable/disable and who's brick will not be cleared?

Yes, I suppose I should.. Or maybe a custom GUI perhaps? A list showing the Names / BLID's that are protected from this..

how about a length of time, say 5 minutes where it doesn't do anything ot them,and if the owner comes back, such as from disconnect, it does nothing?

"Oh man I just built this awesome build! Guys com lo---" *crashes* *comes back* "Omg, wth happened to my build? It took me 2 hours!"

Wouldn't this be the script for clientSided?
Code: [Select]
package onLeaveClear
{
 function disconnect()
 {
  commandToServer('ClearBricks');
  //A little extra =D
  commandToServer('MessageSent',"Bye.");
  %Parent = Parent::disconnect();
  //So it will send the command before they leave.
  schedule(1000,0,%parent);
 }
};
?
But this would be a good idea so someone wan't still saves but DaSord is right accept it wouldn't called the Disconnect function if the whole game would crash, am i right?

Wouldn't this be the script for clientSided?
Code: [Select]
package onLeaveClear
{
 function disconnect()
 {
  commandToServer('ClearBricks');
  //A little extra =D
  commandToServer('MessageSent',"Bye.");
  %Parent = Parent::disconnect();
  //So it will send the command before they leave.
  schedule(1000,0,%parent);
 }
};
?
But this would be a good idea so someone wan't still saves but DaSord is right accept it wouldn't called the Disconnect function if the whole game would crash, am i right?
I don't know if that would work.. But I was thinking more of serversided.. When a player left it cleared their bricks.

I don't know if that would work.. But I was thinking more of serversided.. When a player left it cleared their bricks.
That won't work it's not even packaged right.

Love the idea, will work on it.

That won't work it's not even packaged right.
I just noticed it wouldn't called the Disconnect function.

Right but I mean why not just save your bricks on leave. Also if I ever get a desent amount of free time I will make it for you via pm.

Right but I mean why not just save your bricks on leave. Also if I ever get a desent amount of free time I will make it for you via pm.
1. I don't want to save bricks on leave.. I want the player who leaves, their bricks to be destroyed after about 5 mins of not being on.

2. Thanks in advance if you do make it.

Essentially what you'd want is something like the public brick domain setting (where bricks have their owner removed after X minutes of that owner being absent). That way you could set it to 10 minutes and it'll still be there if the person crashes and returns within those 10 minutes.

Dedicated servers would be destroyed by this.
The host would leave, and any special stuff would go

Essentially what you'd want is something like the public brick domain setting (where bricks have their owner removed after X minutes of that owner being absent). That way you could set it to 10 minutes and it'll still be there if the person crashes and returns within those 10 minutes.
Essentially yes, but I don't want the bricks owner to just be removed, I want the bricks to delete as well.