Ooh, that's from Nannymud, right?
I use these settings to get the ansi colors on room/exit:
Code: Select all
toggle ansi on
toggle oshort on
colour exit green
colour short boldwhite
If you use other colors, just change the initial trigger to pick up the 'oshort' color. The exit color can be whatever you want, since some rooms do not have any visible exits you want the ansi trigger to react on the short room color.
My room capture is on two lines.
1. an ansi trigger on the boldwhite color
2. perl regex
Code: Select all
^ *(?<roomname>[^.<]+)(?: <(?<exits>.*)>)?(?: \[h\])?\.$
lua code
local roomname = multimatches[2][2]
local exits = multimatches[2][3] or ''
raiseEvent("onRoomInfo", roomname, exits)
The trigger is a bit complex since it handles the possible 'help-here' tag aswell. Also, it allows for extra spaces at the start, since I sometimes had a space before the roomname when I moved around quickly.
Here is the trigger xml for copy-paste
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.001">
<TriggerPackage>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="yes" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Room Capture</name>
<script>local roomname = multimatches[2][2]
local exits = multimatches[2][3] or ''
raiseEvent("onRoomInfo", roomname, exits)
</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#ffffff</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>FG15BG-2</string>
<string>^ *(?<roomname>[^.<]+)(?: <(?<exits>.*)>)?(?: \[h\])?\.$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>6</integer>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</TriggerPackage>
</MudletPackage>