First lets get your trigger pattern to work…
^((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 .*?)?\.$
Looks slightly wrong to me. I think you’ll want ?P to start your named captures, not just ?.
Also make your trigger send to Script, since you’ll need to do some script functions to convert some words to numbers (“fifty-seven” to 57).
Once your trigger matches on your line, you should be able to access the named captures with “%” in your code.
The hardest part of this is going to be converting the words to numbers, but MUSHclient does already have some code that will almost do exactly what you need for that, but it expects slightly different formatting (no dashes), so I think first you’ll want to replace “-” with " " in the “%” variable.
Maybe try something like…
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.
For this part it sounds like you’ll want either a series of conditions “if it’s this then do that, else if it’s this then do that, else …” or a lookup table. Maybe something like
|