Page 2 of 2

Re: MM (bot) starting RoM client and attaching automatically

Posted: Thu Oct 25, 2012 2:48 pm
by Edamh
rock5 wrote:I just tried the following and it worked for me.

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/bot.lua" path:rbassist character:alpha
START ../../micromacro.exe "%folder%/bot.lua" path:rbassist character:beta
START ../../micromacro.exe "%folder%/bot.lua" path:rbassist character:gamma
I can't see how the way you did it differently wouldn't work. Are you sure the character names are spelt correctly? Did you try with fewer at a time? Maybe it can't handle too many at once.
I tried the following with just one character, and I copy-pasted from the profile filename to make sure no character name misspellings. Still no love. I still have to choose from list of active RoM instances.

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/bot.lua" path:rbassist character:Alpha
Here's a screenshot
Image

I also tried just having one instance of RoM loaded, but running the above batch file causes the only RoM instance to crash. I checked, but I don't think I need to update my MM (v1.02) nor RoMBot (v3.29 rev739). Any other ideas?

If nothing else, the batch file saves me some time even if not completely. I just have to take the extra step to select which character as a workaround. Again, thanks.

Re: MM (bot) starting RoM client and attaching automatically

Posted: Thu Oct 25, 2012 3:24 pm
by rock5
This might be caused by a userfunction. Some of my earlier userfunctions that try to find addresses in memory would try to attach to the window too early. I'm pretty sure this is the case because it's supposed to ask for the window after the picture not before. The userfunctions are loaded before the picture though. The userfunctions that used to do this, that I know of, are my QuestLogClass and the wallhack. First remove them to see if it helps then update them to the latest version.

Re: MM (bot) starting RoM client and attaching automatically

Posted: Fri Oct 26, 2012 7:25 am
by Cindy
rock5 wrote:....]Basically the bot needs to be able to execute lua code in game. It uses the macros. Macros aren't available until the game has fully started. So any solution to log in would have to fully start the game before starting the bot proper.
Would you be able to loop the macro check function until it succeeds (with a 5 min timeout perhaps? or maybe a progressively increasing delay between checks... this would in theory handle even a patch download)

Re: MM (bot) starting RoM client and attaching automatically

Posted: Fri Oct 26, 2012 8:54 am
by rock5
What these functions do that is unusual is get their respective addresses by doing a pattern search like what update.lua does. Trying to get the address using the pattern during userfunction loading is what causes this problem. I just fixed it by putting the address search in a function and not calling it until the first time the function is called. So the latest version of these functions shouldn't cause this problem.

Re: MM (bot) starting RoM client and attaching automatically

Posted: Fri Oct 26, 2012 9:22 am
by Edamh
rock5 wrote:This might be caused by a userfunction. Some of my earlier userfunctions that try to find addresses in memory would try to attach to the window too early. I'm pretty sure this is the case because it's supposed to ask for the window after the picture not before. The userfunctions are loaded before the picture though. The userfunctions that used to do this, that I know of, are my QuestLogClass and the wallhack. First remove them to see if it helps then update them to the latest version.
I removed the following old and forgotten files which have not been updated since 2010/2011:
addon_catchcavy.lua
addon_charnameWP.lua
addon_swimhack.lua
IT WORKS! Thank you very much.

Re: MM (bot) starting RoM client and attaching automatically

Posted: Fri Oct 26, 2012 10:39 am
by rock5
Well swim hack and catchcavy never have pattern searching and are just functions that don't do anything when loaded so it must be charnameWP whatever that is.