Find
You are in a fortune teller
talk to the fortune teller
to get some mystic insight into your future
Created by
wolis
, last updated 31 Jan 2015
Code
##txickloc:runsub whattodo;
##talk:runsub checkswitch;
##checkswitch:
code $actor switch on;
say 'act',"[$actor] gazes into her crystall ball";
set $actor's talker to $init_obj;
##whattodo:
var $talker to $actor's talker;
var $how to (slowly,quickly,ponderously,mysteriously,slyly);
var $vol to (loudly,quietly,softly,gently,beguilingly,mornfully);
load $actor's insight;
say 'msg',"[$actor] $how looks at [$talker] and $vol says '$randomitem. That is all'";
code $actor switch off;
rem - notes -
- The tickloc is disabled by default being 'tickloc'
- When someone talks to this object it toggles the code on - flipping tickloc to tickloc which works as normal - running 'whattodo' after a tick.
- The initiating objects ID is stored in this objects pocket variable called talker.
- In the 'whattodo' code block we retrieve the ID of te initiating object who started this chain of events
- Then we set some random variables for later display
- We then read all of the lines from the pocket variable called 'insight' (edit this object to add more sentences)
- We then print out a message using $randomitem which is a random line of text from the pocket variable we read in.
Finally we turn off the tickloc so this object goes to sleep until someone talks to it again.
REFINEMENTS: this object will react even if someone talks to another object in the same room.. this can be refined later.
Could make this object subtract pennies from the talker so there is some payment involved
Thought! could have an object that offers great riches in trade for a random object you are carrying.
an insight
the talker