iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Thu Dec 27, 2001 7:51 am |
Are you trying to kill all the mobs in a room, no matter what they are or are you trying to kill certain mobs in the room. If it's the latter, try this:
#alias killmob {#t+ KillMob;#var path ".";#var mob %1;kill @mob;#var fighting 1}
#trigger {* has fled (%w)!} {#if (@fighting=1) {#var path %concat(@path, %1);%1;kill @mob}} "KillMob"
#trigger {You killed *!} {#re @path;#var path ".";kill @mob} "KillMob"
#trigger {* is not here.} {#t- KillMob} "KillMob"
If it's the former, then try this:
#alias killmob {#t+ KillMob;#var path ".";kill 2.#var fighting 1}
#trigger {* has fled (%w)!} {#if (@fighting=1) {#var path %concat(@path, %1);%1;kill 2.}} "KillMob"
#trigger {You killed *!} {#re @path;#var path ".";kill 2.} "KillMob"
#trigger {* is not here.} {#t- KillMob} "KillMob"
Of course, this won't work if your mud doesn't understand that 2. means kill the 2nd PC/NPC in the room, you being the 1st PC/NPC in the room, but at least this will give you something to work with. Btw, all of this is untested code.
Iljhar |
|