Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: 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!!
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: 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... ;)
Reply with quote
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: Mon May 08, 2006 10:19 am   
 
Are you sure? It doesnt work for me :(
(Zmud 7.21 version)
Reply with quote
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: Mon May 08, 2006 1:09 pm   
 
I found the answer to my question:

http://forums.zuggsoft.com/phpbb/viewtopic.php?t=20563&highlight=jump+line

It seems to work perfect.

Sorry I had already searched but didnt find it.
Reply with quote
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: 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!
Reply with quote
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: 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....?
Reply with quote
BlackSmith
Apprentice


Joined: 08 Dec 2002
Posts: 152

PostPosted: 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.
Reply with quote
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: 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...
Reply with quote
BlackSmith
Apprentice


Joined: 08 Dec 2002
Posts: 152

PostPosted: 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.
Reply with quote
Articval
Novice


Joined: 01 Jun 2005
Posts: 47

PostPosted: Tue May 09, 2006 3:58 pm   
 
F**K!!
You did it!!
Thankyooooouuuuuu!!!
Hehe I had almost surrended.... hehehe at laaaast :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net