Skip to content

path Avoid

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

Also searchable as: path Avoid

path avoid makes every step that ends in the rectangle from x, y to x2, y2 cost more for path find. cost is in hundredths of a step: with 500, a step inside counts as six. The route goes around the area when the detour is shorter than that, and still crosses it when there is no other way, unlike path block.

facet is a number as in #CursKind; the default is the facet you are on. Areas that overlap add up. They last until path clear or the script is started again. #PathState is ok, or error: … for bad arguments.

path avoid 1380 1500 1420 1560 1000 ; keep away from a monster spawn
path find 1434 1699
display ok #PathState - #PathCnt steps
halt

See also