1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,429
    Likes Received:
    252
    Scripters can easily implement thuis with a GUI
     
  4. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    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 Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
  6. red

    red

    Joined:
    Nov 17, 2013
    Messages:
    259
    Likes Received:
    111
    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:
    445
    Likes Received:
    122
    But its not up to you faggit. /wrists
     
  8. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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:
    272
    Likes Received:
    26

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

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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,429
    Likes Received:
    252
    P
    Perhaps basing that onFinish() on developer scripted booleans like....

    Time has past, not in combat etc
     
  12. PhaseCoder

    Joined:
    Jan 1, 2015
    Messages:
    272
    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 Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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:
    79
    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,937
    Likes Received:
    1,266
    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:
    272
    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 Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
    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...