Jump to content

Suggestion: Only teleport when sleeping xx hours or more

Pending 1.0.305

ToliburtiX
ToliburtiX

Posted

Hello,

I'm urgently searching for a plugin to teleport outside sleepers after some amount of time, let's say 24 hours or more. All short time outside sleepers should stay where they are. Any chance to implement an option like this in the near future?

Greetings,

Toli

 

MACHIN3

Posted

3 hours ago, ToliburtiX said:

Hello,

I'm urgently searching for a plugin to teleport outside sleepers after some amount of time, let's say 24 hours or more. All short time outside sleepers should stay where they are. Any chance to implement an option like this in the near future?

Greetings,

Toli

 

For something like this it would require record keeping and data files which this plugin doesn't do. I would have to store logout times for each player to know exactly when they logged out and then have either a timer running or a constant check every x amount of mins for sleepers with a recorded timestamp that's greater than the set time limit.

This would change this plugin greatly from a simply sleeper mover to a sleeper tracker.. 

ToliburtiX

Posted

Hey,

thanks for your answer. Perhaps we misunderstood each other. I meant an option like "Teleport only after at least xx seconds of sleeping" when executing the scan commands. So there's no need for a timer, just ignore short time (lets say 24 hours) sleepers, when the scan commands are executed or on plugin load, like it is now.

You already write the location of sleepers to a file on logout (to backport them on login). Why not also save the logout time in the same dataset?

Greetings,
Toli

MACHIN3

Posted

49 minutes ago, ToliburtiX said:

Hey,

thanks for your answer. Perhaps we misunderstood each other. I meant an option like "Teleport only after at least xx seconds of sleeping" when executing the scan commands. So there's no need for a timer, just ignore short time (lets say 24 hours) sleepers, when the scan commands are executed or on plugin load, like it is now.

You already write the location of sleepers to a file on logout (to backport them on login). Why not also save the logout time in the same dataset?

Greetings,
Toli

I had to go back and look at this one but your right, It already does have a data file, I was wrong lol. I haven't messed with this one in some time I was thinking it was something a bit more simple but like my other plugins I left room for improvement and your suggestion might can work.

The 24 hour delay or timer will be the trick. I have to be able to either tell the system to run the command for each player after xx seconds (or 24 hours) when they log out which requires a timer to be set when the player logs out or do a random scan every xx seconds for sleepers that are outside with a timestamp longer than xx seconds.. The random check every  so often would probably be best for system performance 

ToliburtiX

Posted (edited)

1 hour ago, MACHIN3 said:

I had to go back and look at this one but your right, It already does have a data file, I was wrong lol. I haven't messed with this one in some time I was thinking it was something a bit more simple but like my other plugins I left room for improvement and your suggestion might can work.

The 24 hour delay or timer will be the trick. I have to be able to either tell the system to run the command for each player after xx seconds (or 24 hours) when they log out which requires a timer to be set when the player logs out or do a random scan every xx seconds for sleepers that are outside with a timestamp longer than xx seconds.. The random check every  so often would probably be best for system performance 

Nice to hear, but your are overcomplicating again. 😉  Let other plugins deal with timers and scheduled execution, there are many of them. Your plugin has "/scansleepers" to call, there is also the option to run on plugin-reload/server restart. Thats fine and enough.

My suggested option should only be a minimum time since logout a sleeper will be ignored for teleportation, not an exact time. There are situations especially on PvE/RP servers you don't want a sleeping player disappear only because the connection dropped, and reappear 10 minutes later. But on the other hand it would be nice to port all wild sleepers (mostly players which do not come back) after 24 or 48 hours at next server restart to a rescue station. 😉 

In other words: Must be sleeping at least for xx seconds at the moment the scan runs, otherwise ignore for teleportation.

Edited by ToliburtiX

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.6m
Total downloads
Customers
11.4k
Customers served
Files Sold
163.1k
Total sales
Payments
3.5m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.