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
Bromax
Wanderer


Joined: 03 Jan 2002
Posts: 66

PostPosted: Tue Jun 15, 2004 7:23 pm   

Trigger help
 
I have this short script:

#CLASS {Chase} {disable}
#TRIGGER {* HP:(*) MV:(*) - (*): (*) >} {
#VAR target {%3}
#VAR ktarget {%if( ( ( %word( {@target}, 1)="a"))or ( ( %word( {@target}, 1)="the"))or ( ( %word( {@target}, 1)="an")), %trim( %remove( %word( @target, 1), @target)), @target)}
} "" {nocr|prompt}
#TRIGGER {@target leaves (%w).} {
%1
kill @ktarget
}
#CLASS 0

which chases and kills based on prompt info....only problem is that some badguys have names like *BadGuy* with the *'s before and after their name...the @target is just set to "BadGuy" so when he runs I don't chase. Any help?

-Bromax
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Tue Jun 15, 2004 9:27 pm   
 
Easy fix would be to just make another trigger to follow any badguy with stars around the name:

#TR {~*@target~* leaves (%w).} {%1;k @ktarge}
Reply with quote
Bromax
Wanderer


Joined: 03 Jan 2002
Posts: 66

PostPosted: Tue Jun 15, 2004 10:51 pm   
 
Oh man...that was too easy for me to think of. =P Thanks a lot!

-B
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