Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Topaz
Newbie


Joined: 27 Dec 2001
Posts: 2

PostPosted: Thu Dec 27, 2001 7:06 am   

Trigger Help
 
ok im having aomse trouble with a trigger
i want it to kill all of the MOB in the room, but if the mob flee i want it to go after them and keep attacking until they die
Any help would be much appreciated
Thanx
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net