------ ---------------hubwards
-turnwise-hubwards ^ widdershins-hubwards
-----------------------\ | /
---------turnwise <- ship -> widdershins
-----------------------/ | \
-turnwise-rimwards v widdershins-rimwards
-----------------------rimwards
You're always trying to go Hubwards, toward City A. A skilled sailor can look at the sun if its daylight, or the stars if its nighttime, and if they pass the check, the'll get a message similar to these:
"Squinting up at the sun, you determine that the ship is heading hubwards and that you're three hundred and eighty-seven miles rimwards and nine miles widdershins of City A."
"Squinting up at the sun, you determine that the ship is heading widdershins-hubwards and that you're two hundred and ninety-one miles rimwards and fifty-seven miles widdershins of City A."
"Squinting up at the sun, you determine that the ship is heading widdershins-rimwards and that you're two hundred and forty-nine miles rimwards and sixty-three miles widdershins of City A."
So with those messages in mind, and knowing that you're always trying to go toward city A, it can get confusing. If the ship is already going straight Hubwards, well that's great, but sometimes its not. If a sailor gets turned around or in a whirlpool, it can be going any direction.
I understand that I can use regular expression to capture the directions, I think, and even the numbers (not as important to me) when I trigger that message and use the ColourNote function to print out below the message I triggered to tell me the actual way to go.
So for the first trigger, ideally it would print below it: '87 miles Hubwards to City A, Adjust heading turn-hub for 9 miles'
For the second trigger it would ideally print below it: "291 miles away from city A, adjust heading turn-hub for 57 miles"
For the third trigger it would ideally print below it: "249 miles away from city A, adjust heading turn-hub for 63 miles"
Now I realize since I got confused typing that up, it might not make since. I'd
^((Squinting up at the sun|Gazeing up at the stars), you determine that the ship is heading (?<direction>.*?)( and that you're (?<miles_y>.*?) miles? (?<rim_or_hub>rimwards|hubwards)( and (?<miles_x>.*?) miles? (?<turn_or_wid>turnwise|widdershins))? of .*?)?\.$
I was hoping I could use something like that to capture the miles, and the directions, store them in a variable maybe, and have it transpose the directions for me. I'm not looking for anything that inputs commands to the mud itself, obviously, but something that inserted information next the triggered line itself would be helpful.
so anytime the mud seen "widdershins-rimwards" it would spit out (TH) or anytime the mud seen"turnwise-rimwards" it would spit out (WH) in bright colors to make it easier to see.
If anyone could provide any help or guidance, I would be much appreciated.
Thank you.