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
Articnal
Apprentice


Joined: 19 Jan 2002
Posts: 107

PostPosted: Sat Oct 18, 2003 8:37 am   

Not doing twice the work
 
Hi,i need to get some triggers which can start with nothing before,or with the prompt before.

Untill now,im getting 2 same triggers,one with ^,and another with ^prompt before of them.

I think the command im searching for must be something like [^|^prompt] but this one works even if no ^ or ^prompt is there... any idea? [xx(]
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Sat Oct 18, 2003 9:44 am   
 
It seems a little strange to want to trigger off of 'nothing' .. perhaps if you actually tell us what you want to do somebody might be able to figure a better/different method of doing it

Arcane
Reply with quote
Articnal
Apprentice


Joined: 19 Jan 2002
Posts: 107

PostPosted: Sat Oct 18, 2003 9:53 am   
 
Sorry for my english;
What i tryed to mean is,for example,my objetcive trigger is... {You are hungry}

Then,it can appear as:
<my prompt> You are hungry
or
You are hungry

and i want to trigger on bough,with just 1 trigger.

Hope this is more understandable now :|

Thx for ur help,Articnal.
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Sat Oct 18, 2003 10:01 am   
 
Thanks for clearing that up ;-)

The only way I can think of doing it with one trigger is to enable both the newline and prompt checkboxes on the options tab of the trigger, as the mud I play doesn't use a prompt I can not be sure that this will work though.

Arcane
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 18, 2003 2:25 pm   
 
#TR {You are hungry} {eat}

If you anchor at the beginning of the line, you will need a second trigger for the times when the pattern is on the same line as the prompt. Sorry, there is no way around it.
Reply with quote
Articnal
Apprentice


Joined: 19 Jan 2002
Posts: 107

PostPosted: Sat Oct 18, 2003 3:35 pm   
 
ok the problem is that that way anyone can force you to eat just by telling you once and again 'You are hungry'
Reply with quote
simson
Beginner


Joined: 18 Oct 2000
Posts: 29
Location: Sweden

PostPosted: Sat Oct 18, 2003 5:01 pm   
 
Wouldn't it work if you anchor the end of the string instead? I think $ is used for that.
You are hungry$
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 18, 2003 7:12 pm   
 
Let me rephrase. Apparently I wasn't clear enough

1. If you want to have a SINGLE trigger which will fire when the trigger phrase is at the beginning of the line OR immediately follows the prompt, don't use ^. Yes, this may leave you susceptible to trigger abuse, but it will do what you asked.

2. If you want to have triggers which will ONLY fire when the trigger phrase is at the beginning of the line OR immediately follows the prompt, use two triggers.

3. If you want to have ONE trigger which will ONLY fire when the trigger phrase is at the beginning of the line or immediately follows the prompt, you will have to design some complicated #IF tests to determine whether those conditions exist or not. It can't be done with the pattern.

4. I can't decide for you what is more important. I can only tell you that you have to choose. As I said, "Sorry, there is no way around it".

As simpson says, anchoring at the end may prove helpful.
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