I'm going to preface all of this with "I'm new" and not just to this, but to coding in general.
So I've been messing around building my own dailies script that collects quests, turns them in, and gets the items if its low or out. This was done through reading through the forums and dissecting other peoples waypoint files to help build my own understanding. So now some questions.
is it possible to use loadpaths() to load not only a new file, but a specific waypoint tag in the file? or better yet, can I make one section of waypoints loop until conditions are met? I had tried to get that to work (the loop) but the start and end were too close? so when it loaded the tag it would go from 1 to like 2 and back to 1, instead of 1 to 20 and back to 1 (as an example, and the loop() was set on the last waypoint)
maybe I'm just missing something obvious =/, any helps would be awesome. Or heck, even just a nudge in the right direction!
bouncing between waypoints
Re: bouncing between waypoints
I believe you can use
I think it finish's executing what is in that waypoint before turning full control over to the newly loaded waypoint.....not 100% sure though.
If you're trying to go back and forward between 2 waypoints you can use either
to move to a different part in your waypoint (eg, finished dailies and want to leave, so go to tag 'Done' and return to varanas etc.
or
Code: Select all
<!-- # 6 --><waypoint x="xxx" z="zzz" y="yyy">
loadPaths("waypoint")
__WPL:setWaypointIndex(__WPL:findWaypointTag("tag"))
</waypoint>
If you're trying to go back and forward between 2 waypoints you can use either
Code: Select all
<!-- # 1 --><waypoint x="xxx" z="zzz" y="yyy" tag='tag'>
-- do stuff
</waypoint>
<!-- # 2 --><waypoint x="xxx" z="zzz" y="yyy">
__WPL:setWaypointIndex(__WPL:findWaypointTag("tag"))
</waypoint>
or
Code: Select all
<!-- # 1 --><waypoint x="xxx" z="zzz" y="yyy" tag='tag'>
__WPL:setDirection(WPT_FORWARD);
</waypoint>
<!-- # 2 --><waypoint x="xxx" z="zzz" y="yyy">
if queststatus ~= "complete" then
__WPL:setDirection(WPT_BACKWARD);
end
</waypoint>
-
- Posts: 19
- Joined: Thu Feb 13, 2014 11:11 pm
Re: bouncing between waypoints
Thanks for the reply 
The first one had an error when I tried to run it, the other 2 didn't quite work how I wanted. I ended up creating an entirely separate file for all return paths, since it should start at the closest and follow it till I tell it otherwise.
still curious if there is a way to start at a specific tag when you loadPaths() though

The first one had an error when I tried to run it, the other 2 didn't quite work how I wanted. I ended up creating an entirely separate file for all return paths, since it should start at the closest and follow it till I tell it otherwise.
still curious if there is a way to start at a specific tag when you loadPaths() though

Re: bouncing between waypoints
that is where you use the onload on the Wp being loaded.
example
or something as simple as
an example of how a simple onload would look in a WP is like this
example
Code: Select all
<onload>
if player.Level > 29 and 51 > player.Level then
__WPL:setWaypointIndex( __WPL:getNearestWaypoint(player.X, player.Z, player.Y ) );
else
player:sleep()
end
</onload>
Code: Select all
<onload>
__WPL:setWaypointIndex(1);
</onload>
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
changeOptionFriendMob("mob", "Agile Shadow Mink", "Add")
</onload>
<!-- # 1 --><waypoint x="3404" z="12131" y="203"> </waypoint>
<!-- # 2 --><waypoint x="3438" z="11606" y="205"> </waypoint>
<!-- # 3 --><waypoint x="3499" z="11235" y="202"> </waypoint>
<!-- # 4 --><waypoint x="3545" z="10872" y="203"> </waypoint>
<!-- # 5 --><waypoint x="3504" z="10486" y="203"> </waypoint>
<!-- # 6 --><waypoint x="3975" z="10575" y="203"> </waypoint>
<!-- # 7 --><waypoint x="4301" z="10704" y="208"> </waypoint>
</waypoints>
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

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
-
- Posts: 19
- Joined: Thu Feb 13, 2014 11:11 pm
Re: bouncing between waypoints
Thank you very much Lisa, that was more inline with what i was looking for. Soooo much to learn! 

Who is online
Users browsing this forum: Google [Bot] and 2 guests