Page 31 of 39
Re: Rock5's Millers Ranch Scripts
Posted: Thu Nov 17, 2011 2:57 pm
by ohos
did some debug and found, that problem in functions.lua at line 650
while( memoryReadByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset) == 6 ) do
this while loop always return true and external until loop never end because tryagain variable never become false
Re: Rock5's Millers Ranch Scripts
Posted: Thu Nov 17, 2011 5:49 pm
by BillDoorNZ
no, all looks fine to me:
Code: Select all
repeat
-- Write the command macro
writeToMacro(commandMacro, text)
-- Write something on the first address, to see when its over written
memoryWriteByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset , 6);
-- Execute it
if( settings.profile.hotkeys.MACRO ) then
keyboardPress(settings.profile.hotkeys.MACRO.key);
end
local tryagain = false
-- A cheap version of a Mutex... wait till it is "released"
-- Use high-res timers to find out when to time-out
local startWaitTime = getTime();
while( memoryReadByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset) == 6 ) do
if( deltaTime(getTime(), startWaitTime) > 800 ) then
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(500)
if RoMScript("GameMenuFrame:IsVisible()") then
-- Clear the game menu and reset editbox focus
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(300)
RoMScript("GetKeyboardFocus():ClearFocus()")
end
end
tryagain = true
break
end;
rest(1);
end
until tryagain == false
in the outer loop it sets tryagqain to false, then only if it goes into the while loop
Code: Select all
while( memoryReadByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset) == 6 ) do
does it set it to true. If that memoryReadByte doesn't return 6, then it doesnt go into the loop and ends the outer loop as a result.
Re: Rock5's Millers Ranch Scripts
Posted: Thu Nov 17, 2011 9:26 pm
by rock5
Do you have "click to move" enabled in the games interface options?
Re: Rock5's Millers Ranch Scripts
Posted: Fri Nov 18, 2011 12:48 pm
by ohos
i did svn update (again), the first problem is:
Code: Select all
-- Terminate this copy of MicroMacro.
os.exit();
else
printf("Did not find any crashed game clients.\n");
end
end
atError(errorCallback);
function resumeCallback()
printf("Resumed.\n");
the bot tell me there is error at line 384 in functions lua - scripts/rom/bot.lua:14: scripts/rom/functions.lua:384: attempt to call global 'atError' <a bil value>
i have "click to move" in settings, J button assigned on "target nearest ally", debug show, that line
while( memoryReadByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset) == 6 )
always true, i don't know why left side always become 6, but during permanent macros testing names of players hide and show every second,
if you have working bot - please add it to archive and attach to your post, i will try it. think i know where problem is:
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(500)
if RoMScript("GameMenuFrame:IsVisible()") then
hotkey seems don't work, because no menu appears, but when i press it manually menu appears
Re: Rock5's Millers Ranch Scripts
Posted: Fri Nov 18, 2011 2:29 pm
by ohos
ingame functions addon seems don't have resultMacro variable, is it intended? o_O i think this required by
while( memoryReadByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset) == 6 ) do
in functions.lua
Re: Rock5's Millers Ranch Scripts
Posted: Fri Nov 18, 2011 2:38 pm
by ohos
after updating ingamefunctions and just adding debug messages into ingamefunctions.lua bot started working, i think problem was with file encode and game couldn't read it xD
but now i have another problem - elf bot doesn't take quest, doesn't target blinsik... what wrong?
solved - bot used russian lang and couldn't find Blinsik
![Wink ;)](./images/smilies/icon_e_wink.gif)
Re: Rock5's Millers Ranch Scripts
Posted: Sat Nov 19, 2011 10:16 am
by Dropzz
Everytime I start the Rombot I just get to the point where it is testing the 'ingamefunction' macro.
It does nothing. It just sits there and never moves.
I have deleted macros and had them remade. I have removed all other macros as well.
Any help would be greatly appreciated.
Re: Rock5's Millers Ranch Scripts
Posted: Sat Nov 19, 2011 11:32 am
by rock5
Dropzz wrote:Everytime I start the Rombot I just get to the point where it is testing the 'ingamefunction' macro.
It does nothing. It just sits there and never moves.
I have deleted macros and had them remade. I have removed all other macros as well.
Any help would be greatly appreciated.
Sure, I can help you. Try doing a search for your problem. Even just searching for 'ingamefunction' will give you an answer.
Re: Rock5's Millers Ranch Scripts
Posted: Tue Dec 06, 2011 8:09 am
by unknownplayer
Hello.
After the update I have anew downloaded all that. Apparently I get always disconnect when I collect the feed bags in Miller Ranch. Has that also happened with you? I think, we must change "adresses.lua".
Re: Rock5's Millers Ranch Scripts
Posted: Tue Dec 06, 2011 8:53 am
by rock5
If the bot needs updating, just be patient. It will be updated. It might take a day or 2 to be 100% fully functional again.
Re: Rock5's Millers Ranch Scripts
Posted: Wed Dec 07, 2011 5:25 am
by gator77
How can i change the script for cahnge touch "W" to "Z" because I play with AZERTY keyboard ?
Re: Rock5's Millers Ranch Scripts
Posted: Wed Dec 07, 2011 7:24 am
by lisa
It should be getting the key settings from the game settings themselves.
Which look like this
Code: Select all
MOVEFORWARD W UP
MOVEBACKWARD S DOWN
STRAFELEFT A LEFT
STRAFERIGHT D RIGHT
TURNLEFT Q
TURNRIGHT E
JUMP SPACE
SITORSTAND X
TOGGLEAUTORUN INSERT
TOGGLERUN
TOGGLESHEATH Z
If for some reason it isn't working as it should you can change it in
rom/settings.xml
Code: Select all
<hotkey description="MOVE_FORWARD" key="VK_W" modifier="" />
<hotkey description="MOVE_BACKWARD" key="VK_S" modifier="" />
<hotkey description="ROTATE_LEFT" key="VK_Q" modifier="" />
<hotkey description="ROTATE_RIGHT" key="VK_E" modifier="" />
<hotkey description="STRAFF_LEFT" key="VK_A" modifier="" />
<hotkey description="STRAFF_RIGHT" key="VK_D" modifier="" />
<hotkey description="JUMP" key="VK_SPACE" modifier="" />
So change the VK_W to VK_Z
Re: Rock5's Millers Ranch Scripts
Posted: Wed Dec 07, 2011 7:57 am
by rock5
Don't you have to change it in game first using the key bindings interface?
Re: Rock5's Millers Ranch Scripts
Posted: Wed Dec 07, 2011 10:34 am
by kuchen91
hello,
i have a small question on your waypoint...
if you would set the waypoints type to TRAVEL wouldn´t the bot less cpu consument because he wouldn´t look for mobs?
Re: Rock5's Millers Ranch Scripts
Posted: Wed Dec 07, 2011 8:51 pm
by rock5
kuchen91 wrote:i have a small question on your waypoint...
if you would set the waypoints type to TRAVEL wouldn´t the bot less cpu consument because he wouldn´t look for mobs?
That's a very good point. I think, though, in this case, it would make very little difference.
One of the very first things it checks when looking for mobs is whether objects are attackable. There are no attackable objects in Miller's. Also, there are not very many objects, so the search is
very fast.
If it makes any difference, it would probably only be noticable to people who are pushing the limits when running this script. If any one like this wants to try setting it to "TRAVEL" and it helps them they can let me know here and I'll make the change and upload it. Otherwise I'll add the change to any future version I release, as it doesn't hurt to do it.
Re: Rock5's Millers Ranch Scripts
Posted: Wed Dec 07, 2011 9:00 pm
by lisa
I set mine to travel ages ago, never really noticed any difference in performance.
I don't do millers any more though.
Re: Rock5's Millers Ranch Scripts
Posted: Thu Dec 08, 2011 12:54 am
by kuripot
and also teleport... i can only run in my old pc 4 client smoothly without teleport,,, but when i use teleport..i can run 6 client
Re: Rock5's Millers Ranch Scripts
Posted: Thu Dec 08, 2011 2:03 am
by gator77
Thx Lisa and rock5 it's work !
Re: Rock5's Millers Ranch Scripts
Posted: Fri Dec 16, 2011 2:40 pm
by dancerinthedark
Hello,
I have small problem with my golden egg bot- it doesn't run fast anymore. It used to run fast just by starting the script. I have swimhack/speedhack instaled. What could be the problem?
Thanks in forward, dd
Re: Rock5's Millers Ranch Scripts
Posted: Fri Dec 16, 2011 9:00 pm
by rock5
I think the default used to be to run fast but I changed it to run normal by default. If you want it to run fast, change
to somthing higher.