Massive MultiLine trigger.. (Problem Solved)

Posted by Neoshain on Fri 12 Jul 2013 03:30 AM — 3 posts, 14,490 views.

#0
Here's my problem. When I enter the command "ship" this is what I'll get, (could be longer if there are ships docked where I am, but I can always see where the New Republic Ships are)

Quote:

-Hp:2523/2523>-Cr:4387208>->
The following ships are owned by you or by your organization:

Class Name Location Owner
Capital - Defiance - Roche Asteroid Belt - The New Republic
Destroyer - Desolation - Hutt Space - The New Republic
Starfighter - 'Green 1' AWG-1 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - 'Green 2' AWG-2 - Hanger of the Frigate: Desolat - The New Republic
Starfighter - 'Green 3' AWG-3 - Coruscant - The New Republic
Starfighter - 'Green 4' AWG-4 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - 'Green 5' AWG-5 - Hanger of the Frigate: Desolat - The New Republic
Starfighter - 'Green 6' AWG-6 - Corellia - The New Republic
Starfighter - 'Red 1' XWR-1 - Bimmisaari - The New Republic
Starfighter - 'Red 2' XWR-2 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - 'Red 3' XWR-3 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - 'Red 4' XWR-4 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - 'Red 5' XWR-5 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - 'Red 6' XWR-6 - Mon Calamari MC-80 Cruiser - H - The New Republic
Starfighter - RDS-1 - Mon Calamari Shipyard: Docking - The New Republic
Starfighter - RDS-2 - Hanger of the MC90: Defiance - The New Republic
Bomber - 'Blue 1' BWB-1 - Mon Calamari MC-80 Cruiser - H - The New Republic
Bomber - 'Gold 1' YWG-1 - Mon Calamari MC-80 Cruiser - H - The New Republic
Bomber - 'Blue 2' BWB-2 - Mon Calamari MC-80 Cruiser - H - The New Republic
Bomber - 'Blue 3' BWB-3 - Mon Calamari Shipyard: Docking - The New Republic
Bomber - 'Blue 4' BWB-4 - Mon Calamari MC-80 Cruiser - H - The New Republic
Bomber - 'Gold 2' YWG-2 - Mon Calamari MC-80 Cruiser - H - The New Republic
Bomber - 'Gold 3' YWG-3 - Mon Calamari MC-80 Cruiser - H - The New Republic
Bomber - 'Gold 4' YWG-4 - Mon Calamari MC-80 Cruiser - H - The New Republic
Corvette - 12525 - Hanger of the MC90: Defiance - The New Republic
Corvette - 12532 - Mon Calamari Shipyard: Docking - The New Republic
Corvette - 12538 - Mon Calamari MC-80 Cruiser - H - The New Republic
Corvette - 12544 - Mon Calamari Shipyard: Docking - The New Republic
Midsize - PCRV-1 - Mon Calamari MC-80 Cruiser - H - The New Republic
Midsize - PCRV-2 - Hanger of the MC90: Defiance - The New Republic
Transport - DCAC-1 - Hanger of the MC90: Defiance - The New Republic
Transport - DCAC-2 - Mon Calamari Shipyard: Docking - The New Republic
Transport - Sylent Twi'lek - Coruscant - Tovana
Frigate - LCSF-1 - Mon Calamari MC-80 Cruiser - H - The New Republic
Frigate - LCSF-2 - Coruscant - The New Republic
Frigate - LCSF-3 - Mon Calamari Shipyard: Docking - The New Republic
Capital - Independence - Bimmisaari - The New Republic

The following ships are docked here:

Ship Owner Cost/Rent
There are no ships docked here.

-Hp:2523/2523>-Cr:4387208>->


I want to match on only three of those ships at any given time, the top two, "Defiance" and "Desolation", and the last one, "Independence".

There are quite a few spaces in the actual Output in between each "column".


What I am trying to get is the current planetary system in which they are located, under the "Location" column. if I can just get them to match that I can take the systems as wildcards and assign them to variables, which will enable the rest of my plan.... Here is what I tried to just get the top one, (Defiance) to match:

<triggers>
  <trigger
   custom_colour="11"
   enabled="y"
   expand_variables="y"
   ignore_case="y"
   keep_evaluating="y"
   make_bold="y"
   make_italic="y"
   make_underline="y"
   match="Capital     \- Defiance             \- Roche Asteroid Belt            \-  The New Republic"
   regexp="y"
   repeat="y"
   sequence="100"
  >
  <send>::Send("It Matched")</send>
  </trigger>
</triggers>


The double colon is what I use for my scripting prefix, just wanted a quick confirmation of the match.

I have also tried this, also to no avail:

<triggers>
  <trigger
   enabled="y"
   group="Multi Line"
   ignore_case="y"
   lines_to_match="3"
   keep_evaluating="y"
   match=" Class          Name                         Location               Owner\n Capital     \- Defiance             \- (.*?)           \-  The New Republic\n Destroyer   \- Desolation           \- (.*?)                    \-  The New Republic\Z"
   multi_line="y"
   regexp="y"
   sequence="100"
  >
  <send>dance
</send>
  </trigger>
</triggers>


I am using MushClient v4.84, and Lua scripting.

Once I can get it to match I should have the rest of the process down fine.

Basically, I want to keep track of where the ships are so when I need them I just type their names as an alias and I go to them.
Amended on Fri 12 Jul 2013 03:31 AM by Neoshain
#1
Soooo, I'm an idiot. Apologies. I had all the triggers turned off.... It's firing now.

*facepalm*
#2
Scripting/Triggering/Aliasing when you're tired = Lot's of stupid mistakes.