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


Joined: 01 Jun 2006
Posts: 8

PostPosted: Wed Feb 14, 2007 10:00 pm   

Trigger help
 
Your shields absorb their fireball.
Sephiroth's claws attack you.
Sephiroth's claws attack Tigika.
The poison on your weapons burns away at Sephiroth's skin.

Your claws attack Sephiroth.
Their shields absorb your acidbreath.
[ 96/97 ] <6414hp 6500m 6600mv 141bp>
Sephiroth relaxes from his fighting stance.
scan
Sephiroth has fled!
[187984 exp] <6414hp 6500m 6600mv 141bp> [North]
Nobody here.
[East]
No exit.
[South]
No exit.
[West]
Sephiroth (Player)
[Up]
No exit.
[Down]
No exit.

Is there a way I can make a trigger to enter the room and attack that person that I am chasing? I want to make it where it applies to who ever I am fighting. I am a very basic user with triggers and aliases. If someone could lead me in the right directions on how to make something like this? Any help would be grateful.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Feb 15, 2007 2:38 am   
 
Hmm... how about something like this? I'm assuming that you keep your current target in a variable, @Target.

#alias scan {~scan;#t+ ScanDetect;#t+ TargetDetect;#alarm +0.5 {#t- ScanDetect;#t- TargetDetect}}
#trig "ScanDetect" {~[(%w)~]} {#var CurrentDir %1}
#trig "TargetDetect" {@Target} {#exec @CurrentDir}

You may need to adjust the time of the alarm depending on how much lag you get. At the moment it's 0.5 seconds.

What this does, when you type "scan", is activate the two triggers. The first matches the direction in the square brackets and saves it - the second matches the name of your target and moves in whichever direction was detected just before your target's name.
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