MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
[quad@host.scbbs.com: Locking and Listening]
------- Start of forwarded message -------
Return-Path: moo-cows-errors@parc.xerox.com
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-NS-Transport-ID: 0800207424C500FB33FC
Date: Mon, 10 Mar 1997 16:47:45 PST
From: Scott Robinson <quad@host.scbbs.com>
Subject: Locking and Listening
To: moo-cows.PARC@xerox.com
Sender: MOO-Cows-Errors@parc.xerox.com
Precedence: bulk
As for keeping the people in your Tavern...
(I'm using #123 for the generic beer.)
@verb tavern:exitfunc tnt rxd
@program tevern:exitfunc
"Check the thing leaving for a Beer";
for x in (args[1].contents)
if($object_utils:isa(#123,x)
"You might want to tell them why.";
args[1]:tell("You can't leave the bar with a Beer!");
"You want to keep them in the bar...";
args[1]:moveto(this);
if(args[1].location != this)
"Now you know they left the bar. You might want to use this.owner:receive_page() in case you're logged off and have a Answering Machine.";
this.owner:tell($string_Utils:nn(args[1])," left the Bar with ",$string_utils:nn(x));
endif
endif
endfor
.
As for listening for text it is easiest to put a object in the location
and:
@verb listener:"tell notify" tnt rxd
@program listener:tell
"Check for text this.listenfor";
if(rindex(text=$string_utils:from_list(@args," "),this.listenfor))
"The text was outputted keep in mind it could be \"Below\" instead of \"low\".";
"It's best for checking something was said to do a match() using regexp.";
this:do_stuff_with_text(text);
endif
return pass(@args); "If something is below this.. else just forget this line.";
.
Have fun.
Scott
quad@host.scbbs.com
be218@scn.org
scott@mail.televillage.org
/-----------------------------------------------\
|This message made with 100% Recycled Electrons |
|This space left intentionally blank -> |
\-----------------------------------------------/
------- End of forwarded message -------
Home |
Subject Index |
Thread Index