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
Draeger
Beginner


Joined: 14 Aug 2004
Posts: 10

PostPosted: Thu Sep 09, 2004 1:24 am   

Capturing caps to non caps
 
Is there anyway for zmud to dicifer between caps and noncaps?

Im maknig a damage counter and want it to have a different value for
DISMEBER compared to dismember
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Thu Sep 09, 2004 2:49 am   
 
#TR {DISMEMBER} {#SH It's all upper case!} "" {case}
#TR {dismember} {#SH It's all lower case!} "" {case}
_________________
.geniusclown
Reply with quote
Draeger
Beginner


Joined: 14 Aug 2004
Posts: 10

PostPosted: Thu Sep 09, 2004 2:57 am   
 
hrmph, well Im using one trigger

#TR {%1 hits * with %x %w!} {#ADD %1 %item( @DamVals, %ismember( %2, @DamWords));#ADDITEM PlayerFighters %1}

%2 is the dam verb....do I just put case after it or what?
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Thu Sep 09, 2004 4:24 am   
 
That trigger pattern gives me a headache. Since none of the pattern-matching wildcards are enclosed with paranthesis, I can't tell what you think %2 should refer to. Avoid using %1 in trigger patterns, it is not documented and will match anything.

Please, if you want help with this, provide the output you're trying to match.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Sep 09, 2004 6:54 pm   
 
You can easily determine whether a particular word is uppercase or lowercase by simply using #IF. Even easier, the two words are spelled differently.
#TR {(%w) is the word being checked} {
#IF ("%1" = "DISMEBER") {This is all uppercase, plus it's misspelled}
#IF ("%1" = "dismember") {This is all lowercase and spelled correctly}
}

In addition, #ADDITEM is case-sensitive and so is %ismember, so you can have both 'dismember' and 'DISMEMBER' in your list and tell them apart.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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