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
Nabisco
Newbie


Joined: 14 Feb 2003
Posts: 6
Location: Australia

PostPosted: Thu Dec 18, 2003 12:53 pm   

Trigger Pattern with # in it
 
at the moment ive got a reall roundabout and ugly way of counting improvements in a skill that include # _ and ' which involved changing the command character to something i was sure nothing else used
i was wondering if there was a better way, ive got an idea, but rather than revamping entire system and then finding out it doesnt work resulting in a broken window + laptop
i was wondering if anyone knows if this solution would work
the text from the mud being something like this
* You think your bob's_spell skill has improved. *
or
* You think your language#goobydegook skill has improved. *
and the pattern id use being
~* You think your (*) skill has improved. ~*
and the stuff that happens when its matched being
#ad %-1 1

would that add it to languagegoobydegook
or would it just add it to language like my previous attempt at this before i made my messy fix ? :p
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Thu Dec 18, 2003 1:32 pm   
 
You might think about changing your command character back, and changing the trigger to:
#TRIGGER {~*%sYou think your (*){_|#}(*) skill has improved.%s~*} {#add %replace(%1%2,"'","") {1}}

In the language#gobedydook example, it would add 1 to @languagegobedydook. In the bob's_spell example, it would add 1 to @bobsspell.
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Thu Dec 18, 2003 2:32 pm   
 
Also for pattern matching command characters (that aren't really command characters user a ~ in front of the command character so that Zmud will quote the next character and not try to process it.

for example:

Bob's #1 trigger

(%w)~'s ~#(%d) trigger

Now the command characters or special characters wont be processed by Zmud.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Dec 18, 2003 5:39 pm   
 
You couldn't find any real examples? Patterns that match "goobydegook" and the like frequently don't work with REAL output.

Creating matching patterns isn't difficult. These should all get special handling anyway, since you won't want ' or # in a variable name, so just make individual triggers.
#TR {You think your bob's_spell skill has improved.} {#AD bobspell 1}
#TR {You think your language~#goobydegook skill has improved.} {#AD goobydegook 1}
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