Targeting Trigger

Posted by Eldeon on Sat 12 Jun 2010 02:30 AM — 2 posts, 13,514 views.

#0
Hello I have this trigger here:

A * walks *.

Which sends:

%2
kill %1

and this works fine for a creature that walks out of the room. Because this means I follow it where ever it goes and then kill it. However it doesn't work if the input reads:

A minotaur walks in.

Because then it sends the command (in) to the world and that checks my inventory. My question is thus. Is there a way to make a check where the trigger checks to see if the direction that the creature walks is in or not and then if it is in just kill the creature without sending the command (in) to the the world?

What I am trying to achieve is that I'm sitting in an arena. Creatures come and go. I want to kill anything that comes into the room and then follow anything that moves out of the room so I'm not stuck waiting in the same room and kill it.

Also I have a pet that follows me and activates this trigger which sends to the world to kill the pet which I don't want to do. Is there a way to add an exception to the trigger where I don't kill the pet?

On a slightly related topic. I am trying to create a trigger for when i'm killing something and it flees. Although I want it to activate when two separate lines are met.

A minotaur walks (or runs) west.
A minotaur has fled!

I want to match this up and then follow the minotaur and send a command to kill, kick, ect. to the minotaur. I don't know if you can match a trigger to a multi line but if there is a way to do so please tell me.

Thank you in advance.

USA #1

<triggers>
<trigger
 name="auto_attack"
 match="A (.*) walks (east|south|north|west|up|down)\."
 regexp="y"
 ignore_case="y"
 send_to="12"
 sequence="100"
 >
<send>
pet=GetVariable("pet")
if ("%2" ~= pet) then
 Send("%2")
 Send("kill %1")
end
</send>
</trigger>
</triggers>


Should work :)