Page 9 of 20

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Wed Nov 14, 2012 10:57 am
by nightclaw
rock5 wrote:
nightclaw wrote:i still geting taht error i posted up above ...and seams be only with rogue/scout so far not sure if its do me runing muti boxes or what...
What line number does it say now? And can you confirm exactly what you have on that line.

To test if it's because you're multiboxing is easy. Just run 1 box and see if it still happens.
still says skill 740 but now i geting a new error on my warden when i am doing a wonder

bot.lua 893 :setwaypointindex() requires a number received nil

its wondering so there is no waypoint lol

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Wed Nov 14, 2012 11:52 am
by rock5
I had an idea about the 740 error but I can't understand how the line number can still be 740. Have you upgraded to the RC1 version? Line 740 is

Code: Select all

	return 0
Did you revert to an older version? Did you edit the file? This is why I also asked you to confirm what is on that line.

The 893 error has something to do with being pulled back. Do you think you were pulled back? I'll have to see if I can reproduce it before fixing it but I suspect it's because the function I added to waypointlist.lua doesn't exist in waypointlist_wander.lua.

Edit: I thought if I upped the speed I could cause the 893 error but it's not working. Do you have any suggestions on how I might duplicate the error?

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Wed Nov 14, 2012 8:14 pm
by vo2male
Hello Rock and Everyone on this thread!

Excuse my ignorance.. I am also interested in testing this out but how can i use this? Should i put the RC1 folder inside my /micromacro/scripts folder together with the rom folder? Or should i just copy the contents of the RC1 folder to my /micromacro/scripts/rom folder?

Thanks in advance!

P.S.
i tried both but it didn't work out.. seems like i missed something :<

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Wed Nov 14, 2012 8:19 pm
by lisa
extract it to be like this

/micromacro/scripts/RC1

then on MM use

rc1/bot instead of rom/bot

you will need to copy over any userfunctions, waypoints, profiles to use with the new folder.

You will also need to copy the devtools contents to your runes of magic folder as they have new code.

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Wed Nov 14, 2012 8:52 pm
by vo2male
lisa wrote:extract it to be like this

/micromacro/scripts/RC1

then on MM use

rc1/bot instead of rom/bot

you will need to copy over any userfunctions, waypoints, profiles to use with the new folder.

You will also need to copy the devtools contents to your runes of magic folder as they have new code.

I understand now.. thanks for the quick reply Lisa ^_^
So does it mean it is ok if i have RC1 and rom folder inside the /micromacro/scripts folder?

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Wed Nov 14, 2012 9:09 pm
by lisa
vo2male wrote:So does it mean it is ok if i have RC1 and rom folder inside the /micromacro/scripts folder?
I usually have half a dozen folders in the scripts folder at any given time

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 2:58 am
by lisa
I see you now do movements with changing memory now, it is a good idea to stop the movement when bot errors/pauses/exits

Code: Select all

atError(function(script, line, message)
--print('error', "%s:%d\t%s", script, line, message);
--change mem to stop movement here
end);

atPause(function()
--change mem to stop movement here
end);

atExit(function()
--change mem to stop movement here
end);
This is from the GW2 bot =)

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 4:36 am
by vo2male
Tried to do the steps you wrote Lisa but failed.
It was late when i realized the OP that it only works on version 5.0.1 and above :cry:
My rom version is 5.0.0 :D
So i guess ill have to wait until our server patched to 5.0.1

Thanks!

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 5:05 am
by rock5
lisa wrote:I see you now do movements with changing memory now, it is a good idea to stop the movement when bot errors/pauses/exits
Are you noticing some different behavior? It does movement from memory by hooking into the keyboard pressing functions. So whatever it used to do, to stop on errors, should still work, just done differently. The only exception is when it attacks something, eg. the timed attack, when it loots, etc. because they don't change the moveforward memory value. But it should stop when it reaches the targeted object anyway.

