Page 2 of 2
Re: Macro problems (I think)
Posted: Mon Sep 17, 2012 6:43 am
by Hetrix
My computer is a bit old. Pentium(R) 4, CPU 3.00 GHz, 2,00 GB RAM. As for the ping, 15-16 ms (most I had was 31/32 ms). And yes, I use english language in gameclient and MM. The file you attached, I got one in scripts/rom/cache already.
The CPU should not be the problem I hope, because I ran 4 clients in the golden eggs days.
Also a weird thing I'm getting. I am getting error message when Im closing the MM with CTRL + C. The error message is: 0x1003e66e refered to memory on "0x00d0c6e8". The memory could not be "read" ".
/H
Re: Macro problems (I think)
Posted: Mon Sep 17, 2012 9:52 am
by rock5
The PC is a bit on the old side but that doesn't matter. If you have that fil, then it created it, as it doesn't come with the bot. If you want to double check it you can delete it and start the bot. I should recreate it.
At least that narrows it down, after itemtypestable creation and before file list. I'll have another look
Hm.. Can't find any RoMScript or function that might use one. I'm running out of ideas.
BTW the ping is excellent.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 9:16 am
by Hetrix
I tried that now aswell. I removed those and I saw that it recreated them but the MM started and ended up as usuall, Esc menu poping up.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 10:20 am
by rock5
I'm running out of ideas. Here is a copy of functions.lua that prints some debug messages. Overwrite your version and start the bot. It should print extra messages. As soon as the system menu starts popping up, it should stop. Copy and paste the output here. Maybe it will shed some light. If you need to know how to copy and paste from the mm window check out my signature. Make sure you edit out your profile name if it appears.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 12:49 pm
by Hetrix
Here is the message from ur functions.lua.
Code: Select all
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingam
efunctions' by copying the 'ingamefunctions' folder from 'rom/devtools' to the g
ames 'interface/addons' folder.
1234;ChatFrame1:AddMessage("MACRO test: send value 1234 to macro place 2");
MACRO Test: ok
xxxx; ChatFrame1:AddMessage("MACRO test: successful");
GetLanguage();
IGF_INSTALLED
Ranged skill found: SCOUT_SHOT
GetKeyboardFocus():ClearFocus()
RoMScript took more than 800ms
editbox flag == 0. Pressing ESC.
GameMenuFrame:IsVisible()
System menu is visible. Pressing ESC again to clear.
Did not find any crashed game clients.
7:45pm - D:/micromacro/scripts/rom/functions.lua:686: System menu detected. Stop
ping.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 1:25 pm
by rock5
Hm... ok so it takes longer than 800ms. But other RoMScript commands work, so I don't think it's just taking too long. It's almost as if the command hung because of an error. RoMScript does that at the moment. If you make certain types of errors in a RoMScript command then it doesn't return a value so the bot stalls. The next version will have a fix for that. But the problem is there is nothing wrong with the command "GetKeyboardFocus():ClearFocus()". I'm wondering though if maybe on your server they might have disabled it somehow, maybe as an anti botting feature.
Type this a couple of times in the game chat and see if you get an error in the error dialog. That's the little red flashing icon that appears near the minimap when it detects errors.
Code: Select all
/script GetKeyboardFocus():ClearFocus()
Also the editbox flag was 0. I suspect it's just because you hadn't opened an edit box since starting the game (it's a known bug). Just to be sure, press ENTER to open the chat then close it again then try starting the bot again. I don't think that is it but just to be sure.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 1:49 pm
by Hetrix
I did all that and its still poping up the Esc menu. And I tried the script in chat. No errors.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 1:56 pm
by rock5
Ok, I got something. Tried
Code: Select all
RoMScript("GetKeyboardFocus():ClearFocus()")
and it didn't work. Turns out if nothing has focus then GetKeybordFocus() returns nil and you get a "attempt to index a nil value" error and the bot hangs just like I was telling you about. I'm not sure why it doesn't error for me when I first start the bot and it does that command. It might be because the game doesn't error the first time you enter a command wrong. That's why you have to enter a command twice before you get the red flashing error icon.
Anyway I have a solution for you to try. Just change
Code: Select all
RoMScript("GetKeyboardFocus():ClearFocus()")
to
Code: Select all
RoMScript("} a = GetKeyboardFocus(); if a then a:ClearFocus() end a={")
That appears in 2 places; in functions.lua at around line 684 and player.lua around line 57. Actually I'll probably remove the one in player.lua because I added it because I was having all these issues with the system menu. If this fixes it then it probably wont be needed there anymore. *crosses fingers*
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 2:36 pm
by Hetrix
I replaced the line in functions.lua but couldnt find the player.lua file. And the Esc menu still pops up as usuall.

Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 2:51 pm
by rock5
player.lua is in the classes folder.
Re: Macro problems (I think)
Posted: Tue Sep 18, 2012 4:00 pm
by Hetrix
I changed it. With some testing both in running a old waypoint and creating a new waypoint with createpath.lua I'm happy to announce that it actually works. I cant descrite in words how many thanks there is to rock. I will do some more tests during longer intervalls and let you know how it goes. Once again, rock thank you alot.
/H
Re: Macro problems (I think)
Posted: Wed Sep 19, 2012 2:27 am
by rock5
Thanks to you too. This has been an ongoing problem that I've never been able to solve. Now with your patience and perseverance (and mine

) we've solved it for everyone.
Re: Macro problems (I think)
Posted: Wed Sep 19, 2012 4:08 pm
by Hetrix
Tested for several hours now, working great.
/H