Re: Very simple paths?
Posted: Wed Oct 01, 2014 7:57 pm
As far as I know, there is no "map"—just a series of directions. But somehow Mudlet already knows the commands for n s e w ne se sw nw u d out and ent....but no others.
Here's the script:
pathing = pathing or{}
pathing.currentPath = pathing.currentPath or ""
pathing.currentNode = pathing.currentNode or 0
pathing.walks = pathing.walks or {}
pathing.walks.SAMPLEWALK = {
"w;n",
"3e",
}
Then, to start the path, I use
pathing.currentPath = matches[2]
pathing.currentNode = 1
speedwalk(pathing.walks[pathing.currentPath][pathing.currentNode])
This command actually starts the path: ^startPathing (\w+)$
Here's the script:
pathing = pathing or{}
pathing.currentPath = pathing.currentPath or ""
pathing.currentNode = pathing.currentNode or 0
pathing.walks = pathing.walks or {}
pathing.walks.SAMPLEWALK = {
"w;n",
"3e",
}
Then, to start the path, I use
pathing.currentPath = matches[2]
pathing.currentNode = 1
speedwalk(pathing.walks[pathing.currentPath][pathing.currentNode])
This command actually starts the path: ^startPathing (\w+)$