Need help with a Complex multi line trigger

Posted by Madrox on Fri 20 Jan 2006 06:43 PM — 4 posts, 18,394 views.

#0
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?
#1
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
USA #2
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>
Amended on Sun 29 Jan 2006 06:19 PM by Rojan QDel
Australia Forum Administrator #3
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'.