MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: #0:do_command()
On Thu, 21 Sep 1995, Seth I. Rich wrote:
> It should be very rare that #0:do_command should itself send output to
> the player. This verb call is supported to permit specialized in-DB
> parsing (of whatever variety).
>
> However, I wonder what use it would be for a general function called
> -after- the verb is completed. If my task suspends, what happens to
> this afterward verb call? I suppose I don't see what possible use it
> could be.
We're building a webbed MOO with a little interface script that sends the
player the output of each command s/he issues as a single page (using
PREFIX and SUFFIX.) I'd like to be able to spit out at the *end* of the
page (and thus at the end of their command output) a list of the verbs
available in the player's location. For instance, "@withdraw, @desposit"
for a bank, "@order, @tip" for a cafe, etc.
We obviously can't hack every verb players might use.
We tried using SUFFIX, but a) it cannot evaluate its argument [i.e.
"SUFFIX #2.name" results in "#2.name" being your suffix, not "Wizard"] and
b) it cannot be issued as a builtin from a verb, only from the actual
command line.
The point is to make the basic commands in each room available in a
"point-and-click" format for ease of new players.
> + I add a verb to myself. What do you want to tell me afterwards, that's
> not part of the output of whatever command I used?
As above, some sort of 'list of options'.
> + I start a database scanning task which completes in four hours. What
> would your proposed code tell me?
Good question -- in this case we're only imagining players being affected
by this (not programmers) and so we shouldn't have this problem. We also
would make no suspend() or read() etc. verbs available to players.
(Several people have asked about this, but we're just avoiding the
problem in our implementation.)
> Are there any models under which such a hook would be useful?
=> One model outside of Web use (for which I think there could be a
number of uses) is for calculating or compiling statistics on task run
times. This would be possible if a :do_after_command() were used in
conjunction with a :do_command(). It might be interesting to know just
what verbs are taking long amounts of time to complete, and perhaps that
could be useful in reducing lag.
=> Programmers might also like to get a little "Time Taken for verb XXX: "
output, if they have a "time_tasks" flag set.
=> I could also see having this sort of "You may now: X, Y or Z" prompting
at the *end* of command output be useful for RP MOOs, or MOOs with many
inexperienced players.
> Seth / Blackbriar
>
> --
> ----------------------------------------------------------------------
> Seth I. Rich
> Woo, woo! OpalMOO's back! There is nothing more precious than
> Rabbits on walls, no problem. a tear of true repentance.
>
Anyway, those are the reasons why I'd like it and why it might be a
useful hook in general. Other comments?
Colin
############################################################################
#Colin F. McCormick Freelance Programmer -- MOO & Unix specialist#
#colin@tripod.tripod.com http://student_97ffa.williams.edu/~cmccormi#
# GS/Lit/M d? p- c++(---) l+(++) u++ e++ m++(-) s+/ n+ h* f* !g @w++ t+ y? #
############################################################################
References:
Home |
Subject Index |
Thread Index