 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
Posted: Mon May 08, 2006 8:25 am
Fast -easy?- trick |
Hello!
Ill be fast asking...
I got my prompt this way:
<<*>>
Sometimes, things appear after the >>, and I want them to go on the next line, so the prompt appears alone.
So:
<<*>> Bla Bla
Gets into:
<<*>>
Bla Bla
The trigger I got does next:
#tr {~>~>([%a . : ' ! %s])$} {#sub ~>~>
#var var {%1}
#show @var}
The problem is that its a slow way of doing it, and sometimes the phrase which should appear just after a prompt, appears some lines later :(
Anyone knows a better idea to insert a jump of line just after the prompt??
Thankyou!! |
|
|
 |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Mon May 08, 2006 10:12 am |
Could make your prompt
#tr {~>~>} {#show %cr}
Which should skip to the next line after the prompt but before the text following it |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
Posted: Mon May 08, 2006 10:19 am |
Are you sure? It doesnt work for me :(
(Zmud 7.21 version) |
|
|
 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
|
|
 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
Posted: Mon May 08, 2006 2:02 pm |
#tr {~>~>(*)$} {
#sub {~>~> %cr}
#show %1}
That one is the one which works best for me so far, but it does a strange thing, I want to avoid:
It shows the last command executed, just like when I use the "show triggers" option from preferences menu.
Pretty strange... any way to avoid that? Or a better solution? (just inserting there a line break...)
Thankyou! |
|
|
 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
Posted: Tue May 09, 2006 10:56 am |
I have been trying tons of things with the command #sub, its gives me a lot of problems...
I didnt get a good solution to that...
Is there any way of using the command #show so that it inserts what specifyed -BETWEEN- the line instead of at the end?
Quote: |
Could make your prompt
#tr {~>~>} {#show %cr}
|
It adds a line break -after- the whole line instead of where I want it to do so...
Any ideas please....? |
|
|
 |
BlackSmith Apprentice

Joined: 08 Dec 2002 Posts: 152
|
Posted: Tue May 09, 2006 1:39 pm |
Try
Code: |
^<<.*>>(.*)$
#If (%1 != "") {
#Sub {<<*>>}
#Show {%cr %1}
}
|
Works with mine and does nothing if there is nothing after the ">>" part.
Oh, ant the trigger part is in perl regex, naturally. |
|
_________________ BatMUD Best MMORPG around since 1990 telnet://bat.org:23
~ Magic & Mind beats Chrome & Meat anytime ~
Pattern(s) in PERL. Using Cmud 1.34/2.09 & BatClient. |
|
|
 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
Posted: Tue May 09, 2006 1:54 pm |
Does not work for me...
And by the way I tryed something similar, If you use #show {%1} , you will get a delay (the line will be shown 5 or more lines after when it should)
Thanks for your help... I think im about to surrender... |
|
|
 |
BlackSmith Apprentice

Joined: 08 Dec 2002 Posts: 152
|
Posted: Tue May 09, 2006 2:34 pm |
Meh, true it does not work but using ECHO instead of SHOW works.
Code: |
^<<.*>>(.*)$
#If (%1 != "") {
#Sub {<<*>>}
#Echo {%cr %1}
} |
My bad. |
|
_________________ BatMUD Best MMORPG around since 1990 telnet://bat.org:23
~ Magic & Mind beats Chrome & Meat anytime ~
Pattern(s) in PERL. Using Cmud 1.34/2.09 & BatClient. |
|
|
 |
Articval Novice
Joined: 01 Jun 2005 Posts: 47
|
Posted: Tue May 09, 2006 3:58 pm |
F**K!!
You did it!!
Thankyooooouuuuuu!!!
Hehe I had almost surrended.... hehehe at laaaast :) |
|
|
 |
|
|