LOGOUT_SHUTDOWN function

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

LOGOUT_SHUTDOWN function

#1 Post by Ego95 » Thu Aug 16, 2012 5:44 pm

Hi,
since a few days I try to get the computer shutdown function of the bot working. It looks like this in my profile:

Code: Select all

	<!-- Log out and resurrect settings -->
		<option name="LOGOUT_TIME" 			value="X" />			<!-- in minutes, 0 = timer disabled -->
		<option name="LOGOUT_SHUTDOWN"		value="true" />
		<option name="LOGOUT_WHEN_STUCK"	value="true" />
		<option name="CLOSE_WHEN_STUCK"		value="false" />
		<option name="RES_AFTER_DEATH" 		value="true" />
		<option name="MAX_DEATHS" 			value="10" /> 			<!-- Log out after this many deaths -->
As X I set a specific period in minutes. So normally it should logout/close runes of magic and then shutdown my computer. I've tried it often and the last days I tried it with a value of 1-5 so I don't have to wait long to see if it works. Sometimes it logs out, sometimes not. Sometimes he logs out with a message like "auto-logout: value of 4 is bigger than the logout-time value of 1". I don't understand why he logs out 3 minutes too late. And he never shuts down my computer.
What could be the reason why he can't shutdown or logout?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: LOGOUT_SHUTDOWN function

#2 Post by rock5 » Fri Aug 17, 2012 12:15 am

AlterEgo95 wrote:Sometimes he logs out with a message like "auto-logout: value of 4 is bigger than the logout-time value of 1". I don't understand why he logs out 3 minutes too late.
Do you mean?

Code: Select all

Elapsed time 4 greater then scheduled time 1. We will logout.
That's the normal message you get when it logs out. As to why it is 3 minutes late, I'm not sure. I expect it could be a bit late if doing something else such as moving to a waypoint or fighting but 3 minutes is excessive. Maybe you have a loop in you code somewhere that takes a long time to complete.

You said
AlterEgo95 wrote:Sometimes he logs out with a message
tells me that when it doesn't log out you don't get a message. Is that right? Maybe it's getting stuck in that 3 minute loop. What is your character usually doing when you want it to log off?

As to why it doesn't shut down the computer maybe the shutdown command doesn't work or maybe it's a permission problem. Do you have administrative access to your computer? Have you tried starting micromacro with administrator access?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: LOGOUT_SHUTDOWN function

#3 Post by Ego95 » Fri Aug 17, 2012 6:44 am

Code: Select all

Elapsed time 4 greater then scheduled time 1. We will logout.
Yes this is the message.
tells me that when it doesn't log out you don't get a message. Is that right? Maybe it's getting stuck in that 3 minute loop. What is your character usually doing when you want it to log off?
I expect it could be a bit late if doing something else such as moving to a waypoint or fighting but 3 minutes is excessive. Maybe you have a loop in you code somewhere that takes a long time to complete.
I've got the adminstrative access to my computer. I think this could be, I usually need the logout shutdown function when I farm the first boss in DoD or when I do public event quests in the new zone. When I use the bot for public events he checks every second for the event start. So I think it's because of the loop. I've tried it in DoD and it logged out successfully. Then the only problems are to get the logout working while I do public events and then finally shutdown my computer.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: LOGOUT_SHUTDOWN function

#4 Post by rock5 » Fri Aug 17, 2012 7:10 am

All you have to do is make sure the bot gets control at some point. If the bot goes to a waypoint then it will have control when doing so.

Or if you like, you can check for logout in your loops. Just add

Code: Select all

player:logoutCheck()
and if it runs out of time it will log out.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: LOGOUT_SHUTDOWN function

#5 Post by Ego95 » Fri Aug 17, 2012 3:04 pm

Ok, I've added it to the loop and it works fine now :)
The only problem is the shutdown function. Maybe it's broken? Or are there any reasons why it doesn't work?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: LOGOUT_SHUTDOWN function

#6 Post by rock5 » Fri Aug 17, 2012 10:45 pm

Firstly, do you get the message that it is shutting down the system?

Code: Select all

Shutting system down.
If so then that would confirm that it is a problem with the shutdown command.

I tested it out from the commandline and it worked. Maybe you should test it out on your system.

Start the commandline waypoint and type this.

Code: Select all

os.execute("\"%windir%\\system32\\shutdown.exe -s -t 30\" ")
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Ego95
Posts: 564
Joined: Tue Feb 28, 2012 12:38 pm
Contact:

Re: LOGOUT_SHUTDOWN function

#7 Post by Ego95 » Wed Aug 22, 2012 8:49 am

Um, I don't get it working with the bot itself. But while I searched for a programm to do this I found one. I don't know if it only works with windows 7, but here it is. Problem is solved.
Attachments
Win7-Shutdown-Timer.rar
(96.61 KiB) Downloaded 91 times

_hirondelle
Posts: 72
Joined: Thu Mar 08, 2012 7:22 am

Re: LOGOUT_SHUTDOWN function

#8 Post by _hirondelle » Thu Aug 23, 2012 5:23 pm

Why download a program ?

Just type [windows]+[R], "cmd"
and : shutdown /f /s /t [TimeInSecond]

It's what I do every evening... And what I've just do at the moment.

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests