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
Farek
Beginner


Joined: 13 Oct 2004
Posts: 29

PostPosted: Tue Oct 02, 2007 1:15 pm   

problems with autokill when there are aggies around.
 
Looks like this:
A Dark Room
Obvious exits: [South, West]
The carpenter is sawing away at a piece of lumber.
A vicious guard dog is here looking for intruders.
The guard dog rushes to attack YOU!
0 followers arrive.
The guard dog misses you with his bite.


Problem is my autokill script has this trigger:

The carpenter is sawing away at a piece of lumber.->
#add @mobile 1
#VAR killlist %additem( carpenter, @killlist)

and another trigger for hitting it:
^%d followers arrive. ->
#if (@mobile > 0) {@killtype %pop( killlist)} {#Show no mob in the room left}

So my problem is whenever there is a agg mob in the room like that dog they agg me and i try to kill the other mob ending up fighting 2 at the same time.
Is there some way to add a "detectionscan" for if ive been hit by a agg mobile and after those are killed i continue with the regular killlist?


Last edited by Farek on Sun Oct 14, 2007 9:52 pm; edited 1 time in total
Reply with quote
Farek
Beginner


Joined: 13 Oct 2004
Posts: 29

PostPosted: Tue Oct 02, 2007 1:24 pm   
 
Also how do i go about it with an all Agg zone?

lets say it looks like this when i enter the room.
A Dark Room
Obvious exits: [South, West]
A vicious guard dog is here looking for intruders.
The guard dog rushes to attack YOU!
0 followers arrive.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Oct 02, 2007 3:04 pm   
 
#trig {rushes to attack YOU!$} {#var aggro 1}

Then change the %d followers trigger to do

#if (@mobile > 0 and !@aggro) {@killtype %pop( killlist)} {#Show no mob in the room left};aggro=0

You could also add a trigger for the guard dogs and just kill them first using #if and %ismember, or you could change the rushes to attack YOU! trigger to capture the last word of the mob's name (which is almost always a noun you can use for it) and handle all the aggro mobs in the room with a separate list, which is checked first before the main list.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Tue Oct 02, 2007 3:26 pm   
 
You can do just the same for agroes as you're doing for usual mobs.

Make a String list for them and then make it so that you'd attack the agro mob first.

Code:

#trigger {The guard dog rushes to attack YOU!} {AgroMobs=%additem(dog,@AgroMobs)}

#alias KillMob {#if ((@KillList!=%null) and (@AgroMobs=%null)) {@killtype %pop(KillList)} {@killtype %pop(AgroMobs)}}



This is just a very rough idea. You can also make a priority list which first checks if there are agros and kills them and once they are dead, moves on to killing usual ones. Usually its done via #Alarm

#alarm {Attack} {*1} {#if ((@KillList!=%null)or(@AgroMobs)!=%null)) {DoWhat} {#Say No mobs, moving on!}}
#alias DoWhat {KillAgroMob;KillUsualMob}
#alias KillAgroMob {#if ((@AgroMob!=%null) and (@Action=0)) {Action=1;#t- Attack;@killtype %pop(AgroMobs)}}
#alias KillUsualMob {#if ((KillList!=%null) and (@Action=0)) {Action=1;#t- Attack;@killtype %pop(KillList)}}

Then you'd also need a line from mud to put the Action back to 0 after you're done so it can loop to next part. Likely, if you have one, you can use the line when you're getting the experience from the kill.

#trigger {You gained %d points.} {Action=0;#t+ Attack}

Hope this helps.

Prog
Reply with quote
Farek
Beginner


Joined: 13 Oct 2004
Posts: 29

PostPosted: Sun Oct 14, 2007 9:51 pm   
 
thx for the help guys.
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