Page 1 of 1

Renew <onload> by switching the waypoints

Posted: Wed Sep 28, 2011 2:23 pm
by gloover
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

Re: Renew <onload> by switching the waypoints

Posted: Wed Sep 28, 2011 2:44 pm
by Administrator
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.

Re: Renew <onload> by switching the waypoints

Posted: Wed Sep 28, 2011 9:54 pm
by rock5
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.

Re: Renew <onload> by switching the waypoints

Posted: Thu Sep 29, 2011 11:56 am
by SpiralV
Not easy to follow, but one question wouldn't be easier to load the right file directly?

Re: Renew <onload> by switching the waypoints

Posted: Thu Sep 29, 2011 7:56 pm
by lisa
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.