Selecting path when starting the 1-10Pioneers route

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
CrazyGuy
Posts: 63
Joined: Mon Mar 23, 2009 10:41 am

Selecting path when starting the 1-10Pioneers route

#1 Post by CrazyGuy » Mon Mar 28, 2011 10:07 am

Had a quick question, sometimes ive got to stop the bot for one reason or another when im running the 1-10Pioneers route. I wanted to put in a chunk of code at the beginning that would select the correct path for me without having to run all the way back to pioneers but its not working, can anyone offer some guidance? I am putting it in l1t_start.xml after the <waypoints> but before the first waypoint.
<onLoad>
if( player.Level == 2 || player.Level == 3 ) then
loadPaths("1-10Pioneers/l3t_3-4_bear");
end

if( player.Level == 4 || player.Level == 5 ) then
loadPaths("1-10Pioneers/l4t_5-7_beetle");
end

if( player.Level == 6 || player.Level == 7 || player.Level == 8 ) then
loadPaths("1-10Pioneers/l7t_7-9_boar");
end

if( player.Level > 8 ) then
loadPaths("1-10Pioneers/l9t_9-10_bugs");
end
</onLoad>

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

Re: Selecting path when starting the 1-10Pioneers route

#2 Post by lisa » Mon Mar 28, 2011 11:00 am

Very easy solution to this is to make 1 long WP that goes from one end to the other. In this case the human start point to around where the boars are at the top of the map.

Just follow the road is easiest way and place your waypoints locations at gaps between fences. At these spots have your code check your character lvl and if it's the level you want send it out to another WP to kill stuff.

I had a topic about this a while back, not sure if I could find it again lol

Edit: found it
http://www.solarstrike.net/phpBB3/viewt ... =21&t=2117
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

CrazyGuy
Posts: 63
Joined: Mon Mar 23, 2009 10:41 am

Re: Selecting path when starting the 1-10Pioneers route

#3 Post by CrazyGuy » Mon Mar 28, 2011 11:07 am

Thanks :) Ill just make one long wp, but i was curious why what i had created didnt work. Is there anything you can see right off the back that would cause it not to?

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

Re: Selecting path when starting the 1-10Pioneers route

#4 Post by lisa » Mon Mar 28, 2011 12:21 pm

Well I have never used || in any of the stuff I've done so might be that.

Code: Select all

( player.Level == 6 || player.Level == 7 || player.Level == 8 )
I'd probably do it like this myself

Code: Select all

(player.Level >= 6 and 8 >= player.Level) 
having said that you do realise if your bot is in a lower area and and a high lvl then it will try to walk straight to the nearest WP in the higher lvl WP. That is why you have a nice long WP to link them all together =)

I don't remember if I posted my 1-10/10 WP files or not, I might have a look and see and if I didn't I'll tidy them up a bit and post them.
Basically I set it up so the bot can disconnect or die at any stage from 1-10/10 and when loaded up again or resurrected it would just continue on to where it should be with no user input or working out where you are.
It was a challenge I was given ages ago, took me a while to get it going smoothly too lol
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

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

Re: Selecting path when starting the 1-10Pioneers route

#5 Post by Administrator » Mon Mar 28, 2011 12:58 pm

As already stated, || is not valid in Lua. Use 'or' instead.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests