Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Massive MultiLine trigger.. (Problem Solved)

Massive MultiLine trigger.. (Problem Solved)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Neoshain   (38 posts)  Bio
Date Fri 12 Jul 2013 03:30 AM (UTC)

Amended on Fri 12 Jul 2013 03:31 AM (UTC) by Neoshain

Message
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.
Top

Posted by Neoshain   (38 posts)  Bio
Date Reply #1 on Fri 12 Jul 2013 03:39 AM (UTC)
Message
Soooo, I'm an idiot. Apologies. I had all the triggers turned off.... It's firing now.

*facepalm*
Top

Posted by Neoshain   (38 posts)  Bio
Date Reply #2 on Fri 12 Jul 2013 03:45 AM (UTC)
Message
Scripting/Triggering/Aliasing when you're tired = Lot's of stupid mistakes.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,914 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.