Find
You are in a waiter
Created by
a waiter
, last updated 01 Jul 2009
Code
##arrives:runsub greetit;
##mxoves:runsub whattodo;
##orders:runsub takeorder;
##tickloc:runsub checkwatch;
##think:runsub itisready;
##wish:runsub cleantables;
##laugh:runsub someonelaughed;
##someonelaughed:
say 'msg',"someone laughed";
##greetit:
var $how to (briskly,swiftly,casually,slowly,distractedly,nimbly,enthusiastically);
var $greet to (Welcome,Greetings,Good day,Bonjour);
var $asks to (What would you like to order,what can I get you,Its you again.. how lovely);
say 'xmoves',"[$actor] walks $how towards [$init_obj] and says '$greet. $asks'";
##takeorder:
var $food to $actor's order;
if "$food" eq "" then recordorder else saybusy;
##saybusy:
var $whoto to $actor's client;
say 'say',"[$actor] says 'Please be patient, I am making $food for [$whoto]'";
##recordorder:
var $prefix to (Excellent choice,Wonderful,Naturally,As you wish);
var $suffix to (comming right up,is on its way,will be here shortly);
say 'say',"[$actor] says '$prefix. $init_cmd $suffix'";
store $actor's order = "$init_cmd";
store $actor's client = "$init_obj";
##checkwatch:
runsub itisready or prepareit;
##prepareit:
var $food to $actor's order;
var $how to (busily,noisly,quietly,efficiently,slowly);
if "$food" ne "" then makenoise else cleantables;
##makenoise:
say 'actn',"[$actor] $how makes $food";
##cleantables:
rem - find an object created by the actor and delet it..;
find $loc,random not me not player not doorway;
rem - say 'msg',"[$actor] checks [$found_id]";
if $found_id's owner eq $actor then cleanit else end;
rem - this is how we get a random number;
var $rndnum to 1000;
rem - then we check what the number was and use the stereo every now and then;
if $rndnum < 2 then usestereo else end;
##usestereo:
rem - this is how we force an object to execute a command;
call "use stereo";
##cleanit:
var $bin to 2718;
unhost $found_id;
clear $found_id,all;
relocate $found_id to $bin print "[$actor] cleans up [$found_id]" then "[$fund_id] appears as if by magic";
##itisready:
var $food to $actor's order;
if "$food" ne "" then deliverit else cleantables;
##deliverit:
new "$food";
var $whoto to $actor's client;
var $new_id's slot1 to 'cafe';
var $how to (briskly,swiftly,casually,slowly,distractedly,nimbly,enthusiastically);
say 'xmoves',"[$actor] walks $how to [$whoto]";
say 'gives',"[$actor] gives [$whoto] [$new_id] with a bow then continues cleaning tables";
store $actor's order = "";
relook $loc;
the order
the client