|
Need help with a Complex multi line trigger
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Madrox
(40 posts) 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? | top |
|
| Posted by |
Madrox
(40 posts) 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 | top |
|
| Posted by |
Rojan QDel
USA (9 posts) 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> | top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) 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 | 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
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )