|
mj_cole Wanderer
Joined: 19 Apr 2001 Posts: 59 Location: USA
|
Posted: Sat Jul 19, 2003 10:26 pm
Brief mode |
I would like to be able to GAG out a room's description from display in the main window, and capture it to a seperate one. I was wondering if there is a clever way to do this.
Regards
Marts |
|
|
|
Daagar Magician
Joined: 25 Oct 2000 Posts: 461 Location: USA
|
Posted: Sat Jul 19, 2003 11:29 pm |
The easiest way to accomplish this is if the room description is or can be made a different color from the room name, objects/mobs in a room, prompt, etc. Then it is a matter of simply making an ANSI trigger to capture any text in that color, and redirect it to another window. If you can't control the colors in this manner, I can only imagine how to do it (it becomes significantly more complex).
|
|
|
|
mj_cole Wanderer
Joined: 19 Apr 2001 Posts: 59 Location: USA
|
Posted: Sun Jul 20, 2003 1:22 am |
I tried making a trigger:
#tr {{%roomname()}} {#show fired}
to see if that would capture the room name, but it only seemed to work in one specific room.
Any ideas ?
Regards
Marts |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Jul 20, 2003 5:58 am |
Since your using the automapper you can do what you want through the onroomenter and onroomcreate aliases, but the display would be jumpy. Existing rooms would better be served through an #ONINPUT trigger with a pattern of ^%t$, but if you frequently key ahead a number of directions then triggering would be off. So the best way is to combine them.
Script is untested, you didn't give anything to test with!:
#CLASS {DescCap}
#ALIAS MakeDescCapTrigger {DestDesc=%roomdesc(@DestRoom);#EXEC %concat("#TR Room",@DestRoom," {^",%word(@DestDesc,1,%crlf),"$} {#GAG;#CAP} DescCap");#EXEC %concat("#COND Room",@DestRoom," {} {#GAG;#CAP} DescCap {looplines|param=",%eval(%numwords(@DestDesc,%crlf)-2),"}");#EXEC %concat("#COND Room",@DestRoom," {} {#GAG;#CAP;#UNTRIGGER Room",@DestRoom,"} DescCap")}
#ALIAS onroomenter {#IF (%nextdir!="") {DestRoom=%roomlink(%roomnum(),%nextdir));#IF (DestRoom=-3) {DestRoom=%roomnum()};#IF (DestRoom>-1) {MakeDescCapTrigger}}}
#VAR DirConv {nnsseewwuuddnwhnejswksel}
#VAR DestRoom {} {}
#VAR DestDesc {} {}
#ONINPUT "DirCap" {^({@DirConv})$} {#IF (%inwalk="") {DestRoom=%roomlink(%roomnum(),%db(@DirConv,"%1"));#IF (DestRoom=-3) {DestRoom=%roomnum()};#IF (DestRoom>-1) {MakeDescCapTrigger}}}
#CLASS 0
The reason I didn't actually use the %t (direction) wildcard is because it picks up short names and zMud character abbrieviations, but does not pick up long names. If your current setup sends long names in places simply add them to the DirConv variable. Also since you didn't specify a window to capture to it simply captures to the editor, fill in a name for the #CAP commands if you want. It will not capture rooms that are being created because it doesn't know what to look for. You can use the onroomcreate alias to do that with #GAG -x, but you will have display jump. |
|
|
|
mj_cole Wanderer
Joined: 19 Apr 2001 Posts: 59 Location: USA
|
Posted: Mon Jul 21, 2003 1:54 am |
Hmm it didn't seem to work.
I will post a mud output log shortly, if you are willing :)
Would I be right in saying that this script would only work with macro input from the keyboard, and not regular keyboard input ?
Regards
Marts |
|
|
|
mj_cole Wanderer
Joined: 19 Apr 2001 Posts: 59 Location: USA
|
Posted: Mon Jul 21, 2003 1:15 pm |
Below is a typical little walk few a few rooms. It sends "You ride South" or "You fly South" if you are riding or flying, directly after the prompt and before the room name.
Thanks for the help
Marts
Code: |
N:35 > s
South Main Street
This is a wide, north-south road which appears well-traveled. Large ruts
left by the passage of many carts make the road bumpy and uneven. To the
east you see a beautiful park, while to the west is a marketplace.
Dark clouds cover the sky.
This area is very brightly lit.
You can see exits to the north, south, and west.
An old mare stands here looking all skin and bones.
A diamond golem is here loyally following its master.
A lamppost is here.
H:15 M:100 V:166 T:0 N:35 > w
Market Road
You are at the eastern edge of Grimhaven's shopping district. Immediately
to your north is the famous Roaring Lion Inn. Just thinking of its
comfortable beds makes you kind of tired! South of here lies a barn used
by the Inn as a stable.
Dark clouds cover the sky.
This area is very brightly lit.
You can see exits to the north, east, south, and west.
A lamppost is here.
H:15 M:100 V:165 T:0 N:35 > w
Market Road
This part of Market Road seems to be well traveled. Market Square is
immediately to your west with the road continuing eastward. To the north
lies a large building housing one of the best restaurants in all of
Grimhaven!
Dark clouds cover the sky.
This area is very brightly lit.
You can see exits to the east, and west.
A lamppost is here.
H:15 M:100 V:164 T:0 N:35 > w
Market Square
This is the center of Grimhaven's Trading District. There are shops of
all sorts about the square, seemingly you could get anything you wanted
here.....for a price. A large building sits to the northeast, a wonderful
aroma of various foods coming from the open doorway facing the square. To
the south two small shops sit to each side of the square while a larger
shop is to the northwest with a sign hanging over the entrance bearing a
sword and shield upon it.
Dark clouds cover the sky.
This area is bright as day.
You can see exits to the north, east, south, west, northeast, northwest, southeast, and southwest.
A young man stands here, trying to blend into the crowd.
A fat pigeon waddles up to you, looking for a handout.
A deputy of the Brotherhood of Galek keeps a keen eye out for trouble here.
An ancient looking mule stands here with its head hung low.
A snorting stallion is here, pawing at the ground.
A lamppost is here.
An intricately carved monument to fallen heroes towers above the square.
A small bubbling fountain sits in the middle of the square. (glowing)
H:15 M:100 V:163 T:0 N:35 >
A pickpocket leaves north.
H:15 M:100 V:163 T:0 N:35 > s
Branish Way
Immediately to your west is the side of Taloc's general store and from
the east the smell of fine food emanates from Froddor's through a tiny
louvered window which vents heat and fumes from the cookstoves. Market
Square is to the north.
Dark clouds cover the sky.
This area is very brightly lit.
You can see exits to the north, and south.
A lamppost is here.
|
|
|
|
|
|
|
|
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
|
|