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


Joined: 16 Aug 2007
Posts: 11

PostPosted: Thu Aug 16, 2007 1:03 pm   

blocking input
 
How do I block specified input so that the triggers wont trigger on it?

Example

When someone says something in the mud I have a sound. But when a NPC says something i dont
want it to trigger.

So I want to block example:

"centaur says"


Regards
J.
Reply with quote
ixy
Novice


Joined: 18 Mar 2007
Posts: 39

PostPosted: Thu Aug 16, 2007 1:29 pm   
 
Im not that good at stuff like this, but only way i know off is to use a variable

"(*) says"

#if {@mob.says = %1} {#abort}

would need to add that into your script... or something alike, hope it helps!

then in the @mob.says #var you would have to manually enter all the talking mobs names :( and then add something like
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Aug 16, 2007 4:03 pm   
 
An easier way (though you would have to update it often) would be to set up a trigger to add a "who" variable list. For instance, if your mud outputs:

[73] Charneus the chosen one

when you type "who," then you can set it up like so:

#TRIGGER {~[%d~] (%w)} {#additem wholist %1}

Then set up the trigger to read:

#TRIGGER {(%w) says} {#IF %ismember(%1, @wholist) {#play sound}}

The wholist will continue to grow as you type "who" every so often. Eventually, you should have enough in your wholist to not have to worry about updating it so much. Granted, people create characters all the time, so if you want to go the mob route, go for it. Like ixy said, you'll have to manually enter all the mob names you come across, so that'll take a while. But while ixy's trigger may work, it'll look neater with this:

#TRIGGER {(%w) says} {#IF %ismember(%1, @moblist) {} {#play sound}}

To add a name to the mob list, just type on the command line "#additem moblist centaur" (without quotes) and your mob database will grow.

Another thing - if you want it to only play sounds on certain people, you can just do the first one, but manually add the people's names you want to hear from (i.e. #additem wholist charneus). Then you can totally ignore the first trigger I set up for you.

Charneus
Reply with quote
castaneda
Beginner


Joined: 16 Aug 2007
Posts: 11

PostPosted: Thu Aug 16, 2007 4:06 pm   
 
Doesnt help much im afraid. To get to know peoples names you have to make them introduce to you.
Unknown people should trigger the sound also
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Aug 16, 2007 4:30 pm   
 
How do you know when it's a centaur for example and when it's unknown? How does the message look when it's unknown?

If it's generic such "Someone says ..." and NPCs will never show up like that then you can use the above idea and add "Someone" to your who list.
_________________
Asati di tempari!
Reply with quote
castaneda
Beginner


Joined: 16 Aug 2007
Posts: 11

PostPosted: Fri Aug 17, 2007 8:59 am   
 
I have made trigger on "says:" and I want it to trigger on everything that says but this: "warrior says:" because
A lot of work with do list and stuff.... Is that really necessary?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat Aug 18, 2007 6:56 pm   
 
It is necessary if you want to filter it out. In order to filter it out, you have to give some direction as to <b>what</b> to filter out. While zMUD may be smart, it's not capable of discerning a person from a mob unless a list has already been shown saying "Hey, a warrior is a mob, but Charneus is a person."

It is a lot of work to do the lists. I completely understand where you're coming from on that. And I love the 'introduce' portion of the MUD. It brings to mind a possible solution.

I'm assuming that the introduction process works as such:

I can talk all I want, all you'll see is "Someone says: blah blah blah." However, if I type "introduce myself" then I introduce myself to whoever is in the room. At that point, the mud output would read something like:

Charneus introduces himself to you.

Then you can make a trigger off that -

#TRIGGER {(%w) introduces %w to you.} {#additem wholist %1}

That'll automatically generate a wholist based on who has introduced themselves to you. From then on, you can use the trigger I stated above:

#TRIGGER {(%w) says} {#IF %ismember(%1, @wholist) {#play sound}}

Note that you should, as Tech said, place "Someone" in that list as well.

If you can provide some sample output of the MUD when someone introduces themselves, or when someone is talking that you don't know who the person is, or a little more detail on the introduction process, we might be able to make things a little easier for you. But we can't read your mind. :) Hope this helps a little.

Charneus
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Aug 18, 2007 8:07 pm   
 
First make a variable that will contain a list of mobs

#ADDITEM Mobs "Centaur"
#ADDITEM Mobs "Another Mob"

Then change your say trigger to something like this

#TRIGGER {(*) says} {
#IF (!%ismember("%1",@Mobs) {#PLAY mysound.wav}}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
castaneda
Beginner


Joined: 16 Aug 2007
Posts: 11

PostPosted: Mon Aug 20, 2007 4:06 pm   
 
Thanks. Learned alot..
Can you also help me with this??
How do I clear Zmuds memory of a wait command?

I type #wait 60000;say Hi
Now I want to reset it so it wont say Hi in 60seconds?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Aug 20, 2007 4:10 pm   
 
You can't with #wait. You need to use #alarm (you should really be using #alarm instead of #wait anyway, the way zMUD implements #wait can cause problems).

#alarm "hialarm" +60 {say Hi}

Would recreate your command above. You can then use #untrigger hialarm or #suspend hialarm to control it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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