RoM Waypoint file

From SolarStrike wiki
(Redirected from RoM Waypoinf files)
Jump to: navigation, search

Create a new waypoint file[edit]

Start MicroMacro and execute the rom/createpath.lua script by entering


into your MM window. You need a valid profile for your ingame charactername and have to set the dummy macro ingame. You could also execute the script with a forced profile

rom/createpath.lua profile:default

You just walk to each point you want in your waypoint list (try to avoid walking near any trees, fences, steep hills, etc.), and press NUMPAD 1. Once you've made your round (the waypoints should loop back and bring you near the start), press NUMPAD 3. Now type in the name you want to save it as (example: 'boars' would be good enough. Don't include any slashes, and the .xml extension is automatically applied).

The new created waypointfile boars.xml will look like:

<waypoints type="NORMAL" >
	<!-- # 1 --><waypoint x="-791" z="-8322"></waypoint>
	<!-- # 2 --><waypoint x="-637" z="-8155"></waypoint>
	<!-- # 3 --><waypoint x="-552" z="-8251"></waypoint>
	<!-- # 4 --><waypoint x="-640" z="-8412"></waypoint>
	<!-- # 5 --><waypoint x="-800" z="-8308"></waypoint>

Waypoint types[edit]

You can determine the targeting and attacking behaviour of the bot by using waypoint types. You can add the 'type' option at the top of the waypoint file or separately for each waypoint. The default value is 'NORMAL'. If you don't specify a type at the waypoint, the waypoint will inherit the type from the <WAYPOINTS> tag at the top of the file

<waypoints type="TRAVEL" >
	<!-- # 1 --><waypoint x="-791" z="-8322"></waypoint>
	<!-- # 2 --><waypoint x="-637" z="-8155" type="RUN"></waypoint>
	<!-- # 3 --><waypoint x="-552" z="-8251"></waypoint>
In this example, the waypoints #1 and #3 have the type 'TRAVEL' and the waypoints #2 have the type 'RUN'.

NORMAL Default value for waypoints. The bot will try to target new mobs and attack them.
RUN The bot will not targeting mobs but will fight back against aggressive enemies.

This should be used when attempting to run through groups of enemies and only bothering with those that attack you, such as when you are running out to your farming spot.

TRAVEL The bot will not targeting mobs and will not stop if he gets aggro. He will just run until he reach a waypoint with one of the other waypoint types or get a stop command within the waypoint coding.

This should be used to travel to "safe" locations (ie. town).

Using LUA code within your waypoint files[edit]

You can use you own lua code within the <waypoint></waypoint> tags. By doing that you can do nearly everything. The lua code will be executed after you reach that waypoint. It would look like:

<waypoint x="-2462" z="-9625"></waypoint>
<waypoint x="-2391" z="-9639">
   if( player.Level > 2 ) then
<waypoint x="-2144" z="-9585"></waypoint>

You may also make use of an onLoad event for this waypoint script. This Lua code will be executed when the waypoint script is loaded (either automatically or by calling __WPL:load()).

      printf("Waypoint onLoad event test.\n");
   <waypoint x="-2462" z="-9625"></waypoint>

See the list of functions that you can use for your own coding.

The included 'RBAssist.xml' waypoint file[edit]

This file does not move your character, only heals, buffs and attacks monsters. It can be used to help you when you are playing manually.

It has 3 'modes' that can be set by the user by changing the 'attackMode' variable at the top of the file. The 3 modes are:

'trigger' = Have to trigger each attack with the "go" macro.
'auto' = Auto attacks targeted monsters. "go" macro toggles it on and off.
'disabled' = Only heal and buff. Never attacks. "go" macro does nothing.

By default it is set to mode 'auto' and is switched 'on' so it is ready to attack automatically when you target a monster even without using the trigger. So in the default mode, using the 'trigger' is optional.

If you wish to use the trigger, create a macro with the command

/script RBTrigger = "go"

and add it to your action bar. Then when you press it, the script will receive the trigger and act accordingly.