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


Joined: 14 Oct 2000
Posts: 26
Location: USA

PostPosted: Thu Mar 14, 2002 4:58 pm   

Triggerin' on names
 
Assume this:

#TR {{@empaths}} {#CW <the number for pink>}

Say Bob is an empath, and I like my empaths pink.

so I add bob to @empaths.

Now when Bobby comes in, you know what is gonna happen.

So my question is: If I do this:

#TR {(%w)} {#IF (%ismemeber(@empaths, %1)) {#CW <the number for pink}}

will I take a performance hit? On the one hand, I figure if zmud has to look at every single word it's gonna crawl. But on the other hand, I figure it is already looking at every sing word, so it'll be fine. On yet my third hand (I grew up near a nuclear power facility), zmud is probably not as stable as say, win95 (no offense, I still love it), and I don't like to tease it too much because it might eat all my settings or spontaneously change the classes on me. So what's the word from the higher ups? How do I make this work properly?

And finally, this is a beta question but since I keep getting thrown out for not posting, what is up with the commas in the beta? Man have I had to redo a lot of code since upgrading!

Dracx
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Mar 14, 2002 7:58 pm   
 
Try the trigger with %ismember and see how it performs. If you think that your settings file may fry or something, make a backup of them to another directory. It is a good idea to do this anyway. I believe that it should be slower by calling %ismember on every word received by the MUD, but this might depend on your system and other factors.

There are also some alternatives to this, but they do not cover every possibility. Example:
#TRIGGER { {@empaths} }
#TRIGGER { {@empaths}{.|,}}
#TRIGGER {^{@empaths} }

What do you mean about the commas in the beta version?

Kjata
Reply with quote
dracx
Beginner


Joined: 14 Oct 2000
Posts: 26
Location: USA

PostPosted: Thu Mar 14, 2002 8:08 pm   
 
As issued from zmud, the following:

Say I don't think I'm going to be able to get this one, @customer

Produced this:

Dwydd
say I don't think I'm going to be able to get this one

Where Dwydd was the name of the customer. Further, it originally had a period at the end of the sentance, and it gave me a sytax error. I had to change the command to this:

Say I don't think I'm going to be able to get this one~, @customer~.

Not really a big deal, but I do a lot of interactive scripting, so I had to go through a lot of code.

Dracx
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