Page 1 of 1
RomBot open and close the Gamemenu after Macrotest
Posted: Wed Jul 18, 2012 10:40 pm
by blackpanzer
Hi, I have a problem with my RomBot.
When I start RomBot, he stuck after Macrotest.
He open/close the Gamemenu again and again.
The Version of RomBot is 3.29 Rev.726
please help me
(sry for my bad english)
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Wed Jul 18, 2012 10:48 pm
by lisa
try removing all addons except ingamefunctions
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Wed Jul 18, 2012 11:05 pm
by blackpanzer
diddn´t work, all addons removed except ingamefunctions
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 12:19 am
by lisa
can you start bot with
I doubt it but you never know
If you can then copy/paste this and see what it prints
Code: Select all
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then print("has 0") else print("not 0") end
if you can't get the commandline up then try using this file and see what it prints.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 12:57 am
by blackpanzer
First part can´t do, it´s the same with gamemenu.
the "functions.lua" to \ micro macro \ scripts \ rom?
i create a batch file with:
Code: Select all
@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/functions.lua"
is it right?
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 1:11 am
by lisa
just save the file to the micromacro/scripts/rom folder
and then try using bot, it will still do the same thing but it will do prints on the MM window.
You can always just do SVN revert later to go back to original file.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 1:16 am
by blackpanzer
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 1:39 am
by rock5
That means the editbox flag is not getting cleared.
Try pressing ENTER in game to open the chat box then press ESC to close it again. Do you have any problems doing that? Then try Lisas test again and see if it prints anything different.
Also have you tried running "rom/update"?
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 1:49 am
by blackpanzer
rom/update I've made
your proposal with the chat
Lisas test print the same:
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 2:21 am
by rock5
You did a "rom/update" so that should mean that the address 0xA315DC is correct for your version of the client. It matches the current value in 726 so that should mean you do have the current client.
Pressing ENTER then pressing ESC should 100% of the time clear the editbox flag so it no longer equals 0. So I am at a loss as to why it still equals 0. The only thing I can think of is problems with addons but you said you removed them.
The thing is, for it to be pressing ESC, it would have to mean it is failing to execute RoMScripts in the time allowed, so there is a problem with macros too. So I thought of something else. Maybe you have a corrupt macro.bsd file. Does this problem happen with only this character or with all of them? If only this character then try shutting down the game and deleting "Documents/Runes of Magic/<Char Name>/macro.bsd". You might want to back it up if you have custom macros you don't want to loose. Then try again.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 3:14 am
by lisa
If rock's suguestion doesn't help do this.
When you are in game press "enter" key to start the text box and then press the "escape" key and tell me if the edit box closes or not.
If it isn't a macro issue it might be a key binding issue.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 7:07 am
by Mer-Ki-Vah
I have five PCs, of which one is doing it. Flashes on the menu.
Solution: 723 version + put in 727 addres.lua .
I hope I helped.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 7:30 am
by lisa
Only real difference I see between the 2 versions of the functions.lua is this.
rev.723
functions.lua
line 592
function RoMScript(script, default)
rev.727
functions.lua
line 599
function RoMScript(script)
I don't see the second arg used anywhere in the function though.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 8:44 am
by rock5
lisa wrote:I don't see the second arg used anywhere in the function though.
That's why I removed it.
But at least this gives us a clue. I had a look at all the differences between 723 and 727 and I think I found the problem. As soon as I saw it I thought, "this has to be it" and it was added in 724. Although to tell you the truth I'm still not sure why it's causing a problem.
In 724 I added some code to clear the editbox flag every time the player address changed. So when the address changed it does this code.
Code: Select all
-- Reset editbox false flag on start up
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then
RoMScript("GetKeyboardFocus():ClearFocus()")
end
Maybe under a certain circumstances the macro isn't set up yet so it doesn't work. Nope, RoMScript doesn't execute if the macros are not set up.
Can one of you guys with the problem update to 727 and try deleting those lines? You'll find them in
player.lua line 55-58. At least if it works we can confirm thats the problem.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 9:05 am
by blackpanzer
Rock5 you're the best!
the change in the player.lua helped
I'd like also to thank Lisa for the quick help.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Thu Jul 19, 2012 10:28 am
by rock5
blackpanzer wrote:Rock5 you're the best!
the change in the player.lua helped
I'd like also to thank Lisa for the quick help.
That's great. Now to figure out why it's causing a problem.
This is really a confusing problem but I've made these conclusions.
- 1. If it only has a problem with that RoMScript but no other, maybe the problem is with that command "GetKeyboardFocus():ClearFocus()".
2. If there is a problem with that command, that might explain why it fails to complete within the 800ms.
3. If there is a problem with that command, that would explain why it fails to clear the editbox flag.
So it all seems to point to this function. Could you try this.
- 1. Restart the game so the editbox flag defaults to the wrong value of '0'. Make sure you don't press enter and open the edit box. If you do, restart the game again.
2. Start the Commandline waypoint file or just double click StartCommandLine.bat in your rom folder.
3. Type
Code: Select all
print(memoryReadUInt(getProc(), addresses.editBoxHasFocus_address))
4. Type
Code: Select all
RoMScript("GetKeyboardFocus():ClearFocus()")
- At this point you might get the system menu problem or you might not.
5. Have a look in game to see if you got any errors. If you got errors you should see a flashing button near the minimap. Click it and it should open a frame and you should be able to see the error or errors. See if there is anything about the GetKeyboardFocus command.
5. Type
Code: Select all
print(memoryReadUInt(getProc(), addresses.editBoxHasFocus_address))
- again and see if it still shows 0 or has changed.
Re: RomBot open and close the Gamemenu after Macrotest
Posted: Sat Jul 28, 2012 8:42 am
by Niko
(sorry if i write something wrong, i don't have a very good english)
Let's see, i have the same problem that gamemenu flashes all over again, i tried deleting those lines you said in player.lua... rombot printed this:
scripts\rom/bot.lua:34: .../player.lua:1: unexpected symbol near '´'
... i just put an old player.lua into classes folder and rombot started good, moving from a waypoint to another, selecting target but doesn't attack!
(i tried with a lv2 character trying to kill Fungus just to test rombot)
to sum up: if i use all old files of rombot, it doesn't work... with all the updated files i get the gamemenu all the time, and only with old player.lua, doesn't attacks (at leats yellow mobs)
... i also checked this -->
http://www.solarstrike.net/phpBB3/viewt ... 3&start=20
but i'm not sure of what i have to do with--> ""It's because you are using a script or batch file to start the bot that includes the 'update' command. Either remove the 'update' from your batch file or use rom/bot to start the bot""
i use rom/bot to start the bot but i don't know how to remove the update from (what?) batch file...
... sorry for the long post, thank's!