Full Throttle Wanderer
Joined: 07 Dec 2004 Posts: 65
|
Posted: Wed Dec 08, 2004 12:02 am
Multiline Ansi Trigger |
Each trigger works fine separately, but the 2nd trigger doesn't store the current room when the 3rd trigger is enabled.
1st trigger (used to store current room name when brief mode is off):
note: brief mode is a mud command that toggles room descriptions on or off
Code: |
#trigger {^%e[36m(*)$^%e[37m%s%w} {#var current_room "%1"} "" {color} |
2nd trigger (used to store current room name when brief mode is on):
Code: |
#trigger {^%e[36m(*)$^%e[36mExits} {#var current_room "%1"} "" {color} |
3rd trigger (used to store room exits in a list):
Code: |
#trigger {^Exits: (*)} {#var exit_target %null
#if !(%word(%1,1) = %null) {#additem exit_target %word(%1,1)}
#if !(%word(%1,2) = %null) {#additem exit_target %word(%1,2)}
#if !(%word(%1,3) = %null) {#additem exit_target %word(%1,3)}
#if !(%word(%1,4) = %null) {#additem exit_target %word(%1,4)}
#if !(%word(%1,5) = %null) {#additem exit_target %word(%1,5)}
#if !(%word(%1,6) = %null) {#additem exit_target %word(%1,6)}
#if (@exit_target = %null) {#var exit_target None}} |
Mud text without emulation, with brief mode off:
Code: |
<27>[36mTown Hall<27>[37;40m<27>[36m<27>[37;40m
<27>[37m This cramped room barely has room enough for the large desk which
sits in the middle of the room. On every wall, paperwork of every
color and description can be seen hanging. The floor is heavily
scuffed and the room has very little ventilation due to the complete lack
of windows. Hanging from the ceiling is a small lamp which barely puts
out enough light to see by.<27>[37;40m
<27>[36mExits: <27>[37;40m<27>[36mNorth West <27>[37;40m |
Mud text without emulation, with brief mode on:
Code: |
<27>[36mTown Hall<27>[37;40m<27>[36m<27>[37;40m
<27>[36mExits: <27>[37;40m<27>[36mNorth West <27>[37;40m |
I want the variable current_room to store "Town Hall" and the variable exit_target to store the list {North|West} when brief is on or off.
Also, I had a trigger the colored the text "Exits:" in purple with the #cw command, but this conflicts with the 2nd trigger as well.
Thanks, F.T. |
|