Skip to content

path Link

Sub-commandPathfindingNew in Reforged
path link {x} {y} {z} {x2} {y2} {z2} [cost] [facet]
Sets
#PathState

Also searchable as: path Link · teleporter · moongate

path link tells path find that a character standing at x, y, z can get to x2, y2, z2 in one go: a teleporter tile, a gate, a ladder. The map files don’t know about these; they depend on the shard.

  • It is one way. Add a second link for the way back.
  • It is used by a route that reaches x, y within 5 of the height z.
  • cost is in hundredths of a step; the default 100 makes the jump count as one step. Give a gate you must double-click, or a slow ladder, a higher cost.
  • In the route, the step through a link has #PathDir 8. Your script does what the link needs there: wait for the teleporter, use the gate.
  • Both ends are on the same facet: facet, a number as in #CursKind, by default the facet you are on.

Links last until path clear or the script is started again. #PathState is ok, or error: … for bad arguments.

path link 1500 1600 0 1700 1600 0 ; a teleporter, and where it leads
path find 1720 1600
for %i 1 #PathCnt
{
path get %i
if #PathDir = 8
event SysMessage Step %i uses the teleporter
}
halt

See also