Page 1 of 1
Best way to end script when Client deteriorates?
Posted: Tue Feb 05, 2013 11:26 am
by Buster99
We all know the rom Client simply deteriorates after a certain time (for me it is about 22-23 character daily relogs). Character gets to point cant target NPC's, etc. The question is, what is the best way to end the script so the characters aren't running around doing nothing til you can get back to computer.
Example: I am doing dailies with multi-acct and chars.
I can't figure out where in script to put a loop to logout. SHould I try and time the whole script? Should I try and set a timer when daily count number is not changing? Should I try to add code for not being able to target the quest NPC?
Just curious how you all are doing it. Any help appreciated. Any example of your code would greatly help.
Thanks
Re: Best way to end script when Client deteriorates?
Posted: Tue Feb 05, 2013 11:47 am
by rock5
It's probably best not to push it to the limit. I remember when I was doing lots of characters the limit was surprisingly stable. So if you crash around 22-23 characters then only do 20 per client. You can never predict the behaviour of a failing client so it's best to stop beforehand. My limit was about 15. I had 7 alts per account so that worked out well. I would run 2 clients and put 2 accounts through each.
Re: Best way to end script when Client deteriorates?
Posted: Tue Feb 05, 2013 12:51 pm
by Buster99
You are right. Best to just end script early instead of being greedy.
Now I just need to learn how to do batch files. I suppose it is possible to restart client and scripts again from them? Going to read up on that next.
Thanks for quick reply
Update: I have been able to successfully create batch files to start MM and scripts after Client is already manually started. Two questions:
1) How do I execute a batch file inside a script? I am trying to find an example.
2) Is it possible to close game client and THEN still execute the batch file? Example? I have only used logout, sleep, etc. Not sure how to script closing the actual game client.
Thanks in advance
Re: Best way to end script when Client deteriorates?
Posted: Wed Feb 06, 2013 6:38 am
by lisa
Buster99 wrote:Is it possible to close game client
of course
/script QuitGame();
So from bot it would be
Re: Best way to end script when Client deteriorates?
Posted: Wed Feb 06, 2013 10:14 am
by rock5
Of course if the game is non responsive then that might not work. If you want to force shut it down then this might work
Code: Select all
os.execute("TASKKILL /PID " .. getProc().. " /F");
Re: Best way to end script when Client deteriorates?
Posted: Wed Feb 06, 2013 10:25 am
by Buster99
I didnt word my questions very well.
I am trying to work on executing .bat files from MM. But wondering how I would be able to:
Run initial script in MM normally, started manually
Close game client when script is finished
Run .bat file which would execute opening new client, MM, script, etc (automatically without being at computer)
1) Is this possible? If I close the game client from MM that will automatically close MM so how would I then execute my .bat file?
2) Can you execute a file from MM other than loading "scripts"? Example code for doing so?
Re: Best way to end script when Client deteriorates?
Posted: Wed Feb 06, 2013 11:12 am
by rock5
It's a very complex task. I don't know how to do it but people have talked about managing it using programs such as AutoIt.
Re: Best way to end script when Client deteriorates?
Posted: Wed Feb 06, 2013 11:51 am
by Administrator
You can use the system command.
Code: Select all
system("script to run here");
-- OR --
system("whatever.bat");
Re: Best way to end script when Client deteriorates?
Posted: Wed Feb 06, 2013 6:58 pm
by lisa
you could start the game easy enough, issue would be making it log into a specific account and character. The relog function works because you are already in game and you can change the variables using the macro system, that won't work though before being logged in.
No idea if anyone has come up with a solution for it but you could use another programme like autoit and then after it has logged into the game you can start the MM script. I don't see any way to do it without using another programme.
Re: Best way to end script when Client deteriorates?
Posted: Thu Feb 07, 2013 1:07 am
by rock5
As I work on my autologin script for Aion it occurs to me I might be able to do something similar with the bot. I might try it in the future. One of the main draw backs with rom is I'm not sure what different versions of loginxml will have to memory.