 |
mo24 Wanderer
Joined: 31 Jan 2006 Posts: 55
|
Posted: Wed Apr 05, 2006 2:53 pm
Trigger not firing after prompt |
Hi,
on my MUD, lines like tells, scans, etc. often appear on the same line as my prompt. This is messing up some of my triggers, because they are set to fire on, say: ^(*)whatever
Like for a SCAN. Normally I might see this:
Code: |
[ 4100/4100hp 3229/3229mn 3419/3451mv 729tnl] >
Right here you see:
- A vulgar parrot
- A monkey eating a banana
- A giant crab
|
But when the first line appears next to prompt, it is:
Code: |
[ 4100/4100hp 3229/3229mn 3419/3451mv 729tnl] > Right here you see:
- A vulgar parrot
- A monkey eating a banana
- A giant crab
|
So I would need to make a trigger that catches 'Right here' when its on the prompt's line too. Wouldn't you think this patterns would work?
Code: |
^~[ (*)~/(*)tnl~] ~> Right here you see~: |
Or, at least this?
Well neither the first two work when the text is on the same line as my prompt and I don't know why. i've tried checking newline, prompt, trigger on trigger, etc.. all those options, and have tried many diferent patterns. But none work! Under mapper configuration, I have it set to 'auto detect prompt' and pattern set to:
Code: |
^\[ \d+\/\d+\w+ \d+\/\d+\w+ \d+\/\d+\w+ \d+\w+\] \>\s+ |
I don't know.. I think that might have something to do with it, but I don't know what to put in it to get it to work. Can anyone help? |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Apr 05, 2006 5:06 pm |
Help prompt on Aard:
%c : Display a carriage return (useful for multi-line prompts)
prompt stuff >%c
It will get rid of
[ 4100/4100hp 3229/3229mn 3419/3451mv 729tnl] > Right here you see:
and always make it
[ 4100/4100hp 3229/3229mn 3419/3451mv 729tnl] >
Right here you see: |
|
|
 |
mo24 Wanderer
Joined: 31 Jan 2006 Posts: 55
|
Posted: Wed Apr 05, 2006 5:28 pm |
well %c gives me an extra blank line which makes two after every enter and cluttery. I know I can gag all blank lines after that but i'm used to having just one You know how it is, you get used to things after a while...
I woud love to be able to get this trigger to work without having to change my prompt or anything. There must be a way, shouldnt there? especially for muds which dont have a built in option for adding a crlf to the prompt. |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Apr 05, 2006 5:36 pm |
heh, i just do as you said you could, gag all blanks.
Do a #sub on your prompt?
I know i've seen stuff like this covered on here before...check around.
+prompt +screw +trigger
or
+prompt +mess +trigger |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Apr 05, 2006 6:52 pm |
If Aardwolf uses the IAC GA/EOR telnet codes at the end of prompts without the newline option, you should turn on the option to parse that in your zMUD preferences (under Emulation settings). You'll get some blank lines, depending on how they do messages in the game, but it'll be better than the alternatives.
|
|
|
 |
mo24 Wanderer
Joined: 31 Jan 2006 Posts: 55
|
Posted: Wed Apr 05, 2006 7:22 pm |
Thx for the suggestions.
I think I have discovered partly what is wrong. It seems a prompt trigger I have in the same class folder was interfering with it. I don't know why..
But I moved the trigger i have been having problems with into the main triggers section, not in a folder, and it seems to work OK there. Whats weird is I tried to put it in a new separate folder (so it is orderly :) and again it stopped working immediately. Hmmm
I am not sure why this is but it is working now so far.
btw not sure Larkin if aard uses that or not.. but it was already enabled in my preferences. |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Apr 05, 2006 7:35 pm |
usually 2 triggers that look for the exact same thing will not work together.
It would be better to combine them and if the body of the trigger is only supposed to fire at times use a #if with a var for it.
#trigger {trigger} {#if (@item1 = 1) {do this};#if (@item2 = 1) {do this}}
better than
#trigger {trigger} {#if (@item1 = 1) {do this}}
#trigger {trigger} {#if (@item2 = 1) {do this}} |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Apr 05, 2006 8:35 pm |
I have trigger messages that are duplicated several times throughout my scripts, and they fire without problem. For example, I have many multi-state triggers that will use the prompt as the second or third state, and my prompt triggers all fire correctly.
That's not to say that you won't run into an odd situation every now and then. I have gotten into fights where there was a lot happening, and suddenly my main prompt trigger just dies. The only way I can make it work again is to re-create an exact duplicate or to close zMUD and try again. |
|
|
 |
|
|