Glorida Newbie
Joined: 10 Mar 2006 Posts: 7
|
Posted: Wed Jun 07, 2006 1:58 am |
#ALIAS Target {#var GroundString %-1}
#TRIGGER {~(Target~) @GroundString is here.} {#CLASS Mobs 1;look}
#CLASS Mobs
#TRIGGER {%1 is here.} {#var Mobs {%additem(%-1,@Mobs);#alarm +1 {FindMob}}
#ALIAS FindMob {#var check {(Target) @GroundString is here.};#var check {%subchar(@check," ","|")};#var count 0;#var attack "";#forall @mobs {#add count 1;#var Sub {%subchar( %i, " ", "|")};#IF (@Sub != @check) {} {#var attack @count}};kill @attack;#class Mobs 0}
#CLASS 0
This was surprisingly harder than I had anticipated, but hey this seems to work.
When you receive a new quest, and the target is a mob, let's say for example today it's A Black knight. You would type "target A Black knight" Now, this is case sensitive, remember.
What this does is assigns the mob you're looking for with the (target) flag thing on it, is the black knight, and when you find him, you'll attack the correct one in the room, assuming they didn't move.
This also assumes the groundstring of the mob is MobName is here. If it's different in some cases, you'll have to modify the triggers a bit to include that string as well.
Glorida |
|