[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  Need help with a Complex multi line trigger

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Need help with a Complex multi line trigger

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Madrox   (40 posts)  [Biography] bio
Date Fri 20 Jan 2006 06:43 PM (UTC)  quote  ]
Message
Alright, I cant figure out how to make this work correctly.
What i need is a trigger that takes

[008] Battleship :Imperial Star Destroyer 'Plague' -<Pos:Outer>-
Energy: 099%|Hull: 100%|Crew: 000|System: Corellian -16/10
Targetting: Freighter:Pirate BF99 099%|100%

And then sends battlegroup nav Plague(or any other ship there are 12 different ones atm) autopilot

then after that battlegroup nav Plague fire about 15 times

then battlegroup nav plague autopilot

Any ideas?
[Go to top] top

Posted by Madrox   (40 posts)  [Biography] bio
Date Reply #1 on Fri 20 Jan 2006 07:17 PM (UTC)  quote  ]
Message
Also, when i get this message after the fire spam 'Your target is outside of turbolaser range!' I would like it to wait 15 seconds then resend the fire commands
[Go to top] top

Posted by Rojan QDel   USA  (9 posts)  [Biography] bio
Date Reply #2 on Sun 29 Jan 2006 06:17 PM (UTC)  quote  ]

Amended on Sun 29 Jan 2006 06:19 PM (UTC) by Rojan QDel

Message
This works, enjoy:

<triggers>
<trigger
enabled="y"
lines_to_match="3"
keep_evaluating="y"
match="^\[(.+)\] (.+) \:(.+) \'(.+)\' \-\-\nEnergy\: (.+)\|Hull\: (.+)\|Crew\: (.+)\|System\: (.+)\/(.+)\nTargetting\: (.+)\:Pirate (.+) (.+)\|(.+)\Z$"
multi_line="y"
regexp="y"
sequence="100"
>
<send>battlegroup nav %4 autopilot
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 fire
battlegroup nav %4 autopilot</send>
</trigger>
</triggers>
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Mon 30 Jan 2006 07:06 PM (UTC)  quote  ]
Message
Quote:


Also, when i get this message after the fire spam 'Your target is outside of turbolaser range!' I would like it to wait 15 seconds then resend the fire commands


If you match on "Your target is outside of turbolaser range!" you can use DoAfter to wait 15 seconds. Something like this:


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   expand_variables="y"
   match="Your target is outside of turbolaser range!"
   send_to="12"
   sequence="100"
  >
  <send>DoAfter (15, "battlegroup nav @shipname fire")</send>
  </trigger>
</triggers>


This assumes you have saved the current shipname in the variable 'shipname'.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


2,233 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]