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
WarChild
Novice


Joined: 15 Jul 2001
Posts: 31
Location: USA

PostPosted: Sun Sep 15, 2002 11:49 pm   

Three for One
 
I'm hoping that someone will be able to shed a little light on these questions.
First, I play on an LP mud, which heavily indents tells. It starts out left justified (EG: Barney tells you : blah ) but if Barney's tell is long enough to do a second line, there is a huge (at least 8-10 spaces from the left) indent. Is there a setting in zmud I can change to force that wrap to always left justify? My capture trigger for tells, only captures the first line. I had put in there a trick that if the previous line (Barney tells you : ) then the second line is also part of that tell.. but this isn't always the case, it doesn't always pick it up, and often mistakes the next line of text as a continueation of the tell (even when its not) Channels are like this as well, 8-10 indent spacing on a line wrap.

Next, whats a good way of converting alpha-numbers to numeric for zmud? Database?

You give five heals to Caeos.. now I want to subract those 5 from my inventory, so pattern You give (%w) heals to (*). Command: #ad heals %1 ?? (But %1 = five, not 5)

Last (but not least..) I picked up from here (I think it was Darker who mentioned it) the CNTRL-Q thing. I'm just curious exactly what that is.. I've done it a few times and noted that when some of my classes are off, it returns a faster time than when they are on.. Is this function 'stepping through' all triggers/alias/etc?
Oh and because I forgot to mention this part earlier.. I'm running 6.21 zmud (on WinXP)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Sep 16, 2002 2:28 am   
 
There is a preference in ZMud to specify indentation, but that doesn't affect MUD output unless ZMud is doing the wrapping (and you cannot specify a negative number, either, as any such number will roll over the value to 99). You could perhaps use a trigger to #sub out the spaces you don't want:

#trigger {^" "(*)} {#sub {%1}}

But if other things besides tells are indented this way it might cause problems.

EDIT: as far as #2 goes, if you don't have a lot of numbers to convert your best bet might be a stringlist:

Numbers.alpha = "one|two|three|four|five|..."
Numbers.numeric = "1|2|3|4|5|..."

Then you can use a trigger to trigger on one or the other and do a #sub:

#trigger {({@Numbers.alpha})} {#sub {%item(@Numbers.numeric,%ismember(%1,@Numbers.alpha))}}

li'l shmoe of Dragon's Gate MUD
Reply with quote
WarChild
Novice


Joined: 15 Jul 2001
Posts: 31
Location: USA

PostPosted: Mon Sep 16, 2002 5:41 am   
 
Interestingly enough I had in fact thought about that negative number indent (it went sour) and I had tried a varation of sub for the extended spaces, however, as you pointed out, it could do (and did do) some pretty horrid looking things *grin* It remains the closest I've gotten to a solution, so I'll keep messing around with it.

As for the alpha-numbers to numeric... It didn't even occur to me to try it that way. :)
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Sep 16, 2002 7:17 pm   
 
On the CTRL-Q question, this is a speed test Zugg put in zMUD. You hit CTRL-Q, zMUD generates a lot of lines of text and then it tells you how long did it take to parse them. The time it takes to parse the lines varies depending on many things including your computer specs and your triggers. The triggers you have will affect the speed because zMUD needs to look at every line displayed to see if it contains some text that matches one of your triggers. Some lines get discarded as not matching a particular trigger very quickly, while some (also depending on how you build your pattern) may require further inspection and thus are slower to parse.

Kjata
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