Okay, so far this is what I have...
<triggers>
<trigger
expand_variables="y"
group="HuntGY"
keep_evaluating="y"
match="^In this room you see\: 1st ([A-Za-z ]+)"
regexp="y"
send_to="12"
sequence="100"
>
<send>--Define mobset prior to running
mobname = "grave robber"
--Checks to see if creature in the room is in mobset and if so, sets the last word of name as "last_word"
last_word = string.match (mobname, "[%a]+$")
--Command to kill mob if match is made from mobset
Send ("kill " .. last_word)
--Sets target variable to mob for further fighting.
Execute ("t ".. last_word)
--Displays target in bottom left
SetStatus ("Target: %1")
</send>
</trigger>
</triggers>
and it works great... for robbers. It's actually -only- trying to kill robbers, even if there are only grave imps in the room, though.
This is a standard set up of what i see when I look:
[Ancient Graveyard]
Paralleling the widening path are empty holes in the ground. The realization that these empty holes once held not only a coffin, but a body, becomes abundantly clear by the broken wood and scattered bone fragments still lying around. The large oak trees that surround these desecrated graves stand silently, their only purpose to drop their leaves and fill in the gaping holes.
The area is illuminated.
In this room you see: 1st grave robber, 1st grave imp, 1st zombie, 2nd grave imp
In this room are: large oak tree
Obvious exits are: northwest, south
Now I want it to ultimately kill any (and all) of these. But I need it to pick one target. But not necessarily just the grave robber. As it's currently set up, if there are only grave imps, it still tries to kill a grave robber... what would I need to do to fix this and make it viable to attack any of those three mobs? |