Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Time Controlled Shutdown

Joined
Feb 18, 2015
Messages
7
i personally would love if i was able to start the bot and then click time ( 2 hours ) and then it shuts down after 2 hours.

so i would be able to start the bot when i leave home even tho im gonna be gone for days i know the bot will shut down after the chosen time, there probably other ways to do this but im not that smart :p
 
Joined
Dec 17, 2014
Messages
256
i personally would love if i was able to start the bot and then click time ( 2 hours ) and then it shuts down after 2 hours.

so i would be able to start the bot when i leave home even tho im gonna be gone for days i know the bot will shut down after the chosen time, there probably other ways to do this but im not that smart :p

you run a .bat file with
shutdown.exe /s /t (time in seconds without parenthesis)
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
This is a little tough to do with the client, because the client does not know if/when a bot is safe to be stopped. Take a combat bot for example. Forced shutdown could cause death and loss of items.
 

red

Joined
Nov 17, 2013
Messages
259
This is a little tough to do with the client, because the client does not know if/when a bot is safe to be stopped. Take a combat bot for example. Forced shutdown could cause death and loss of items.
If it were me, I would add another method in the Script class that lets the developer decide what to do when shutdown is imminent. Maybe run away from monster or bank everything, etc...
 
The Pip Collector
Joined
Sep 14, 2014
Messages
445
If it were me, I would add another method in the Script class that lets the developer decide what to do when shutdown is imminent. Maybe run away from monster or bank everything, etc...
But its not up to you faggit. /wrists
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
If it were me, I would add another method in the Script class that lets the developer decide what to do when shutdown is imminent. Maybe run away from monster or bank everything, etc...
The problem with this is that any significant task would take many iterations and there's not an easy way to determine when it's ran enough times so you're really in a safe place. My only idea would be having it return a 'finished' boolean.
 
Joined
Jan 1, 2015
Messages
272
The problem with this is that any significant task would take many iterations and there's not an easy way to determine when it's ran enough times so you're really in a safe place. My only idea would be having it return a 'finished' boolean.


Is there no way of killing the process from the task manager maybes? something along them lines?
 
Joined
Jan 8, 2015
Messages
1,427
P
The problem with this is that any significant task would take many iterations and there's not an easy way to determine when it's ran enough times so you're really in a safe place. My only idea would be having it return a 'finished' boolean.
Perhaps basing that onFinish() on developer scripted booleans like....

Time has past, not in combat etc
 
Joined
Jan 1, 2015
Messages
272
Of course we could, but that doesn't fix the problem of the account potentially being in a dangerous situation.


Timer == setamount > logout > kill process

set arguments like how you have for user n which cliient to download

or maybe im way out my depth here
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Timer == setamount > logout > kill process

set arguments like how you have for user n which cliient to download

or maybe im way out my depth here
There are a lot of situations where you can't log out for a set period of time. There are also situations where you can't simply wait until a set period of time has passed because your character could be killed.
 
Joined
Dec 18, 2014
Messages
398
Any bot that has a safe spot to stop should implement an interface, Shutdownable, with the an abstract (or possibly a default) method, #canShutdown, returning a boolean when it is safe to shutdown.

The client could detect upon compilation or something whether or not a bot's main class implements Shutdownable, and thus whether or not to give the user the option to do so.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
Any bot that has a safe spot to stop should implement an interface, Shutdownable, with the an abstract (or possibly a default) method, #canShutdown, returning a boolean when it is safe to shutdown.

The client could detect upon compilation or something whether or not a bot's main class implements Shutdownable, and thus whether or not to give the user the option to do so.
If I had to implement it today, this is almost exactly how I would do it. That being said, this involves having a global setting and interface for a feature no bots currently can use and very few ever will most likely (because devs can be quite lazy).
 
Joined
Jan 1, 2015
Messages
272
Any bot that has a safe spot to stop should implement an interface, Shutdownable, with the an abstract (or possibly a default) method, #canShutdown, returning a boolean when it is safe to shutdown.

The client could detect upon compilation or something whether or not a bot's main class implements Shutdownable, and thus whether or not to give the user the option to do so.


Yea i was thinking along the same sort lines, and it would be up to the Scripter/ what type script it is weather to call this
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,770
If I had to implement it today, this is almost exactly how I would do it. That being said, this involves having a global setting and interface for a feature no bots currently can use and very few ever will most likely (because devs can be quite lazy).
I'd implement this in my scripts ;)
 
Top