Another problem since RC3

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Another problem since RC3

#1 Post by Jandrana »

I'm using a modified version of the KS_killzone script. It works perfectly with the new bot release with my M/P. It also worked with my S/R before the RC3, but now I'm having a strange effect.

This is the code for entering KS.

Code: Select all

	<!-- # 21 --><waypoint x="-18560" z="12451" y="-778" type="TRAVEL">
		if player.Class1 == CLASS_PRIEST or player.Class2 == CLASS_PRIEST then
			player:cast("PRIEST_REGENERATE");
		end
	</waypoint>
	<!-- # 22 --><waypoint x="-18564" z="12400" y="-779" type="TRAVEL">
		yrest(500);
		ksLog("Entering instance", LOGLEVEL_INFO);
		while (getZoneId() == 6) do
			GoToPortal(200);
			waitForLoadingScreen(30);
		end
		player:update();
	</waypoint>
	<!-- #  23 --><waypoint x="4715" z="824" y="680" type="TRAVEL" tag="ported In">
After entering KS the char does not follow the usual waypoints but is running pretty much havoc. Running against the wall, ignoring aggro from mobs, getting stuck somewhere etc. - I made a backup of the bot at revision 739 in a different directory. Running with that bot version everything is fine.

I restarted with a fresh client etc, but this did not help to remove the problem.

I'm asking myself, what could be the reason, if the same script runs fine with a M/P but doesn't with a S/R. What I noticed in the MM window. With my S/R it prints "no more usable healing potions..." just before entering KS. I don't carry any, because my R/S can oneshot everything in KS - the only damage worth noting is while jumping off the cliff on the way from pancer to KS.

Any ideas?

Edit: The problem seems to go away, if I have HP potions in my bag. Huh, what's that?

Edit2: I noticed a similar problem when leaving the instance. The script does this for leaving:

Code: Select all

function KSResetInstance()
	ksLog("Resetting instance", LOGLEVEL_DEBUG);
	KS_runs = KS_runs + 1;
	--don't reset if we are already in DDC
	local zone = getZoneId();
	if (zone ~= 6) then 
		player:clearTarget();
		sendMacro("LeaveParty();");
		waitForLoadingScreen(30); 
		player:update();
	else
...
It seems that if the bot is running while this code is being executed the "running state" is still active after the loading screens is gone, so the char continues running for a while. Sometimes he recovers, but sometimes this may cause problems.

How can I ensure that the char is NOT running when the "waitForLoadScreen()" is being executed?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Another problem since RC3

#2 Post by lisa »

Code: Select all

releaseKeys()
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Another problem since RC3

#3 Post by Jandrana »

thx, lisa

Lets see, if this solves the problem. While running KS with another char (S/P) with version 751 this error appeared:

Code: Select all

Moving to waypoint #23, (-18564, 12400)
No more (usable) hp potions available at bagslot 1 to 240
Use MACRO: PRIEST_URGENT_HEAL  =>   <UNKNOWN> (0/1000)
Use MACRO: PRIEST_REGENERATE   =>   XXXXXX (12222/25501)
Use MACRO: PRIEST_URGENT_HEAL  =>   XXXXXX (12223/25501)
Use MACRO: PRIEST_REGENERATE   =>   XXXXXX (13591/25501)
Use MACRO: PRIEST_URGENT_HEAL  =>   XXXXXX (13591/25501)
Entering instance
Targeting object 112072, range 114.92660138896
Use MACRO: PRIEST_URGENT_HEAL  =>   XXXXXX (14945/25501)
Use MACRO: PRIEST_URGENT_HEAL  =>   XXXXXX (16328/25501)
No more (usable) mana potions available at bagslot 1 to 240
Use MACRO: PRIEST_URGENT_HEAL  =>   XXXXXX (17688/25501)
Use MACRO: PRIEST_URGENT_HEAL  =>   XXXXXX (19074/25501)
Use MACRO: PRIEST_URGENT_HEAL  =>   * Failed to cast *
Did not find any crashed game clients.
6:5pm - D:/Games/micromacro/scripts/rom/functions.lua:2248: bad argument #1 to '
gmatch' (string expected, got nil)
Another thing which would be nice. I already asked Admin in another topic, how to get a stacktrace. I played around with it, in other situations. It would be pretty nice, if we could the stacktrace in error situations like above.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Another problem since RC3

#4 Post by lisa »

looks to me like it isn't doing the waitforloading screen and it errored because you can't do macros while at loadingscreen, that error is from getTEXT which uses the macro system. I notice it didn't say changed address which it always does after entering an instance.

So maybe you need to look at how you are actually trying to enter the instance.
I use this

Code: Select all

	<!-- # 225 --><waypoint x="-18528" z="12368" tag="enter" type="TRAVEL">
	player:dismount()
	changeProfileOption("QUICK_TURN", false)
	</waypoint>	
	<!-- # 227 --><waypoint x="-18576" z="12498" type="TRAVEL">
	repeat
		waitForLoadingScreen(20);
		if getZoneId() == 6 then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("enter"));
		end
	until getZoneId() ~= 6
	yrest(3000)
	</waypoint>
First waypoint inside KS then needs to turn quickturn back to true.

Code: Select all

	<!-- #  1 --><waypoint x="4714" z="913" type="TRAVEL">	
	changeProfileOption("QUICK_TURN", true)
	changeProfileOption("MAX_TARGET_DIST", 100);	
	changeProfileOption("USE_PHIRIUS_POTION", true);
   </waypoint>
Just had a look at your original code, you use gotoportal and not go through portal

Code: Select all

         GoToPortal(200);
         waitForLoadingScreen(30);
try

Code: Select all

GoThroughPortal(200)
the go through portal function has all the code inside it to deal with the loadingscreen.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Another problem since RC3

#5 Post by Jandrana »

Thx again, lisa.

I changed the script and will try later. Why are you doing the "quick turn" stuff? Looks like some voodoo.

Maybe rock5 or you can say something about the stack trace question.

Update: GoThroughPortal did the trick
Post Reply