Find
You are in a philosopher wearing a shiny new coat of code
Talk to me and I will tell you something interesting.
talk to philosopher
Created by
wolis
, last updated 03 Jan 2012
Code
##txickloc:runsub whattodo;
##talk:runsub isitme;
##isitme: if $target eq $actor then amibusy else ignore;
##amibusy: if $actor's counter > 0 then dontinterupt else switchon;
##switchon: code $actor switch on;
set $actor's initiator to $init_obj;
##dontinterupt:
say 'glare',"[$actor] glares at [$init_obj] and says 'please dont interupt me'";
runsub whattodo;
##whattodo:
var $init to $actor's initiator;
var $item to $actor's counter;
if $item eq 0 then setstart else setcontinue;
load $actor's current;
say 'say',"[$actor] $prefix '$list[$item]'";
add 1 to $item;
if $item > $list_count then reset else continue;
##setstart:
var $prefix to "looks at you and says ";
##setcontinue:
var $prefix to "continues ";
##reset:
var $item to 0;
code $actor switch off;
say 'act',"[$actor] stops talking and has a sip of water.";
runsub set1 or set2 or set3 or set4;
runsub continue;
rem HANDY HINT:
When you want to see what values an object has,
use the readall {obj} command eg 'readall philo'
##set1: set $actor's current to $actor's triangle;
##set2: set $actor's current to $actor's poem;
##set3: set $actor's current to $actor's parking;
##set4: set $actor's current to $actor's losthings;
##continue: set $actor's counter to $item;
a triangle
a poem
a parking
the initiator
the counter
the current
a losthings