Converting a waypoint file to use teleport functions
Posted: Sat Apr 21, 2012 6:43 am
Creating a waypoint file :
First, open micromacro and run "rom/createpath". This will set you on your path creation ways. I'll skip this part for now, as most should probably be fairly familiar with it. For this to work, you'll need to fully read Rock5's teleport function, which is located here on the subforums "waypoints", installed, and installed correctly. Secondly, be careful not to use this in open areas.
Secondly :
Opening up your finished waypoint path :
First located and open your waypoint path you've created and would like to convert to a teleport path. Opening with notepad should work fine. Now, let's say you have a entire waypoint file, inside a particular instance, and it's ok to turn on teleporting for the entire waypoint file. Note, as mentioned by Rock5, it's pretty important not to teleport around in public, so play with this inside a instance until you get used to it. Now that you've opened up your waypoint file, let's go ahead and add this, exactly, on the onload portion at the top of the waypoint file.
before :
and after :
Now, you have the beginning of your teleport file. Now, for the next part, you'll want to start marking exactly which teleport waypoints within your file you'll want to be using. On each waypoint you'd like to use a teleport, you'll need a specific line of code on :
This line of code will instruct RoMbot to teleport to your next chronological waypoint. As of the userfunction now, onload is no longer a requirement and need not be put in the header of your waypoint file. If you encounter problems for whatever reason, you can include it on the header as a backup method for calling it.. It has a few functions, and can be used as :
portToNextWP() ---> Will teleport the user to the next chronological waypoint in the list
teleportToIndex() ---> Will teleport user to the next chronological waypoint, without need of the onload section
portToNextWP(numberhere) ---> Will teleport user to the specified waypoint.
Now, RoMbot will recognize waypoint 9, and after having successully run to it, teleport to waypoint 10. Remember to add the function portToNextWP() for each waypoint you'd like to teleport to, which can actually be used in different ways as instructed on Rock5's page. It's a little tricky to get down in the beginning, but after some practice it will serve you well.
First, open micromacro and run "rom/createpath". This will set you on your path creation ways. I'll skip this part for now, as most should probably be fairly familiar with it. For this to work, you'll need to fully read Rock5's teleport function, which is located here on the subforums "waypoints", installed, and installed correctly. Secondly, be careful not to use this in open areas.
Secondly :
Opening up your finished waypoint path :
First located and open your waypoint path you've created and would like to convert to a teleport path. Opening with notepad should work fine. Now, let's say you have a entire waypoint file, inside a particular instance, and it's ok to turn on teleporting for the entire waypoint file. Note, as mentioned by Rock5, it's pretty important not to teleport around in public, so play with this inside a instance until you get used to it. Now that you've opened up your waypoint file, let's go ahead and add this, exactly, on the onload portion at the top of the waypoint file.
before :
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-1456" z="2190" y="-380"> </waypoint>
<!-- # 2 --><waypoint x="-1505" z="2146" y="-380"> </waypoint>
<!-- # 5 --><waypoint x="-1504" z="2190" y="-380"> </waypoint>
<!-- # 6 --><waypoint x="-1721" z="2197" y="-479"> </waypoint>
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
function portToNextWP()
local nextWP = __WPL.Waypoints[__WPL.CurrentWaypoint]
teleport( nextWP.X, nextWP.Z, nextWP.Y)
end
</onLoad>
<!-- # 1 --><waypoint x="-1456" z="2190" y="-380"> </waypoint>
<!-- # 2 --><waypoint x="-1505" z="2146" y="-380"> </waypoint>
<!-- # 5 --><waypoint x="-1504" z="2190" y="-380"> </waypoint>
<!-- # 6 --><waypoint x="-1721" z="2197" y="-479"> </waypoint>
Code: Select all
portToNextWP()
portToNextWP() ---> Will teleport the user to the next chronological waypoint in the list
teleportToIndex() ---> Will teleport user to the next chronological waypoint, without need of the onload section
portToNextWP(numberhere) ---> Will teleport user to the specified waypoint.
Code: Select all
<!-- # 9 --><waypoint x="1334" z="2911" y="318"> portToNextWP() </waypoint>