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


Joined: 29 Jul 2002
Posts: 105

PostPosted: Sat Dec 17, 2005 11:12 am   

ansi Triggers
 
Hi, I've always had a major trouble with ansi color triggers, in that, while most people tell me to copy/paste into the trigger line, that never has worked, since back until I was using 4.62 (it worked then but not since). Is it possible I have changed some setting somewhere that would disallow it to work? Is there some special part you must turn on (besides clicking the ansi trigger box on the third tab) to make it work?

I'm getting a little tired lately of having to do an ansi log, then read through the lines of stuff, and compare, just to get what the color codes I'd like.

Also an odd note, when I paste the same thing into the value, it stays the colors it was (well slightly different shading, but you can tell what they were), for a second, before turning to all black.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Dec 17, 2005 12:58 pm   
 
Make sure you have the ANSI option checked for the trigger before you paste the pattern in.
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Sat Dec 17, 2005 1:01 pm   
 
I have checked that over and over, done many combinations, of checking it, unchecking others, pasting. is there some setting, or some other program that may conflict with this? As I said I can only get this to work for 4.62, and I dislike having an older version installed just for that, (or logging just for it as well)

It's also not just the computer, as I've had the trouble for the last 4 computers I've had as well.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Dec 17, 2005 1:11 pm   
 
v7.21
Open a new character to some mud with color.
Highlight the line of color and control-C
Open Settings editor
Button drop down new trigger.
Click Options tab
Check ANSI trigger
Click Pattern tab
Paste in pattern

I get

%e[54;47m09:10 1: >
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Sat Dec 17, 2005 1:22 pm   
 
Here's what I do... I've done it new muds.. old muds.. everything...

http://troi.cc.rochester.edu/~y1csc171/Example/Example.html
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Dec 17, 2005 2:36 pm   
 
Can you reproduce that with a brand new window? ie Did something get changed in the settings.

Guessing I'd check:

View->Preferences
Colors
\__Color Syntax

[ ] Syntax Enabled

Could it be that you have color syntax enabled with nothing in them so when you paste color codes it gets confused?

General
\__Emulation
[X] ANSI Color


As possible locations for what is different.
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Sat Dec 17, 2005 2:43 pm   
 
The first box (Synax Enabled) Was unchecked
And the second (ANSI Color) Was checked


I even just now made a new window (#capture neWindow 5)
And tried it with a few of those colored lines... (the new window had no settings yet)

I have also tried new muds (from the mud list) creating completely new settings files with MAIN windows...
still no luck :(


http://troi.cc.rochester.edu/~y1csc171/Example/Settings1.jpg
http://troi.cc.rochester.edu/~y1csc171/Example/Settings2.jpg
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Dec 17, 2005 3:08 pm   
 
Question of how you paste the trigger:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=9628&highlight=ansi+color+trigger
Kjata and Vijilante wrote:

Kjata:
There are three ways in which you can paste the text with the control codes:
1. Click on the Pattern box and hit CTRL-V
2. Click on the Pattern box and click on Edit|Paste

3. Right-click on the Pattern box and select Paste
The first two work, while the third doesn't. I believe Zugg has mentioned in the paste that the behavior of the third method is the default behavior that an edit box has in Windows and he has no control over it.

Vijilante:
Fourth method is CTRL-Ins. That one is also governed by Windows and is beyond Zuggs control.



Making triggers:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=8358&highlight=ansi+color+trigger
Kjata wrote:

Kjata:
There are two ways of doing this:
1. Triggers have an option to Trigger on Line Color and you specify which color that would be. In this case, the trigger would only check for a match in the pattern if the line color is the one specified.
2. The other, more comples method, is to create an ANSI trigger. In theory this should be easy, but right now it isn't. What you need to know is the ANSI sequence that your MUD sends for the color you want. To do this, copy the line you want to trigger on (any red line in your case should do) and open the Editor (Window|Editor). Make sure that Options|Raw Mode is selected and paste the copied line into the editor. Now you will see the ANSI sequence used (they start with a rectangle-like character and end with an "m"). Finally, copy the sequence into the pattern box for your trigger and replace the "rectangle-like character" with %e in the pattern. Also, make sure the Ansi Trigger options is selected.


Failing that perhaps a hack to get the color:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=6213&highlight=ansi+color+trigger
Vijilante wrote:

#TRIGGER {* the {male|female}} {TempPlayer=%word(%replace(%trigger,%char(27)," "),1);TempTeam=%copy(@TempPlayer, %eval(%pos("m",@TempPlayer)-2),2);TempPlayer=%copy(@TempPlayer, %eval(%pos("m",@TempPlayer)+1),255);#IF (@TempTeam=31) { #ADDITEM RedTeam @TempPlayer} { #IF (@TempTeam=33) { #ADDITEM YellowTeam @TempPlayer} { #IF (@TempTeam=36) { #ADDITEM BlueTeam @TempPlayer}}}} "" {color}


Hopefully something from those searches points you into a good direction.
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Sat Dec 17, 2005 3:12 pm   
 
The Raw mode with the editor window works

(Just a side note I was using Ctrl+V)

Thank you very much for your time. It cut out making a log file and opening it, which got tedious after a while, when I wanted to make multiple scripts.
Reply with quote
baldtony
Newbie


Joined: 05 Jul 2005
Posts: 2

PostPosted: Wed Dec 21, 2005 6:01 pm   
 
Sorry to keep on with a similar problem, but I'm having trouble getting this to work. It's the room description, and is in Bright Yellow.
I try Kjata's suggestion of using the editor window, which gives the following

[1;33mTreasure Chamber

Then create an ANSI trigger and paste it in.
Should the trigger be
%e[1;33mTreasure Chamber%e[0m.
or
%e1;33mTreasure Chamber%e0m.

Neither actually work. Is the semi-colon causing problems or something?

thanks in advance
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Wed Dec 21, 2005 8:46 pm   
 
forget the second one, unless you do begin/end line triggers

#trigger {%e[1;33mTreasure Chamber} {Whatever you want it to do} "ClassFolder" {color}

Should do what you want (replace the Whatever you want to do... with what you want it to do.. and class folder with the class it'll be in... or just make it "" if you want no class)
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