'PathfindWalkPath': # # Does sanety checks and then chooses a target and walks to it. # Sets when thinking and walking. # Use on npc flag change event as needed. # # Sets to Lost when there is no destination. # Sets to Arriving when walking to destination. # Sets to Walking after s@PathfindChooseTarget # successfully completes. # Use on npc flag change event as needed. # type: task script: - ^if ! queue clear - flag npc Pathfind.Status:Thinking - inject s@PathfindLoadData instantly - ^if { - flag npc Pathfind.Status:Lost - queue _PathfindWalkPath_Queue clear } - ^if { - flag npc Pathfind.Status:Arriving - walkto speed: - queue clear } - inject s@PathfindChooseTarget instantly - flag npc Pathfind.Status:Walking - walkto speed: radius: