Page 1 of 1

[solved] Running weird after leaving instance

Posted: Fri May 10, 2013 7:28 am
by Rickster
I have the bot crashing in 50% of my chars and not get it to do two chars in a row with the following thing:

I leave the "Arcane chamber of the Sathcur" (not sure if this is the correct name in english).
I am leaving by walking a little further then the blue circle is. Then wait for the loading screen.
This is the code:

Code: Select all

	<!-- #104 --><waypoint x="1445" z="1003" y="42">
		<!-- leave the instance -->
		waitForLoadingScreen(90)
		__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z))
	</waypoint>
The above scheme works fine in all other situation when there is a loading screen.

I modified it like this but the behaviour keeps the same

Code: Select all

	<!-- #104 --><waypoint x="1445" z="1003" y="42">
		<!-- leave the instance -->
		waitForLoadingScreen(90); yrest(10000);
		player:update()
	</waypoint>
After loading has finished, which takes about 15-20 secs, MM crashes with this message, and the char keeps standing where it left the instance.

Code: Select all

Wir gehen zum Wegpunkt #104, (1445, 1003)
Spieleradresse geändert: 0x4347DC00
Keine Fernkampf Fähigkeit im Profil angegeben. Option COMBAT_RANGED_PULL wurde a
usgeschaltet.
Did not find any crashed game clients.
1:41pm - undefined player.Class1 in settings.lua
Which tells us that there was no ranged atack skill found and that COMBAT_RANGED_PULL was disabled.

Why can the player.Class1 not be found?

Or MM repeatedly states to walk to wp #105 which should be the next wp, exact at the position the char appears, after leaving the instance, but runs to a wierd position and direction never used in any wp of the wp file.

The wp in the file are correctly numbered one after the other. 104 is the last one in the instance, 105 is the one the char is positioned after leaving it.

Do you have any ideas, whats happening here and how to avoid it?

Thanx,
Ric

Re: Running weird after leaving instance

Posted: Fri May 10, 2013 8:36 am
by rock5
Out of the 2 codes, the first one is better because it can handle failures to teleport. If it fails to teleport the setWaypointIndex command will make it repeat #104.

I think the reason it is erroring might just be because on some servers there is a couple of seconds after the loading screen disappears that the player memory area isn't fully set up. Try adding a few extra seconds pause after the "waitForLoadinScreen()".

Code: Select all

rest(3000)

Re: Running weird after leaving instance

Posted: Sat May 11, 2013 2:33 am
by Rickster
Thanx Rock!
Ok. I will try it with this and report, whats happening after the next round of chars :)

Code: Select all

	<!-- #104 --><waypoint x="1445" z="1003" y="42">
		<!-- leave the instance -->
		waitForLoadingScreen(90); yrest(10000);
		__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z))
	</waypoint>

Re: Running weird after leaving instance

Posted: Sat May 11, 2013 5:13 am
by Rickster
10 seconds of waiting do not change anything.
The chars ports out, corectly waits for the loading screen, waits the extra 10 secs and then starts to run to wp 105, which usually should be where it stands after porting out of the instance, but runs straight to a direction somewhere else, never reaching wp 105.

I checked the coords of wp 105, its correct.

Now I will try what happens, when waiting for a longer time and I add a "player:update()" after the extra yrest, although I do not exactly know what is updated by a player:update() ;)
All that ends up with this code

Code: Select all

   <!-- #104 --><waypoint x="1445" z="1003" y="42">
      <!-- leave the instance -->
      waitForLoadingScreen(90); yrest(30000);
      player:update()
      __WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z))
   </waypoint>
Ric

Re: Running weird after leaving instance

Posted: Sat May 11, 2013 8:03 am
by rock5
If I was you, I would ignore the waypoint numbers and instead check the coordinates instead. Waypoint numbering is very unreliable. So when it says "Moving to waypoint #105, (xcoord, ycoord)" I would match the x and y coords to the waypoints to be sure which waypoint it is talking about.

Re: Running weird after leaving instance

Posted: Sun May 12, 2013 12:45 pm
by Rickster
With this post I just wanted to report, that with the last changes and waiting 10 secs after the loading screen has finished, everything works fine now, when I read Rock´s hint. I will check that with an old version, to have a look at the wp numbers and choords.

Resolved at this point ;)

Thanks
Ric