Time Controlled Shutdown

Discussion in 'Client & Site Suggestions' started by conraddk, Feb 26, 2015.

  1. conraddk

    Joined:
    Feb 18, 2015
    Messages:
    7
    Likes Received:
    0
    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
     
  2. HitchThoseCocks

    Joined:
    Dec 17, 2014
    Messages:
    256
    Likes Received:
    20
    you run a .bat file with
    shutdown.exe /s /t (time in seconds without parenthesis)
     
  3. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,313
    Likes Received:
    228
    Scripters can easily implement thuis with a GUI
     
  4. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,542
    Likes Received:
    1,058
    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.
     
  5. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,440
    Likes Received:
    702
  6. red

    red

    Joined:
    Nov 17, 2013
    Messages:
    226
    Likes Received:
    100
    If it were me, I would add another method in the script bot class that lets the developer decide what to do when shutdown is imminent. Maybe run away from monster or bank everything, etc...
     
  7. Infinite Inferno

    Infinite Inferno The Pip Collector

    Joined:
    Sep 14, 2014
    Messages:
    434
    Likes Received:
    120
    But its not up to you faggit. /wrists
     
  8. Cloud

    Cloud Just another one...

    Joined:
    Jul 28, 2013
    Messages:
    2,457
    Likes Received:
    831
    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.
     
  9. PhaseCoder

    Joined:
    Jan 1, 2015
    Messages:
    271
    Likes Received:
    26

    Is there no way of killing the process from the task manager maybes? something along them lines?
     
  10. Cloud

    Cloud Just another one...

    Joined:
    Jul 28, 2013
    Messages:
    2,457
    Likes Received:
    831
    Of course we could, but that doesn't fix the problem of the account potentially being in a dangerous situation.
     
  11. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,313
    Likes Received:
    228
    P
    Perhaps basing that onFinish() on developer scripted booleans like....

    Time has past, not in combat etc
     
  12. PhaseCoder

    Joined:
    Jan 1, 2015
    Messages:
    271
    Likes Received:
    26

    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
     
  13. Cloud

    Cloud Just another one...

    Joined:
    Jul 28, 2013
    Messages:
    2,457
    Likes Received:
    831
    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.
     
  14. Philosobyte

    Joined:
    Dec 18, 2014
    Messages:
    398
    Likes Received:
    78
    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.
     
  15. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,542
    Likes Received:
    1,058
    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).
     
    Geashaw likes this.
  16. PhaseCoder

    Joined:
    Jan 1, 2015
    Messages:
    271
    Likes Received:
    26

    Yea i was thinking along the same sort lines, and it would be up to the Scripter/ what type script bot it is weather to call this
     
  17. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,440
    Likes Received:
    702
    I'd implement this in my scripts bots ;)
     
  18. Chris The Dork

    Joined:
    Jan 25, 2015
    Messages:
    66
    Likes Received:
    15
    This is something I feel would be very handy. Especially if you bot away from your keyboard.
     

Share This Page

Loading...