|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Sat Jul 26, 2008 4:00 pm
How to get Ansi codes from Mud so I can create a Ansi trigger |
ok, here is a stupid question, I do I get the ansi codes from the mud so I can create a Ansi trigger.
I want to capture the name of the room along with its description and exits. The room name is sent with a different color.
If I go into the debugger I see the following:
Code: |
0.1302 | <<ESC>[1mA very small cave<ESC>[0m<CR><LF>
0.0000 | You are deep underground in a very small rocky cave. The ceiling here is somewhat low. A small stream runs through here. You can see open sky to the north. It is blindingly bright here.<CR><LF>
0.0000 | <ESC>[1;37mThere are two exits<ESC>[0m: <ESC>[0;36mnortheast<ESC>[0m and <ESC>[0;36mnorth<ESC>[0m.<CR><LF>
|
as a test, I tried the following thinking those extra symbols the debugger is showing are the ansi codes, but this did not work.
Code: |
#TR {^[1mA very small cave<ESC>[0m$} {#ST TEST} |
Is there another way to copy text from the main mud window and include ansi codes, so i can paste it into a trigger?
When I copy the text from the mud and paste into a ansi trigger i get the following
Code: |
#TR{%e[0SA very small cave%e[0m} {#SH TEST} |
When i test this by looking at the room, it executes, but I also tested by using the command #SH A very small cave, and this also ran the trigger even though this #sh did not have the ansi code. |
|
_________________ Talahaski
dartmud.com 2525
Last edited by Talahaski on Sat Jul 26, 2008 4:09 pm; edited 1 time in total |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Jul 26, 2008 4:04 pm |
Copy the line, go to package editor, go to New->New Trigger, make sure you select "ANSI Trigger", paste it into the pattern, and it should show up.
Charneus |
|
|
|
|
|
|
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
|
|