Best way to end script when Client deteriorates?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Best way to end script when Client deteriorates?

#1 Post by Buster99 » Tue Feb 05, 2013 11:26 am

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

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

Re: Best way to end script when Client deteriorates?

#2 Post by rock5 » Tue Feb 05, 2013 11:47 am

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.
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: Best way to end script when Client deteriorates?

#3 Post by Buster99 » Tue Feb 05, 2013 12:51 pm

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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Best way to end script when Client deteriorates?

#4 Post by lisa » Wed Feb 06, 2013 6:38 am

Buster99 wrote:Is it possible to close game client
of course
/script QuitGame();

So from bot it would be

Code: Select all

SlashCommand("QuitGame()")
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Best way to end script when Client deteriorates?

#5 Post by rock5 » Wed Feb 06, 2013 10:14 am

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");
  • 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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: Best way to end script when Client deteriorates?

#6 Post by Buster99 » Wed Feb 06, 2013 10:25 am

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?

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

Re: Best way to end script when Client deteriorates?

#7 Post by rock5 » Wed Feb 06, 2013 11:12 am

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.
  • 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
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Best way to end script when Client deteriorates?

#8 Post by Administrator » Wed Feb 06, 2013 11:51 am

You can use the system command.

Code: Select all

system("script to run here");
-- OR --
system("whatever.bat");

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Best way to end script when Client deteriorates?

#9 Post by lisa » Wed Feb 06, 2013 6:58 pm

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Best way to end script when Client deteriorates?

#10 Post by rock5 » Thu Feb 07, 2013 1:07 am

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.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests