Floor Diving after loading a second wp

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Floor Diving after loading a second wp

#1 Post by beanybabe » Fri Jul 03, 2015 5:29 am

I think there is a bug some where in the load wp.

I have a wp that works perfectly 95 percent of the time.

When I call this wp from another wp the character will be stuck in the floor almost every time. It will not see the npc and other crazy stuff.

I have tried player:update waitforloadscreen and other stuff both before and after launching the second wp.

Anyone have idea how to fix this. I hate to have to rip the second wp and make into a onload script that be to hard for me.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Floor Diving after loading a second wp

#2 Post by BlubBlab » Fri Jul 03, 2015 6:05 am

I think the bot tries to go to another waypoint than WP 1 I had this kind of stuff very often back in the days.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Floor Diving after loading a second wp

#3 Post by beanybabe » Fri Jul 03, 2015 8:44 am

This may be what caused it.. I was entering a mini game then calling the new wp. The first line of new wp had player:update after removing that the problem seems to have stopped.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Floor Diving after loading a second wp

#4 Post by BlubBlab » Sat Jul 04, 2015 1:31 am

What you also must think of is that code lines after loadPaths will be still be executed in the block(WP or onload),so either but it at then of your code block or write:

Code: Select all

return loadPaths(")
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Floor Diving after loading a second wp

#5 Post by beanybabe » Sat Jul 04, 2015 3:12 am

the code is pretty strait though and just runs in a loop it works no matter were you start at.
I think the problem is in memory. I managed to get it to work several times. Need to work on money
and mail handling then let it process few chars and see how stable it is.

onload
if this and that
travel to
end

if this not that
loadpath"xxx"
end

if this
travel to
end
/onload

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Floor Diving after loading a second wp

#6 Post by BlubBlab » Sat Jul 04, 2015 3:38 am

Your:
if this
travel to
end
will be executed after the new wp is loaded .

In the earlier days I think it was so that the onload part was also executed immediately this isn't the case anymore so far I know.
The thought error which a lot of people make is that the onload function stops after the new WP is loaded because we have a new onload function this isn't the case.

There is no way a function can overwrite and stops the its calling function, so it is saver either but it on the end of the block or return it out.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Floor Diving after loading a second wp

#7 Post by rock5 » Sat Jul 04, 2015 12:57 pm

What BlubBlab said is true and also applies to the code in waypoints. If there is any change of the code after a loadPaths being executed it's best to play it safe and follow it with a "return".

Note: if you do a travelTo in the onload remember that the bot automatically finds the nearest waypoint to start from when the waypoint file is loaded, before the onload runs. So once the travelTo has completed the previously found waypoint might be wrong so you might need to set it. Eg.

Code: Select all

__WPL.setWaypointIndex(__WPL:getNearestWaypoint())
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Floor Diving after loading a second wp

#8 Post by beanybabe » Sun Jul 05, 2015 2:15 am

Ill need to study that some. I seem to make sence to me. It always bugged me to just pop out of a function with out a return.

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Floor Diving after loading a second wp

#9 Post by beanybabe » Tue Jul 14, 2015 11:00 am

I got it working finally some day i may figure way to have it recover on crash. I still notice that the check for honor fails some times.

Here is a new one for me when interactacting with some slow apearing npcs and some times it see them other times it skips them. I added a yrest(7000) to start of wp and near the slow npcs that seemed to fix that problem.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests