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
lucan
Newbie


Joined: 28 Mar 2004
Posts: 4

PostPosted: Sun Mar 28, 2004 11:28 pm   

Trigger problem
 
ive serached and found something that could of helped but cant seem to get it to work.

I am fighting certain mud characters but they have the annoying habit of fleeing.. what i would love is to auto trigger that when the flee i can follow them and continue combat.

Mud throws up ..

A Parisian panics, and attempts to flee.
A Parisian leaves east.

I want to now go east and kick Parisian

Now it would be great if i can enter in the names of these targets .. just in case in pkill .. someone panics and flees and by mistake my trigger kicks in and i kill em :)
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sun Mar 28, 2004 11:46 pm   
 
#TR {(%w) panics, and attempts to flee.} {killtemp = %1}
#COND {{@killtemp} leaves (%w).} {%1;kick @killtemp} {within|param=1}
Reply with quote
lucan
Newbie


Joined: 28 Mar 2004
Posts: 4

PostPosted: Sun Mar 28, 2004 11:53 pm   
 
Excellent that works!! my only fear is if someone flees that i am not attacking .. i will follow them and kick em :9
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 29, 2004 12:20 am   
 
Then set the variable yourself instead of with the trigger.
Reply with quote
lucan
Newbie


Joined: 28 Mar 2004
Posts: 4

PostPosted: Mon Mar 29, 2004 12:23 am   
 
is there a way of setting multiple variables like "dog;cat;pariseene;goat" ? so that i would only attack them?
Reply with quote
Bromax
Wanderer


Joined: 03 Jan 2002
Posts: 66

PostPosted: Mon Mar 29, 2004 12:37 am   
 
I have the same trigger..I just added a button to turn the class on or off so I chase when I want and dont when I don't.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Mar 29, 2004 9:04 am   
 
Yes there is, Lucan. Try this:

#var killtemp {cat|dog|goat|pariseene}
#trigger {(%w) panics and attempts to flee.} {}
#Cond {({@killtemp}) leaves (%w).} {%2;kick %1} {within|param=1}
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Mar 29, 2004 12:55 pm   
 
Also, what LightBulb was refering to was to change the pattern of the first condition to:
@killtemp panics, and attempts to flee.

In this case, the
killtemp = %1

would not be needed. Then, you use something else to set the variable yourself instead of having the trigger do it. This can be done with an alias of the command you use to start a fight. Example:
#ALIAS kill {~kill %1;#VAR killtemp {%1}}

As a side note, a variable does not need to be enclosed in braces for it to be expanded in a trigger's pattern. However, if it is enclosed in braces, it means that the variable is a stringlist. If the variable is not a stringlist (it contains just one value), then it will still work because zMUD will treat it as a stringlist of length one and will not match, in its place, anything different than what the variable contains.
Reply with quote
lucan
Newbie


Joined: 28 Mar 2004
Posts: 4

PostPosted: Tue Mar 30, 2004 8:58 pm   
 
Thank you all :)
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