Looking at those functions I see pauseCallback and exitCallback both use "releaseKeys()". That should still work. errorCallback doesn't, though. I guess I could add it. If it doesn't find a crashed client then it does a releaseKeys().

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 5:14 am
by lisa
had it a few times where I have seen it running off into the distance, pretty sure a few times I had hit pause on MM, most were when errored or DC'ed
Also when you log back in even after being logged out (DC'ed) it runs forward until you hit forward key.

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 5:36 am
by rock5
The only time pause wont stop is when the settings haven't been loaded yet because the hotkeys wont have been loaded yet. I can't see how that could happen unless the bot hasn't fully started yet. I guess I could change releaseKeys() to stop regardless of whether settings has been loaded or not but it probably wont make much difference. I could do it anyway as it would make it simpler.

It's understandable that it's mostly when it errors that it happens. Like I said, it doesn't do a releaseKeys().

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 5:54 am
by lisa
I'll try to remember exactly when it happens if it happens again, was never at start up. 1 time it was trying to get to a sigil and was running into a wall, I hit pause then turned it and it just kept running until I hit forward.

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 7:07 am
by rock5
This is what I ended up doing.

Code: Select all

-- Used in pause/exit callbacks. Just releases movement keys.
local function releaseKeys()
	memoryWriteBytePtr(getProc(),addresses.staticbase_char ,addresses.moveKeysPressed_offset, 0 )
end

function pauseCallback()
	local msg = sprintf(language[46], getKeyName(getStartKey()));	--  to continue, (CTRL+L) exit ...

	releaseKeys();
	printf(msg);
end
atPause(pauseCallback);

function exitCallback()
	releaseKeys();
end
atExit(exitCallback);

function errorCallback(script, line, message)
	local crashwin = findWindow("Crash Report", "#32770");

	if( crashwin ~= 0 and crashwin ~= nil ) then
		-- Looks like the paired game client crashed. Kill it off and exit.
		local pid = findProcessByWindow(crashwin);
		os.execute("TASKKILL /PID " .. pid .. " /F");

		warning(script .. ":" .. line .. ": " .. message);

		printf("Found a crashed game client and killed it. (PID %d)\n", pid);
		printf("This instance of MicroMacro will automatically terminate in 30 seconds.\n");
		printf("Press ENTER to end the script and prevent termination.\n");

		local starttime = os.time();
		while( os.time() - starttime < 30 ) do
			yrest(10);

			if( keyPressed(key.VK_ENTER) or keyPressed(key.VK_ESCAPE) ) then
				return;
			end
		end

		-- Terminate this copy of MicroMacro.
		os.exit();
	else
		releaseKeys();

		printf("Did not find any crashed game clients.\n");
	end
end
atError(errorCallback);

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 7:23 am
by Jamnyk
Hi. (I'm from Europe, my English is not too good :/)
How to fix it ? my rom is 5.0.4 version (rom/update can't help :/)

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 8:43 am
by botje

Code: Select all

Fight finished. Killed 5 l¾º;. (fight #19 / runtime 5 minutes)
Clearing target.
Moving to waypoint #11, (-1779, -9606)
Stopping waypoint: Target acquired before moving.
nice name for a wolf cub xd

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 11:35 am
by nightclaw
rock5 wrote:I had an idea about the 740 error but I can't understand how the line number can still be 740. Have you upgraded to the RC1 version? Line 740 is

Code: Select all

	return 0
Did you revert to an older version? Did you edit the file? This is why I also asked you to confirm what is on that line.

The 893 error has something to do with being pulled back. Do you think you were pulled back? I'll have to see if I can reproduce it before fixing it but I suspect it's because the function I added to waypointlist.lua doesn't exist in waypointlist_wander.lua.

Edit: I thought if I upped the speed I could cause the 893 error but it's not working. Do you have any suggestions on how I might duplicate the error?
no when you gave out rc1 i deleted all but the profiles/waypoints and placed it in and then put them to back..

on the 893 >>>ya i can most time in wonder it do it with in 12 hours but i never got see it most time it does it when i am sleeping .:/ all i do is go to redhills by the bulls and get to where theres nothing but them get in mid them and hit 0 and go bed when i wake up i have the error not sure how or why ...but if i make a path i have nps but i like the wonder do it looks way more real

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 11:40 am
by nightclaw
lisa wrote:had it a few times where I have seen it running off into the distance, pretty sure a few times I had hit pause on MM, most were when errored or DC'ed
Also when you log back in even after being logged out (DC'ed) it runs forward until you hit forward key.
i have that to when i get errors i have get bot going again get it to stop sometimes

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 11:43 am
by Romplayer
I'm not sure if someone already mentioned this: But RC1 when used the esc key stops functioning and does not bring up the menu

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 12:36 pm
by rock5
nightclaw wrote:no when you gave out rc1 i deleted all but the profiles/waypoints and placed it in and then put them to back..
Hm... You still haven't told me what is on line 740. If you ever tell me what you have on line 740 of skills.lua I'll suggest a fix.
nightclaw wrote:on the 893 >>>ya i can most time in wonder it do it with in 12 hours but i never got see it most time it does it when i am sleeping .:/ all i do is go to redhills by the bulls and get to where theres nothing but them get in mid them and hit 0 and go bed when i wake up i have the error not sure how or why ...but if i make a path i have nps but i like the wonder do it looks way more real
I thought your English was better than that. I can just barely understand. Do you re-read what you write? Try changing the line 892 in bot.lua

Code: Select all

				if reason == WF_PULLBACK then
to

Code: Select all

				if reason == WF_PULLBACK and #__WPL.Waypoints > 2 then

Re: Heads up! Big update comming. Public Release RC1 ready.

Posted: Thu Nov 15, 2012 4:53 pm
by botje
hmm, some strange behaviour all of a sudden o.o

Code: Select all

Moving to waypoint #26, (-18991, -23398)
Error in memory reading: memoryreaduint(proc,0x14)
Error in memory reading: memoryreaduint(proc,0x14)
Error in memory reading: memoryreaduint(proc,0x14)
Stopping waypoint: Target acquired.
Engaging enemy [Plump Hare] in combat.
We begin the fight with ranged pulling.
Moving in | Suggested range: 150 | Distance: 188
Use MACRO: WARRIOR_SURPRISE_ATT=>   Plump Hare (127221/127221)
Ranged pulling finished, mob in melee distance.
Use MACRO: WARRIOR_SLASH       =>   Plump Hare (83813/127221)
that last slash was a good 30 secs ago, now char is just auto hitting, and bot hangs there O.o