Renew <onload> by switching the waypoints

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Renew <onload> by switching the waypoints

#1 Post by gloover » Wed Sep 28, 2011 2:23 pm

Hey guys, hello rock

Now I know, why my bot sucks; all the functions loaded in <onload> </onload> by the first waypoint file will continuing even when I change the WP-file so it make some bad mistakes! For Example in the first WP-file

<onload>
if(player.Level >= 10) then
loadPaths("A")
end
</onload>

the second WP-file

<onload>
if(player.Level >= 10) then
loadPaths("BB")
end
</onload>

so using the second wp-file the bot take the procedure from the first one :-/
How can I clear memory or reload/renew the onload header in each waypoint-file?
thx
Last edited by gloover on Wed Sep 28, 2011 3:51 pm, edited 1 time in total.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Renew <onload> by switching the waypoints

#2 Post by Administrator » Wed Sep 28, 2011 2:44 pm

If this is the case, that sounds like a bug. I think rock5 might have been messing around with something related to this a few weeks back, so I'll wait till he comments on it.

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

Re: Renew <onload> by switching the waypoints

#3 Post by rock5 » Wed Sep 28, 2011 9:54 pm

Pretty much all I did was change the order that the onload sections run. Before it was wp onload then profile onload. Now it's profile onload then wp onload.

I think the example you provided is not very good. What that will do is, when you load the first file and your character is mor than level 10, it will load path "A".

When it loads path "A", because it is still more than level 10, it will load path "BB".

What exectly are you trying to do and what do you expect to happen?

Maybe you should show us your actual file and explain what the problem is.
  • 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

SpiralV
Posts: 72
Joined: Sat Jun 25, 2011 10:37 am
Location: Germany

Re: Renew <onload> by switching the waypoints

#4 Post by SpiralV » Thu Sep 29, 2011 11:56 am

Not easy to follow, but one question wouldn't be easier to load the right file directly?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Renew <onload> by switching the waypoints

#5 Post by lisa » Thu Sep 29, 2011 7:56 pm

gloover wrote:<onload>
if(player.Level >= 10) then
loadPaths("A")
end
</onload>

the second WP-file

<onload>
if(player.Level >= 10) then
loadPaths("BB")
end
</onload>
Ok put simply you have the same code for the if statements for both onload in the WP.
so in first wp it checks player.Level >= 10, then loads next wp and again checks player.Level >= 10 because that is the code in second WP.

So what are you trying to do exactly because the process of what you are doing at the moment is flawed.
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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest