|
Kurt_DH Wanderer
Joined: 26 Oct 2000 Posts: 62
|
Posted: Tue Jul 09, 2002 9:16 pm
Trigger question |
[Room name]
Long description. You also see a town guard, a large wooden gate, and a sign.
Obvious exits: north, south.
-----------------------------
In that room above, "a town guard" is in bright white while everything else is in grey. The MUD itself highlights the NPC's in the room. I want to create a trigger where it will fire when it sees an NPC in the room. I can't trigger "a town guard" because the trigger would be firing when I fight him, when I look at him, etc. I just want it to fire when I enter the room and I see an NPC there. Therefore, I looked into seeing if I could make it so the trigger would only fire when the name color of the NPC was bright white, but I can only find the option for line color in the triggers options, and the line color isn't white, it's the actual name of the NPC, and just the name, not the entire line. Is there anyway for zMUD to recognize that the NPC's name is bright white, so I can create a trigger for it? Thanks. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Jul 09, 2002 11:04 pm |
quote:
[Room name]
Long description. You also see a town guard, a large wooden gate, and a sign.
Obvious exits: north, south.
-----------------------------
In that room above, "a town guard" is in bright white while everything else is in grey. The MUD itself highlights the NPC's in the room. I want to create a trigger where it will fire when it sees an NPC in the room. I can't trigger "a town guard" because the trigger would be firing when I fight him, when I look at him, etc. I just want it to fire when I enter the room and I see an NPC there. Therefore, I looked into seeing if I could make it so the trigger would only fire when the name color of the NPC was bright white, but I can only find the option for line color in the triggers options, and the line color isn't white, it's the actual name of the NPC, and just the name, not the entire line. Is there anyway for zMUD to recognize that the NPC's name is bright white, so I can create a trigger for it? Thanks.
Try using an ANSI trigger instead of the line-color option. You'll need to put the actual ANSI codes for white into the trigger yourself, though.
EDIT: for a colorization-generic trigger, link it (via use of #T+ and #T-) to the triggers for [room name.] and the exits line.
li'l shmoe of Dragon's Gate MUD |
|
|
|
Kurt_DH Wanderer
Joined: 26 Oct 2000 Posts: 62
|
Posted: Wed Jul 10, 2002 12:19 am |
quote:
quote:
[Room name]
Long description. You also see a town guard, a large wooden gate, and a sign.
Obvious exits: north, south.
-----------------------------
In that room above, "a town guard" is in bright white while everything else is in grey. The MUD itself highlights the NPC's in the room. I want to create a trigger where it will fire when it sees an NPC in the room. I can't trigger "a town guard" because the trigger would be firing when I fight him, when I look at him, etc. I just want it to fire when I enter the room and I see an NPC there. Therefore, I looked into seeing if I could make it so the trigger would only fire when the name color of the NPC was bright white, but I can only find the option for line color in the triggers options, and the line color isn't white, it's the actual name of the NPC, and just the name, not the entire line. Is there anyway for zMUD to recognize that the NPC's name is bright white, so I can create a trigger for it? Thanks.
Try using an ANSI trigger instead of the line-color option. You'll need to put the actual ANSI codes for white into the trigger yourself, though.
EDIT: for a colorization-generic trigger, link it (via use of #T+ and #T-) to the triggers for [room name.] and the exits line.
li'l shmoe of Dragon's Gate MUD
So I click the ansi trigger option and then put in the color code for white in the trigger itself? Can you show me exactly what the ansi code is so I can put it in the trigger? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jul 10, 2002 3:26 am |
The simplest method is to copy and paste. Highlight the white "a town guard" in the mud output screen. Create your new trigger in the settings editor, do not paste yet. Click the Options tab. Check the box for "ANSI Trigger". Click the Pattern tab. Most important!..paste using CTRL-V, as that is the paste controlled by zMud.
Should those direction not work, then you will have to manually enter it. Ansi code format in zMud is %e[##m for colors. You can retrieve any color code you want with the line:
#SHOW %right(%ansi(white),1)
That includes the bracket for reference. |
|
|
|
Kurt_DH Wanderer
Joined: 26 Oct 2000 Posts: 62
|
Posted: Wed Jul 10, 2002 9:57 pm |
quote:
The simplest method is to copy and paste. Highlight the white "a town guard" in the mud output screen. Create your new trigger in the settings editor, do not paste yet. Click the Options tab. Check the box for "ANSI Trigger". Click the Pattern tab. Most important!..paste using CTRL-V, as that is the paste controlled by zMud.
Should those direction not work, then you will have to manually enter it. Ansi code format in zMud is %e[##m for colors. You can retrieve any color code you want with the line:
#SHOW %right(%ansi(white),1)
That includes the bracket for reference.
Ok, I tried copying and pasting, but I can't seem to make the trigger and check the box for ANSI trigger, without putting in a name for the trigger first. After I entered a random name for the trigger, and checked ANSI, I copy and pasted like you said. It didn't work. Then I tried what you told me about the #SHOW command, and it showed this: [0;57;40m ... Does that mean the code for white is 57, or 40? I went into the trigger and put %e[40m and also tried %e[57m before the "a town guard", and it still didn't work. What am I doing wrong? NOTE: The game colors the monsters automatically, and it colors them BRIGHT white, not grey. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jul 11, 2002 12:06 pm |
The problem is that you need to enter there the codes exactly as the MUD sends it. To do this, copy the text you are trying to match. Then, open the Editor by clicking Windows|Editor, and make sure it is in Raw Mode, in the Options menu. When you paste the text you copied, you will be able to see the ANSI codes. You can copy this and enter it into your pattern box.
Kjata |
|
|
|
|
|
|
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
|
|